Revision
14698
Author
brian
Date
2009-08-31 09:33:41 -0500 (Mon, 31 Aug 2009)

Log Message

 MODENDP-246, with a few changes.

Modified Paths

Diff

Modified: freeswitch/trunk/conf/sip_profiles/internal.xml (14697 => 14698)


--- freeswitch/trunk/conf/sip_profiles/internal.xml	2009-08-31 12:09:54 UTC (rev 14697)
+++ freeswitch/trunk/conf/sip_profiles/internal.xml	2009-08-31 14:33:41 UTC (rev 14698)
@@ -60,6 +60,8 @@
 	It is not recommended to enable 100rel at this time.
     -->
     <!--<param name="enable-100rel" value="true"/>-->
+    <!-- Enable Compact SIP headers. -->
+    <!--<param name="enable-compact-headers" value="true"/>-->
     <!--
 	enable/disable session timers 
     -->

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (14697 => 14698)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	2009-08-31 12:09:54 UTC (rev 14697)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	2009-08-31 14:33:41 UTC (rev 14698)
@@ -111,8 +111,8 @@
 #include "sofia-sip/msg_parser.h"
 #include "sofia-sip/sip_parser.h"
 #include "sofia-sip/tport_tag.h"
+#include <sofia-sip/msg.h>
 
-
 typedef enum {
 	DTMF_2833,
 	DTMF_INFO,
@@ -193,6 +193,7 @@
 	PFLAG_RTP_AUTOFLUSH_DURING_BRIDGE,
 	PFLAG_MANUAL_REDIRECT,
 	PFLAG_AUTO_NAT,
+	PFLAG_SIPCOMPACT,
 	/* No new flags below this line */
 	PFLAG_MAX
 } PFLAGS;

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (14697 => 14698)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-08-31 12:09:54 UTC (rev 14697)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-08-31 14:33:41 UTC (rev 14698)
@@ -861,6 +861,7 @@
 							  NTATAG_DEFAULT_PROXY(profile->outbound_proxy),
 							  NTATAG_SERVER_RPORT(profile->rport_level),
 							  TPTAG_LOG(sofia_test_flag(profile, TFLAG_TPORT_LOG)), 
+ 							  TAG_IF(sofia_test_pflag(profile, PFLAG_SIPCOMPACT), NTATAG_SIPFLAGS(MSG_DO_COMPACT)),
 							  TAG_IF(profile->timer_t1, NTATAG_SIP_T1(profile->timer_t1)),
 							  TAG_IF(profile->timer_t1x64, NTATAG_SIP_T1X64(profile->timer_t1x64)),
 							  TAG_IF(profile->timer_t2, NTATAG_SIP_T2(profile->timer_t2)),
@@ -2523,6 +2524,10 @@
 						if (switch_true(val)) {
 							sofia_clear_pflag(profile, PFLAG_DISABLE_100REL);
 						}
+					} else if (!strcasecmp(var, "enable-compact-headers")) {
+						if (switch_true(val)) {
+							sofia_set_pflag(profile, PFLAG_SIPCOMPACT);
+						}
 					} else if (!strcasecmp(var, "bitpacking")) {
 						if (!strcasecmp(val, "aal2")) {
 							profile->codec_flags = SWITCH_CODEC_FLAG_AAL2;