From: Moises Silva Date: Tue, 31 Jan 2012 20:18:53 +0000 (-0500) Subject: freetdm: Fix bug in SS7 state processing introduced during the changes X-Git-Tag: v1.2.3^2~71^2^2~217^2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cca407d09a1dbddfa876497ac9f3c172e2eac92b;p=thirdparty%2Ffreeswitch.git freetdm: Fix bug in SS7 state processing introduced during the changes for native bridging that caused infinite SUSPEND state executions due to peer member not being cleared at the end of the call --- diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c index 20b2199f21..fa36c7280a 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c @@ -1049,14 +1049,14 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t *ftdmchan) sngss7_info->ckt_flags, sngss7_info->blk_flags); - if (ftdmchan->state == FTDM_CHANNEL_STATE_DIALING) { + if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_NATIVE_SIGBRIDGE)) { + /* DIALING is the only state we process normally when doing an outgoing call that is natively bridged */ + if (ftdmchan->state != FTDM_CHANNEL_STATE_DIALING) { + return ftdm_sangoma_ss7_native_bridge_state_change(ftdmchan); + } sngss7_info->peer_data = NULL; } - if (sngss7_info->peer_data) { - return ftdm_sangoma_ss7_native_bridge_state_change(ftdmchan); - } - /*check what state we are supposed to be in */ switch (ftdmchan->state) { /**************************************************************************/