]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: Fix bug in SS7 state processing introduced during the changes
authorMoises Silva <moy@sangoma.com>
Tue, 31 Jan 2012 20:18:53 +0000 (15:18 -0500)
committerJames Zhang <jzhang@sangoma.com>
Tue, 31 Jan 2012 20:18:53 +0000 (15:18 -0500)
         for native bridging that caused infinite SUSPEND state executions
         due to peer member not being cleared at the end of the call

libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c

index 20b2199f211c94ec5f2a21f75143c87de221e875..fa36c7280a54e770905116f86c3cf0485a101f2c 100644 (file)
@@ -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) {
        /**************************************************************************/