diff --git a/conf/sip_profiles/internal.xml b/conf/sip_profiles/internal.xml
index 061623d2d8..d0a41a5524 100644
--- a/conf/sip_profiles/internal.xml
+++ b/conf/sip_profiles/internal.xml
@@ -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 
     -->
diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h
index 9efac06890..8374337f5d 100644
--- a/src/mod/endpoints/mod_sofia/mod_sofia.h
+++ b/src/mod/endpoints/mod_sofia/mod_sofia.h
@@ -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;
diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c
index 80bbebaf7d..f5d29b6464 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -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;