]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Merge branch 'releases.3.4' into releases.3.5
authorDavid Yat Sin <dyatsin@sangoma.com>
Thu, 26 Apr 2012 20:13:26 +0000 (16:13 -0400)
committerDavid Yat Sin <dyatsin@sangoma.com>
Thu, 26 Apr 2012 20:13:26 +0000 (16:13 -0400)
Conflicts:
libs/freetdm/mod_freetdm/mod_freetdm.c
libs/freetdm/src/ftdm_state.c
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c

1  2 
libs/freetdm/mod_freetdm/mod_freetdm.c
libs/freetdm/src/ftdm_io.c
libs/freetdm/src/ftdm_state.c
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c

index 1c39703182e2e2c3644feb439d3a3e05bceb8285,6a32098b44a2883e6f8f764462848e4d53c74ccb..b6a6f49ca1c02c41b1a37f006e82fb5e944b5345
@@@ -1474,8 -1414,9 +1474,8 @@@ static switch_call_cause_t channel_outg
                sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-LOC-NADI");
                if (sipvar) {
                        ftdm_usrmsg_add_var(&usrmsg, "ss7_loc_nadi", sipvar);
-               }   
+               }
  
 -
                sipvar = switch_channel_get_variable(channel, "sip_h_X-FreeTDM-DNIS-TON");
                if (sipvar) {
                        caller_data.dnis.type = (uint8_t)atoi(sipvar);
@@@ -2043,6 -1988,7 +2042,7 @@@ ftdm_status_t ftdm_channel_from_event(f
                if (!ftdm_strlen_zero(var_value)) {
                        switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-OCN", "%s", var_value);
                }
 -
++              
                var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_ocn_nadi");
                if (!ftdm_strlen_zero(var_value)) {
                        switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-OCN-NADI", "%s", var_value);
Simple merge
index bd670d00626bce6da6e4213c18265c0bb97961ec,c6d45c3c3c3690dbb7bc806b3637cad34f7fc5d5..e5aba9d408a5bbd93737c33c9872e6c6400a683d
@@@ -48,17 -48,16 +48,17 @@@ FT_DECLARE(ftdm_status_t) _ftdm_channel
        ftdm_time_t diff = 0;
        ftdm_channel_state_t state = fchan->state;
  
  #if 0
 -      /* I could not perform this sanity check without more disruptive changes. Ideally we should check here if the signaling module completing the state
 -       executed a state processor (called ftdm_channel_advance_states() which call fchan->span->state_processor(fchan)) for the state. That is just a 
 -         sanity check, as in the past we had at least one bug where the signaling module set the state and then accidentally changed the state to a new one 
 -         without calling ftdm_channel_advance_states(), meaning the state processor for the first state was not executed and that lead to unexpected behavior.
 +      /*  I could not perform this sanity check without more disruptive changes. Ideally we should check here if the signaling module completing the state
 +              executed a state processor (called ftdm_channel_advance_states() which call fchan->span->state_processor(fchan)) for the state. That is just a 
 +              sanity check, as in the past we had at least one bug where the signaling module set the state and then accidentally changed the state to a new one 
 +              without calling ftdm_channel_advance_states(), meaning the state processor for the first state was not executed and that lead to unexpected behavior.
 +
 +              If we want to be able to perform this kind of sanity check it would be nice to add a new state status (FTDM_STATE_STATUS_PROCESSING), the function
 +              ftdm_channel_advance_states() would set the state_status to PROCESSING and then the check below for STATUS_NEW would be valid. Currently is not
 +              valid because the signaling module may be completing the state at the end of the state_processor callback and therefore the state will still be
 +              in STATUS_NEW, and is perfectly valid ... */
 -         If we want to be able to perform this kind of sanity check it would be nice to add a new state status (FTDM_STATE_STATUS_PROCESSING), the function
 -         ftdm_channel_advance_states() would set the state_status to PROCESSING and then the check below for STATUS_NEW would be valid. Currently is not
 -         valid because the signaling module may be completing the state at the end of the state_processor callback and therefore the state will still be
 -         in STATUS_NEW, and is perfectly valid ... */
        if (fchan->state_status == FTDM_STATE_STATUS_NEW) {
                ftdm_log_chan_ex(fchan, file, func, line, FTDM_LOG_LEVEL_CRIT, 
                                                "Asking to complete state change from %s to %s in %llums, but the state is still unprocessed (this might be a bug!)\n", 
index f48d25ce3cd096c14e7243db1d5ecc539030bc13,d0d6c32867339934403d95ab99691461245e18ea..4e0a20d5f31dc314b1e9b5d07e7b2b51f86c5829
@@@ -2472,6 -2511,7 +2510,8 @@@ ftdm_status_t handle_cgb_req(uint32_t s
  
                                /* bring the sig status down */
                                sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_DOWN);
++                              
+                               ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_SUSPENDED);
  
                                /* unlock the channel again before we exit */
                                ftdm_mutex_unlock(ftdmchan->mutex);
@@@ -2589,8 -2629,8 +2629,7 @@@ ftdm_status_t handle_cgu_req(uint32_t s
        while( x < loop_range ) {
                if (g_ftdm_sngss7_data.cfg.isupCkt[x].type != SNG_CKT_VOICE)  {
                        loop_range++;
--              }
--              else {
++              } else {
                        if (extract_chan_data(x, &sngss7_info, &ftdmchan)) {
                                SS7_ERROR("Failed to extract channel data for circuit = %d!\n", x);
                        }
index 724fee25b9bb4acb1019556fd11df3bbc6c76707,ee726911af7e996c841f44b428c1bae7e1cd9fc2..f64356dd1f262c8158f90b5c0da8d3cb501cd3e7
@@@ -508,6 -510,14 +510,14 @@@ static int ftmod_ss7_parse_sng_gen(ftdm
                        ftmod_ss7_set_glare_resolution (parm->val);
                        SS7_DEBUG("Found glare resolution configuration = %d  %s\n", g_ftdm_sngss7_data.cfg.glareResolution, parm->val );
                }
 -                      if (!strcasecmp(parm->val, "true")) {
+               else if (!strcasecmp(parm->var, "force-inr")) {
++                      if (ftdm_true(parm->val)) {
+                               g_ftdm_sngss7_data.cfg.force_inr = 1;
+                       } else {
+                               g_ftdm_sngss7_data.cfg.force_inr = 0;
+                       }
+                       SS7_DEBUG("Found INR force configuration = %s\n", parm->val );
+               }
                else {
                        SS7_ERROR("Found an invalid parameter \"%s\"!\n", parm->val);
                        return FTDM_FAIL;
@@@ -2004,7 -2014,7 +2014,6 @@@ static int ftmod_ss7_parse_cc_span(ftdm
                        flag_loc_nadi = 1;
                        sng_ccSpan.loc_nadi = atoi(parm->val);
                        SS7_DEBUG("Found default LOC_NADI parm->value = %d\n", sng_ccSpan.loc_nadi);
-       
 -              
                /**********************************************************************/
                } else if (!strcasecmp(parm->var, "lpa_on_cot")) {
                /**********************************************************************/