]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODAPP-376
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 8 Dec 2009 00:05:40 +0000 (00:05 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 8 Dec 2009 00:05:40 +0000 (00:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15838 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_ivr_originate.c

index 79b66ff8f989c40fdda3ac91f5242058f34b4cac..ab9e2445010c4dfd2a7c59468970658358b8b2d1 100644 (file)
@@ -3291,6 +3291,10 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
                                        ptime = maxptime;
                                }
 
+                               if (!ptime) {
+                                       ptime = 20;
+                               }
+
                                for (i = first; i < last && i < tech_pvt->num_codecs; i++) {
                                        const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
                                        uint32_t codec_rate = imp->samples_per_second;
index 4e31fce9e7fc711cf1e5467eb6cacf9c57c75493..a259c3fa2b035a7498d9f036e1eaf81e6657f3d1 100644 (file)
@@ -1566,6 +1566,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
        int local_clobber = 0;
        const char *cancel_key = NULL;
        const char *holding = NULL;
+       const char *soft_holding = NULL;
        const char *export_vars = NULL;
 
 
@@ -2638,7 +2639,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                  notready:
 
                        if (caller_channel) {
-                               const char *soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE);
+                               soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE);
                                holding = switch_channel_get_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE);
                                switch_channel_set_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
 
@@ -2757,7 +2758,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                                switch_core_session_rwunlock(peer_session);
                                        }
                                        force_reason = SWITCH_CAUSE_ATTENDED_TRANSFER;
-                               } else {
+                               } else if (zstr(soft_holding)) {
 
                                        if (peer_channel && switch_channel_ready(peer_channel)) {
                                                switch_core_session_t *holding_session;
@@ -2845,9 +2846,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                }
                        }
                        
+
+
                        if (oglobals.idx > IDX_NADA) {
-                               peer_session = originate_status[oglobals.idx].peer_session;
-                               peer_channel = originate_status[oglobals.idx].peer_channel;
+                               if ((peer_session = originate_status[oglobals.idx].peer_session)) {
+                                       peer_channel = switch_core_session_get_channel(originate_status[oglobals.idx].peer_session);
+                               }
                        } else {
                                status = SWITCH_STATUS_FALSE;
                                if (caller_channel && peer_channel) {