Added channel-restart-on-link-up option
This commit is contained in:
parent
599a200509
commit
546a2961cb
|
@ -183,6 +183,7 @@ typedef struct sngisdn_span_data {
|
|||
int8_t facility_timeout;
|
||||
uint8_t num_local_numbers;
|
||||
uint8_t timer_t3;
|
||||
uint8_t restart_opt;
|
||||
char* local_numbers[SNGISDN_NUM_LOCAL_NUMBERS];
|
||||
ftdm_sched_t *sched;
|
||||
ftdm_queue_t *event_queue;
|
||||
|
|
|
@ -182,6 +182,7 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
|
|||
signal_data->overlap_dial = SNGISDN_OPT_DEFAULT;
|
||||
signal_data->setup_arb = SNGISDN_OPT_DEFAULT;
|
||||
signal_data->timer_t3 = 8;
|
||||
signal_data->restart_opt = SNGISDN_OPT_DEFAULT;
|
||||
|
||||
signal_data->link_id = span->span_id;
|
||||
span->default_caller_data.bearer_capability = IN_ITC_SPEECH;
|
||||
|
@ -271,6 +272,15 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
|
|||
ftdm_span_set_bearer_capability(val, &span->default_caller_data.bearer_capability);
|
||||
} else if (!strcasecmp(var, "outbound-bearer_layer1")) {
|
||||
ftdm_span_set_bearer_layer1(val, &span->default_caller_data.bearer_layer1);
|
||||
} else if (!strcasecmp(var, "channel-restart-on-link-up")) {
|
||||
if (!strcasecmp(val, "yes")) {
|
||||
signal_data->restart_opt = SNGISDN_OPT_TRUE;
|
||||
} else if (!strcasecmp(val, "no")) {
|
||||
signal_data->restart_opt = SNGISDN_OPT_FALSE;
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Invalid value for parameter:%s:%s\n", var, val);
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "local-number")) {
|
||||
if (add_local_number(val, span) != FTDM_SUCCESS) {
|
||||
return FTDM_FAIL;
|
||||
|
|
|
@ -701,7 +701,16 @@ ftdm_status_t sng_isdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
|||
cfg.t.cfg.s.inDLSAP.statEnqOpt = FALSE;
|
||||
cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Override the restart options if user selected that option */
|
||||
if (signal_data->restart_opt != SNGISDN_OPT_DEFAULT) {
|
||||
if (signal_data->restart_opt == SNGISDN_OPT_TRUE) {
|
||||
cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;
|
||||
} else {
|
||||
cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < IN_MAXBCHNL; i++)
|
||||
{
|
||||
cfg.t.cfg.s.inDLSAP.bProf[i].profNmb = 0;
|
||||
|
|
Loading…
Reference in New Issue