freetdm: ISDN allow change state from PROCEED to UP
This commit is contained in:
parent
535a578ef6
commit
39155c614c
|
@ -2078,6 +2078,11 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_answer(const char *file, const char
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* DAVIDY - We will fail RFC's if we do that, but some modules apart from ftmod_sangoma_isdn
|
||||||
|
* expect the call to always to go PROGRESS and PROGRESS MEDIA state before going to UP, so
|
||||||
|
* remove this only in netborder branch for now */
|
||||||
|
|
||||||
if (ftdmchan->state < FTDM_CHANNEL_STATE_PROGRESS) {
|
if (ftdmchan->state < FTDM_CHANNEL_STATE_PROGRESS) {
|
||||||
ftdm_channel_set_state(file, func, line, ftdmchan, FTDM_CHANNEL_STATE_PROGRESS, 1);
|
ftdm_channel_set_state(file, func, line, ftdmchan, FTDM_CHANNEL_STATE_PROGRESS, 1);
|
||||||
}
|
}
|
||||||
|
@ -2097,7 +2102,7 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_answer(const char *file, const char
|
||||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Ignoring answer because the call has moved to TERMINATING while we're moving to UP\n");
|
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Ignoring answer because the call has moved to TERMINATING while we're moving to UP\n");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ftdm_channel_set_state(file, func, line, ftdmchan, FTDM_CHANNEL_STATE_UP, 1);
|
ftdm_channel_set_state(file, func, line, ftdmchan, FTDM_CHANNEL_STATE_UP, 1);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -121,7 +121,8 @@ ftdm_state_map_t sangoma_isdn_state_map = {
|
||||||
ZSD_INBOUND,
|
ZSD_INBOUND,
|
||||||
ZSM_UNACCEPTABLE,
|
ZSM_UNACCEPTABLE,
|
||||||
{FTDM_CHANNEL_STATE_PROCEED, FTDM_END},
|
{FTDM_CHANNEL_STATE_PROCEED, FTDM_END},
|
||||||
{FTDM_CHANNEL_STATE_TERMINATING, FTDM_CHANNEL_STATE_HANGUP, FTDM_CHANNEL_STATE_RINGING, FTDM_CHANNEL_STATE_PROGRESS, FTDM_CHANNEL_STATE_PROGRESS_MEDIA,FTDM_END}
|
{FTDM_CHANNEL_STATE_TERMINATING, FTDM_CHANNEL_STATE_HANGUP, FTDM_CHANNEL_STATE_RINGING, FTDM_CHANNEL_STATE_PROGRESS, FTDM_CHANNEL_STATE_PROGRESS_MEDIA,
|
||||||
|
FTDM_CHANNEL_STATE_UP, FTDM_END}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ZSD_INBOUND,
|
ZSD_INBOUND,
|
||||||
|
|
|
@ -377,18 +377,17 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)
|
||||||
|
|
||||||
switch(ftdmchan->state) {
|
switch(ftdmchan->state) {
|
||||||
case FTDM_CHANNEL_STATE_DIALING:
|
case FTDM_CHANNEL_STATE_DIALING:
|
||||||
if (evntType == MI_CALLPROC) {
|
if (cnStEvnt->progInd.eh.pres && cnStEvnt->progInd.progDesc.val == IN_PD_IBAVAIL) {
|
||||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROCEED);
|
|
||||||
} else if (evntType == MI_PROGRESS ||
|
|
||||||
(cnStEvnt->progInd.eh.pres && cnStEvnt->progInd.progDesc.val == IN_PD_IBAVAIL)) {
|
|
||||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
|
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
|
||||||
|
} else if (evntType == MI_CALLPROC) {
|
||||||
|
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROCEED);
|
||||||
} else {
|
} else {
|
||||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS);
|
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case FTDM_CHANNEL_STATE_PROCEED:
|
||||||
case FTDM_CHANNEL_STATE_PROGRESS:
|
case FTDM_CHANNEL_STATE_PROGRESS:
|
||||||
if (evntType == MI_PROGRESS ||
|
if (cnStEvnt->progInd.eh.pres && cnStEvnt->progInd.progDesc.val == IN_PD_IBAVAIL) {
|
||||||
(cnStEvnt->progInd.eh.pres && cnStEvnt->progInd.progDesc.val == IN_PD_IBAVAIL)) {
|
|
||||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
|
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue