[Freeswitch-svn] [commit] r10416 - freeswitch/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
anthm at freeswitch.org
Fri Nov 14 18:46:26 PST 2008
Author: anthm
Date: Fri Nov 14 21:46:25 2008
New Revision: 10416
Log:
default call id to match session uuid on outbound calls
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Fri Nov 14 21:46:25 2008
@@ -1188,9 +1188,13 @@
use_from_str = from_str;
from_str = switch_core_session_sprintf(session, "\"%s\" <%s>", tech_pvt->caller_profile->caller_id_name, use_from_str);
-
+ if (!(call_id = switch_channel_get_variable(channel, "sip_outgoing_call_id"))) {
+ call_id = switch_core_session_get_uuid(session);
+ }
+
tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,
NUTAG_URL(url_str),
+ TAG_IF(call_id, SIPTAG_CALL_ID_STR(call_id)),
SIPTAG_TO_STR(to_str),
SIPTAG_FROM_STR(from_str),
SIPTAG_CONTACT_STR(invite_contact),
@@ -1301,8 +1305,6 @@
sofia_glue_tech_patch_sdp(tech_pvt);
}
- call_id = switch_channel_get_variable(channel, "sip_outgoing_call_id");
-
if (tech_pvt->dest && (route = strstr(tech_pvt->dest, ";fs_path="))) {
char *p;
@@ -1341,7 +1343,6 @@
TAG_IF(!switch_strlen_zero(alert_info), SIPTAG_HEADER_STR(alert_info)),
TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)),
- TAG_IF(call_id, SIPTAG_CALL_ID_STR(call_id)),
TAG_IF(route_uri, NUTAG_PROXY(route_uri)),
TAG_IF(route, SIPTAG_ROUTE_STR(route)),
SOATAG_ADDRESS(tech_pvt->adv_sdp_audio_ip),
More information about the Freeswitch-svn
mailing list