]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODENDP-246, with a few changes.
authorBrian West <brian@freeswitch.org>
Mon, 31 Aug 2009 14:33:41 +0000 (14:33 +0000)
committerBrian West <brian@freeswitch.org>
Mon, 31 Aug 2009 14:33:41 +0000 (14:33 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14698 d0543943-73ff-0310-b7d9-9358b9ac24b2

conf/sip_profiles/internal.xml
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index 061623d2d84bb76229558ed0e9ef007a536a03a1..d0a41a5524f0effa3653d5c227df65c2b558caf2 100644 (file)
@@ -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 
     -->
index 9efac068905571940f8f63afb395da3751b7c89a..8374337f5d34beb3996646fbfffa00b134c45360 100644 (file)
@@ -111,7 +111,7 @@ typedef struct private_object private_object_t;
 #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,
@@ -193,6 +193,7 @@ typedef enum {
        PFLAG_RTP_AUTOFLUSH_DURING_BRIDGE,
        PFLAG_MANUAL_REDIRECT,
        PFLAG_AUTO_NAT,
+       PFLAG_SIPCOMPACT,
        /* No new flags below this line */
        PFLAG_MAX
 } PFLAGS;
index 80bbebaf7d177f9d7f317224ce6f0a80579924fe..f5d29b6464eed0469acbf2defced7d51bc10174d 100644 (file)
@@ -861,6 +861,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
                                                          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 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                                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;