From d06d00405528db2deff898ab78d8ab45cfa0337e Mon Sep 17 00:00:00 2001 From: William King Date: Thu, 21 Aug 2014 23:17:23 -0700 Subject: [PATCH] Adding the ability to add a radius param when a channel variable is not set in mod_xml_radius --- src/mod/xml_int/mod_xml_radius/mod_xml_radius.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c b/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c index 95b437722c..4cfa99d39d 100644 --- a/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c +++ b/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c @@ -362,6 +362,7 @@ switch_status_t mod_xml_radius_add_params(switch_core_session_t *session, switch char *variable = (char *) switch_xml_attr(param, "variable"); char *variable_secondary = (char *) switch_xml_attr(param, "variable_secondary"); char *val_default = (char *) switch_xml_attr(param, "default"); + char *skip_if_set = (char *) switch_xml_attr(param, "skip_if_set"); char *format = (char *) switch_xml_attr(param, "format"); char *other_leg = (char *) switch_xml_attr(param, "other_leg"); @@ -399,6 +400,9 @@ switch_status_t mod_xml_radius_add_params(switch_core_session_t *session, switch if ( var ) { if ( session ) { switch_channel_t *channel = switch_core_session_get_channel(session); + if ( skip_if_set && switch_channel_get_variable(channel, skip_if_set) ) { + goto end_loop; + } /* Accounting only */ if ( strncmp( var, "h323-setup-time", 15) == 0 ) {