[asterisk-dev] [Code Review] 2671: Add a slew of options from sip.conf to res_sip.conf
reviewboard at asterisk.org
Fri Jul 12 17:16:07 CDT 2013
This is an automatically generated e-mail. To reply, visit:
Review request for Asterisk Developers and Joshua Colp.
This adds a boatload of new options to res_sip.conf. Here is a list of them by category. Most option names are the same as they were in sip.conf. Any differences will be noted.
*mwifromuser (from_mwi in sip.conf)
These options have the same semantics as their sip.conf counterparts. You may notice that I have the subminexpiry option listed, but I do not have a submaxexpiry option listed. This is because I could not find a way to implement this given PJSIP's event subscription API. I kept all option names the same except for mwifromuser. I changed to this because I thought it fit better with the other from* options.
*tos (tos_sip from sip.conf)
*cos (cos_sip from sip.conf)
Since we have individual transports, it makes sense to have separate tos and cos options for each transport. Right now, UDP, TCP, and TLS transports all support these settings, but websockets currently do not.
Two new categories have been added in this review. The "system" type is used for options that apply to the SIP stack and cannot be changed once the SIP stack is initialized. The "global" type is used for options that apply within Asterisk and can be changed with a reload.
In order to implement system options, I created a config_system.c file that handles this section. Since these options are not reloadable, this file uses a completely separate sorcery instance from the rest of SIP configuration.
In order to implement global options, I created a config_global.c file that handles this section. Since these are reloadable, I used the same sorcery instance as the rest of the SIP configuration. For now, the object type created in this file is not public because it doesn't have to be. It may be wise to eventually make this public, depending on what sort of options end up here.
In addition to the above mentioned options, I made an attempt to implement the preferred_codec_only option for endpoints. However, my investigation of this leads me to believe that we may have issues with regards to codec negotiation. See https://issues.asterisk.org/jira/browse/ASTERISK-22070 for more details.
As I implemented each option, I tested that their defaults worked as expected and that setting the option did what was expected. The only features I did not test were the recordonfeature and recordofffeature options. SIPp testing in the testsuite will eventually bear this out.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-dev