forked from Mirrors/freeswitch
freetdm: fix ss7 config
This commit is contained in:
parent
f87bf812e7
commit
9f73ddd35b
@ -2199,7 +2199,7 @@ static switch_status_t load_config(void)
|
||||
}
|
||||
|
||||
switch_core_hash_init(&globals.ss7_configs, module_pool);
|
||||
if ((spans = switch_xml_child(cfg, "ss7_spans"))) {
|
||||
if ((spans = switch_xml_child(cfg, "sangoma_ss7_spans"))) {
|
||||
for (myspan = switch_xml_child(spans, "span"); myspan; myspan = myspan->next) {
|
||||
ftdm_status_t zstatus = FTDM_FAIL;
|
||||
const char *context = "default";
|
||||
@ -2248,6 +2248,10 @@ static switch_status_t load_config(void)
|
||||
}
|
||||
|
||||
memset(spanparameters, 0, sizeof(spanparameters));
|
||||
paramindex = 0;
|
||||
spanparameters[paramindex].var = "confnode";
|
||||
spanparameters[paramindex].ptr = ss7confnode;
|
||||
paramindex++;
|
||||
for (param = switch_xml_child(myspan, "param"); param; param = param->next) {
|
||||
char *var = (char *) switch_xml_attr_soft(param, "name");
|
||||
char *val = (char *) switch_xml_attr_soft(param, "value");
|
||||
@ -2268,10 +2272,10 @@ static switch_status_t load_config(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (ftdm_configure_span(span, "ss7", on_ss7_signal,
|
||||
"confnode", ss7confnode,
|
||||
"parameters", spanparameters,
|
||||
FTDM_TAG_END) != FTDM_SUCCESS) {
|
||||
if (ftdm_configure_span_signaling(span,
|
||||
"sangoma_ss7",
|
||||
on_ss7_signal,
|
||||
spanparameters) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring ss7 FreeTDM span %d\n", span_id);
|
||||
continue;
|
||||
}
|
||||
|
@ -3867,10 +3867,13 @@ FT_DECLARE(ftdm_status_t) ftdm_configure_span(ftdm_span_t *span, const char *typ
|
||||
ftdm_load_module_assume(type);
|
||||
if ((mod = (ftdm_module_t *) hashtable_search(globals.module_hash, (void *)type))) {
|
||||
ftdm_log(FTDM_LOG_INFO, "auto-loaded '%s'\n", type);
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_ERROR, "can't load '%s'\n", type);
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (mod && mod->sig_configure) {
|
||||
if (mod->sig_configure) {
|
||||
va_list ap;
|
||||
va_start(ap, sig_cb);
|
||||
status = mod->sig_configure(span, sig_cb, ap);
|
||||
@ -3879,7 +3882,7 @@ FT_DECLARE(ftdm_status_t) ftdm_configure_span(ftdm_span_t *span, const char *typ
|
||||
status = post_configure_span_channels(span);
|
||||
}
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_ERROR, "can't find '%s'\n", type);
|
||||
ftdm_log(FTDM_LOG_CRIT, "module '%s' did not implement the sig_configure method\n", type);
|
||||
status = FTDM_FAIL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user