From 866d98f58677566d65ac30f0bd8fb483a8f89c3a Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Fri, 4 Dec 2009 19:57:50 +0000 Subject: [PATCH] set sip_copy_custom_headers=false to avoid custom sip headers to be copied on the b-leg git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15789 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 6b9f1380e5..496c455565 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -3159,7 +3159,9 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session switch_ivr_transfer_variable(session, nsession, SOFIA_REPLACES_HEADER); switch_ivr_transfer_variable(session, nsession, "sip_auto_answer"); - switch_ivr_transfer_variable(session, nsession, SOFIA_SIP_HEADER_PREFIX_T); + if (!(vval = switch_channel_get_variable(o_channel, "sip_copy_custom_headers")) || switch_true(vval)) { + switch_ivr_transfer_variable(session, nsession, SOFIA_SIP_HEADER_PREFIX_T); + } switch_ivr_transfer_variable(session, nsession, "sip_video_fmtp"); switch_ivr_transfer_variable(session, nsession, "sip-force-contact"); switch_ivr_transfer_variable(session, nsession, "sip_sticky_contact");