]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
conditionally allow intercept of replaced call-id when processing replaces header
authorLuis Azedo <luis@2600hz.com>
Wed, 22 Apr 2015 19:11:12 +0000 (20:11 +0100)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 14 May 2015 22:43:09 +0000 (17:43 -0500)
without this change one leg calls inhaled could not be picked because there is no bridge_uuid.

FS-7463 #resolve

src/mod/endpoints/mod_sofia/sofia.c

index 78d8484bda920677be0f65099125abfbd9eb2e80..7c8c31ff6eb714a7eb8dd5f5a187ee900f9d2e7b 100644 (file)
@@ -9885,11 +9885,13 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
                                                                                                                                                                                   "%sanswer,sofia_sla:%s", codec_str, b_private->uuid);
                                        }
                                } else {
-                                       char* pickup = NULL;
-                                       if(sip->sip_replaces->rq_url->url_params && sip->sip_replaces->rp_call_id) {
-                                               pickup = switch_find_parameter(sip->sip_replaces->rq_url->url_params,"pickup", switch_core_session_get_pool(session));
+                                       char *aleg = NULL;
+
+                                       if (sip->sip_replaces && sip->sip_replaces->rp_params && sip->sip_replaces->rp_call_id) {
+                                               aleg = switch_find_parameter(sip->sip_replaces->rp_params, "a-leg", switch_core_session_get_pool(session));
                                        } 
-                                       if(pickup) {
+
+                                       if (aleg) {
                                                switch_channel_mark_hold(b_channel, SWITCH_FALSE);
                                                tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool, "answer,intercept:%s", sip->sip_replaces->rp_call_id);
                                        } else if (!zstr(bridge_uuid)) {