mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
re-adjusted parameter names
This commit is contained in:
parent
8880793174
commit
055dc8bc4b
@ -2938,7 +2938,7 @@ static int add_config_nodes(switch_xml_t swnode, ftdm_conf_node_t *rootnode,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ftdm_conf_node_t *_get_ss7_config_node(switch_xml_t cfg, const char *confname, const char *operatingMode)
|
||||
static ftdm_conf_node_t *_get_ss7_config_node(switch_xml_t cfg, const char *confname, const char *operating_mode)
|
||||
{
|
||||
switch_xml_t signode, ss7configs, isup, gen, param;
|
||||
ftdm_conf_node_t *rootnode, *list;
|
||||
@ -3004,19 +3004,19 @@ static ftdm_conf_node_t *_get_ss7_config_node(switch_xml_t cfg, const char *conf
|
||||
}
|
||||
|
||||
/* operating mode , M2UA or ISUP */
|
||||
if(operatingMode && ('\0' != operatingMode[0])) {
|
||||
if(!strcasecmp(operatingMode, "ISUP")) {
|
||||
if(operating_mode && ('\0' != operating_mode[0])) {
|
||||
if(!strcasecmp(operating_mode, "ISUP")) {
|
||||
is_isup = 0x01;
|
||||
}
|
||||
else if(!strcasecmp(operatingMode, "M2UA_SG")) {
|
||||
else if(!strcasecmp(operating_mode, "M2UA_SG")) {
|
||||
is_isup = 0x00;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid operating Mode[%s] \n", operatingMode);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid operating Mode[%s] \n", operating_mode);
|
||||
ftdm_conf_node_destroy(rootnode);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Operating mode not specified, default to ISUP \n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Operating mode not specified, default to ISUP \n");
|
||||
is_isup = 0x01;
|
||||
}
|
||||
|
||||
@ -3367,7 +3367,7 @@ static switch_status_t load_config(void)
|
||||
char *id = (char *) switch_xml_attr(myspan, "id");
|
||||
char *name = (char *) switch_xml_attr(myspan, "name");
|
||||
char *configname = (char *) switch_xml_attr(myspan, "cfgprofile");
|
||||
char *operatingMode = (char *) switch_xml_attr(myspan, "operating_mode");
|
||||
char *operating_mode = (char *) switch_xml_attr(myspan, "operating_mode");
|
||||
ftdm_span_t *span = NULL;
|
||||
uint32_t span_id = 0;
|
||||
unsigned paramindex = 0;
|
||||
@ -3401,7 +3401,7 @@ static switch_status_t load_config(void)
|
||||
span_id = ftdm_span_get_id(span);
|
||||
}
|
||||
|
||||
ss7confnode = _get_ss7_config_node(cfg, configname, operatingMode);
|
||||
ss7confnode = _get_ss7_config_node(cfg, configname, operating_mode);
|
||||
if (!ss7confnode) {
|
||||
CONFIG_ERROR("Error finding ss7config '%s' for FreeTDM span id: %s\n", configname, switch_str_nil(id));
|
||||
continue;
|
||||
@ -3409,9 +3409,9 @@ static switch_status_t load_config(void)
|
||||
|
||||
memset(spanparameters, 0, sizeof(spanparameters));
|
||||
paramindex = 0;
|
||||
if(operatingMode){
|
||||
spanparameters[paramindex].var = "operatingMode";
|
||||
spanparameters[paramindex].val = operatingMode;
|
||||
if(operating_mode){
|
||||
spanparameters[paramindex].var = "operating-mode";
|
||||
spanparameters[paramindex].val = operating_mode;
|
||||
paramindex++;
|
||||
}
|
||||
spanparameters[paramindex].var = "confnode";
|
||||
|
@ -206,13 +206,12 @@ static void ftmod_ss7_set_glare_resolution (const char *method);
|
||||
|
||||
int ftmod_ss7_parse_xml(ftdm_conf_parameter_t *ftdm_parameters, ftdm_span_t *span)
|
||||
{
|
||||
sng_route_t self_route;
|
||||
sng_span_t sngSpan;
|
||||
int i = 0;
|
||||
const char *var = NULL;
|
||||
const char *val = NULL;
|
||||
ftdm_conf_node_t *ptr = NULL;
|
||||
sng_route_t self_route;
|
||||
sng_span_t sngSpan;
|
||||
|
||||
|
||||
/* clean out the isup ckt */
|
||||
memset(&sngSpan, 0x0, sizeof(sngSpan));
|
||||
@ -223,8 +222,8 @@ int ftmod_ss7_parse_xml(ftdm_conf_parameter_t *ftdm_parameters, ftdm_span_t *spa
|
||||
var = ftdm_parameters[i].var;
|
||||
val = ftdm_parameters[i].val;
|
||||
|
||||
/* confirm that the first parameter is the "operatingMode" */
|
||||
if(!strcasecmp(var, "operatingMode")){
|
||||
/* confirm that the first parameter is the "operating-mode" */
|
||||
if(!strcasecmp(var, "operating-mode")){
|
||||
/**********************************************************************/
|
||||
if(!strcasecmp(val, "ISUP")) {
|
||||
g_ftdm_operating_mode = SNG_SS7_OPR_MODE_ISUP;
|
||||
@ -274,7 +273,7 @@ int ftmod_ss7_parse_xml(ftdm_conf_parameter_t *ftdm_parameters, ftdm_span_t *spa
|
||||
/**********************************************************************/
|
||||
/* don't care for now */
|
||||
/**********************************************************************/
|
||||
} else if (!strcasecmp(var, "span-id")) {
|
||||
} else if (!strcasecmp(var, "span-id") || !strcasecmp(var, "ccSpanId")) {
|
||||
/**********************************************************************/
|
||||
sngSpan.ccSpanId = atoi(val);
|
||||
SS7_DEBUG("Found an ccSpanId = %d\n",sngSpan.ccSpanId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user