]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6321 --resolve
authorBrian West <brian@freeswitch.org>
Fri, 7 Mar 2014 18:56:00 +0000 (12:56 -0600)
committerBrian West <brian@freeswitch.org>
Fri, 7 Mar 2014 18:56:58 +0000 (12:56 -0600)
Copy URI params from Refer-To header into custom header in subsequent INVITE

sip_h_X-FS-Refer-Params is set to show up in the INVITE as X-FS-Refer-Params

src/mod/endpoints/mod_sofia/sofia.c

index 8344a842b17d0fbdd7adf24eba425b88fe040202..413fe83d15613bc42fe1d48a0c66862bab4c59dd 100644 (file)
@@ -7702,6 +7702,10 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
                                                   SIPTAG_SUBSCRIPTION_STATE_STR("terminated;reason=noresource"),
                                                   SIPTAG_PAYLOAD_STR("SIP/2.0 200 OK\r\n"), SIPTAG_EVENT_STR(etmp), TAG_END());
                        }
+            
+            if (refer_to->r_url->url_params) {
+                switch_channel_set_variable(b_channel, "sip_h_X-FS-Refer-Params", refer_to->r_url->url_params);
+            }
 
                        switch_ivr_session_transfer(b_session, exten, NULL, NULL);
                        switch_core_session_rwunlock(b_session);