[Freeswitch-svn] [commit] r9923 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
brian at freeswitch.org
Thu Oct 9 21:06:04 EDT 2008
Author: brian
Date: Thu Oct 9 21:06:03 2008
New Revision: 9923
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
Log:
add sip_via_protocol variable and cleanup code
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Thu Oct 9 21:06:03 2008
@@ -3519,6 +3519,10 @@
switch_channel_set_variable(channel, "sip_received_port", tmp);
}
+ if (sip->sip_via) {
+ switch_channel_set_variable(channel, "sip_via_protocol", sofia_glue_transport2str(sofia_glue_via2transport(sip->sip_via)));
+ }
+
if (*key != '\0') {
tech_pvt->key = switch_core_session_strdup(session, key);
}
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 Thu Oct 9 21:06:03 2008
@@ -676,15 +676,10 @@
sofia_transport_t sofia_glue_via2transport(const sip_via_t *via)
{
char *ptr = NULL;
- int tls = 0;
if (!via || !via->v_protocol)
return SOFIA_TRANSPORT_UNKNOWN;
- if (!strncasecmp(via->v_protocol, "sips", 4)) {
- tls++;
- }
-
if ((ptr = strrchr(via->v_protocol, '/'))) {
ptr++;
More information about the Freeswitch-svn
mailing list