]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fixed following two secnarios
authorJames Zhang <jzhang@sangoma.com>
Thu, 1 Dec 2011 01:02:25 +0000 (20:02 -0500)
committerJames Zhang <jzhang@sangoma.com>
Thu, 1 Dec 2011 01:02:25 +0000 (20:02 -0500)
From previous commit, failed to clear the done flag _DN
which cause SUSPEND to think that there was a block
pending, causing state to remain in RESTART

S UP -> relay down -> Tx AIS -> relay up -> Tx AIS off
  -> confirm all back up
  -> In this condition BLO will not go out due to PAUSE

S UP -> Tx AIS -> relay down -> Tx AIS off -> relay up
  -> confirm all back up
  -> In this condition UBL will not go out due to PAUSE

libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c

index 64c4c9252de24dbc030830ec61f8ca84b8295027..e7cc9db5738a3b98b3fd25b57b77f19fac35c5b4 100644 (file)
@@ -122,8 +122,11 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
 
                /* as per Q.764, 2.8.2.3 xiv ... remove the block from this channel */
                sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX);
+               sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN);
                sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_GRP_HW_BLOCK_RX);
+               sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_GRP_HW_BLOCK_RX_DN);
                sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_GRP_MN_BLOCK_RX);
+               sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_GRP_MN_BLOCK_RX_DN);
 
                /* KONRAD FIX ME : check in case there is a ckt and grp block */
        }
@@ -1646,7 +1649,6 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
        /* check if the circuit is already blocked or not */
        if (sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX)) {
                SS7_WARN("Received BLO on circuit that is already blocked!\n");
-               sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN);
        }
 
        /* throw the ckt block flag */
index 7a68fe318f3cd21ea39ecd76a3b91b6ef579e2e5..eb1eb129610b55b44086ec731939ca71793d27ae 100644 (file)
@@ -2234,12 +2234,14 @@ ftdm_status_t check_for_reconfig_flag(ftdm_span_t *ftdmspan)
 
                                        /* Only locally blocked, thus remove a remote block */
                                        sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX);
+                                       sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN);
 
                                        break;
                                /**************************************************************************/
                                case (2):
                                        /* remotely blocked */
                                        sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX);
+                                       sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN);
 
                                        /* set the channel to suspended state */
                                        SS7_STATE_CHANGE(ftdmchan, FTDM_CHANNEL_STATE_SUSPENDED);
@@ -2247,8 +2249,11 @@ ftdm_status_t check_for_reconfig_flag(ftdm_span_t *ftdmspan)
                                /**************************************************************************/
                                case (3):
                                        /* both locally and remotely blocked */
-                                       sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_UNBLK_TX);
+                                       if (!sngss7_test_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_TX)) {
+                                               sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_UNBLK_TX);
+                                       }
                                        sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX);
+                                       sngss7_set_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN);
 
                                        /* set the channel to suspended state */
                                        SS7_STATE_CHANGE(ftdmchan, FTDM_CHANNEL_STATE_SUSPENDED);