[asterisk-commits] mmichelson: branch mmichelson/sip_options r394019 - in /team/mmichelson/sip_o...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 10 16:36:06 CDT 2013
Author: mmichelson
Date: Wed Jul 10 16:36:05 2013
New Revision: 394019
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394019
Log:
Add compactheaders support and documentation for "system" options.
Modified:
team/mmichelson/sip_options/res/res_sip.c
team/mmichelson/sip_options/res/res_sip/config_system.c
Modified: team/mmichelson/sip_options/res/res_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_options/res/res_sip.c?view=diff&rev=394019&r1=394018&r2=394019
==============================================================================
--- team/mmichelson/sip_options/res/res_sip.c (original)
+++ team/mmichelson/sip_options/res/res_sip.c Wed Jul 10 16:36:05 2013
@@ -749,6 +749,35 @@
</para></description>
</configOption>
</configObject>
+ <configObject name="system">
+ <synopsis>Options that apply to the SIP stack as well as other system-wide settings</synopsis>
+ <description><para>
+ The settings in this section are global. In addition to being global, the values will
+ not be re-evaluated when a reload is performed. This is because the values must be set
+ before the SIP stack is initialized. The only way to reset these values is to either
+ restart Asterisk, or unload res_sip.so and then load it again.
+ </para></description>
+ <configOption name="timert1" default="500">
+ <synopsis>Set transaction timer T1 value (milliseconds).</synopsis>
+ <description><para>
+ Timer T1 is the base for determining how long to wait before retransmitting
+ requests that receive no response when using an unreliable transport (e.g. UDP).
+ For more information on this timer, see RFC 3261, Section 17.1.1.1.
+ </para></description>
+ </configOption>
+ <configOption name="timerb" default="32000">
+ <synopsis>Set transaction timer B value (milliseconds).</synopsis>
+ <description><para>
+ Timer B determines the maximum amount of time to wait after sending an INVITE
+ request before terminating the transaction. It is recommended that this be set
+ to 64 * Timer T1, but it may be set higher if desired. For more information on
+ this timer, see RFC 3261, Section 17.1.1.1.
+ </para></description>
+ </configOption>
+ <configOption name="compactheaders" default="no">
+ <synopsis>Use the short forms of common SIP header names.</synopsis>
+ </configOption>
+ </configObject>
</configFile>
</configInfo>
***/
Modified: team/mmichelson/sip_options/res/res_sip/config_system.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_options/res/res_sip/config_system.c?view=diff&rev=394019&r1=394018&r2=394019
==============================================================================
--- team/mmichelson/sip_options/res/res_sip/config_system.c (original)
+++ team/mmichelson/sip_options/res/res_sip/config_system.c Wed Jul 10 16:36:05 2013
@@ -32,6 +32,7 @@
SORCERY_OBJECT(details);
int timert1;
int timerb;
+ int compactheaders;
};
static struct ast_sorcery *system_sorcery;
@@ -67,6 +68,11 @@
pjsip_cfg()->tsx.t1 = system->timert1;
pjsip_cfg()->tsx.td = system->timerb;
+ if (system->compactheaders) {
+ extern pj_bool_t pjsip_use_compact_form;
+ pjsip_use_compact_form = PJ_TRUE;
+ }
+
return 0;
}
@@ -93,6 +99,8 @@
OPT_UINT_T, 0, FLDSET(struct system_config, timert1));
ast_sorcery_object_field_register(system_sorcery, "system", "timerb", __stringify(DEFAULT_TIMER_B),
OPT_UINT_T, 0, FLDSET(struct system_config, timerb));
+ ast_sorcery_object_field_register(system_sorcery, "system", "compactheaders", "no",
+ OPT_BOOL_T, 1, FLDSET(struct system_config, compactheaders));
ast_sorcery_load(system_sorcery);
More information about the asterisk-commits
mailing list