]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make the disable_tcp_switch PJSIP system object enabled by default.
authorMark Michelson <mmichelson@digium.com>
Wed, 5 Nov 2014 19:52:26 +0000 (19:52 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 5 Nov 2014 19:52:26 +0000 (19:52 +0000)
Testing has shown repeatedly that PJSIP's default behavior of switching
automatically to TCP for large messages can cause issues. The most common
issues are that devices that we are communicating with do not handle the
switch to TCP gracefully, thus causing situations such as broken calls or
broken subscriptions. Now, in order to have this behavior happen, you must
opt into it. The sample file has been updated to warn that enabling the
TCP switch behavior may cause issues for you, so use at your own risk.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@427334 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configs/samples/pjsip.conf.sample
res/res_pjsip.c
res/res_pjsip/config_system.c

index 36807df2d46f287713624774c11236b7fdb264e2..ef26f6eb0dba701cb5b47cc8e59320c1c7d4a572 100644 (file)
                                 ; should be disposed of (default: "60")
 ;threadpool_max_size=0  ; Maximum number of threads in the res_pjsip threadpool
                         ; A value of 0 indicates no maximum (default: "0")
-;disable_tcp_switch=no  ; Disable automatic switching from UDP to TCP transports
+;disable_tcp_switch=yes ; Disable automatic switching from UDP to TCP transports
                         ; if outgoing request is too large.
                         ; See RFC 3261 section 18.1.1.
-                        ; (default: "no")
+                                               ; Disabling this option has been known to cause interoperability
+                                               ; issues, so disable at your own risk.
+                        ; (default: "yes")
 ;type=  ; Must be of type system (default: "")
 
 ;==========================GLOBAL SECTION OPTIONS=========================
index a3e33cbbf3747c52d14b94f680fae490e918ab20..f76d994f7709d2e880a25127bb27689b5206b6ed 100644 (file)
                                        <synopsis>Maximum number of threads in the res_pjsip threadpool.
                                        A value of 0 indicates no maximum.</synopsis>
                                </configOption>
-                               <configOption name="disable_tcp_switch" default="no">
+                               <configOption name="disable_tcp_switch" default="yes">
                                        <synopsis>Disable automatic switching from UDP to TCP transports.</synopsis>
                                        <description><para>
                                                Disable automatic switching from UDP to TCP transports if outgoing
index 4d0ab467b5f5e2fba55a2ef975ceb5ef11085517..a41af90ed2b540cc690ae52ae054d5344192682f 100644 (file)
@@ -147,7 +147,7 @@ int ast_sip_initialize_system(void)
                        OPT_UINT_T, 0, FLDSET(struct system_config, threadpool.idle_timeout));
        ast_sorcery_object_field_register(system_sorcery, "system", "threadpool_max_size", "0",
                        OPT_UINT_T, 0, FLDSET(struct system_config, threadpool.max_size));
-       ast_sorcery_object_field_register(system_sorcery, "system", "disable_tcp_switch", "no",
+       ast_sorcery_object_field_register(system_sorcery, "system", "disable_tcp_switch", "yes",
                        OPT_BOOL_T, 1, FLDSET(struct system_config, disable_tcp_switch));
 
        ast_sorcery_load(system_sorcery);