[asterisk-dev] [Code Review] 2671: Add a slew of options from sip.conf to res_sip.conf

svnbot reviewboard at asterisk.org
Thu Jul 18 14:25:53 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2671/
-----------------------------------------------------------

(Updated July 18, 2013, 2:25 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers and Joshua Colp.


Changes
-------

Committed in revision 394759


Bugs: ASTERISK-21506
    https://issues.asterisk.org/jira/browse/ASTERISK-21506


Repository: Asterisk


Description
-------

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.

For endpoints:
*sdpowner
*sdpsession
*fromuser
*fromdomain
*mwifromuser (from_mwi in sip.conf)
*allowtransfer
*recordonfeature
*recordofffeature
*tos_audio
*tos_video
*cos_audio
*cos_video
*subminexpiry
*language
*tonezone
*rtpengine
*allowsubscribe

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.

For transports:
*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.

System options:
*timert1
*timerb

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.

Global options:
*useragent
*maxforwards

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.


Diffs
-----

  /trunk/channels/chan_gulp.c 394102 
  /trunk/include/asterisk/res_sip.h 394102 
  /trunk/res/res_sip.c 394102 
  /trunk/res/res_sip.exports.in 394102 
  /trunk/res/res_sip/config_global.c PRE-CREATION 
  /trunk/res/res_sip/config_system.c PRE-CREATION 
  /trunk/res/res_sip/config_transport.c 394102 
  /trunk/res/res_sip/include/res_sip_private.h 394102 
  /trunk/res/res_sip/sip_configuration.c 394102 
  /trunk/res/res_sip_caller_id.c 394102 
  /trunk/res/res_sip_mwi.c 394102 
  /trunk/res/res_sip_one_touch_record_info.c 394102 
  /trunk/res/res_sip_pubsub.c 394102 
  /trunk/res/res_sip_refer.c 394102 
  /trunk/res/res_sip_sdp_rtp.c 394102 
  /trunk/res/res_sip_session.c 394102 

Diff: https://reviewboard.asterisk.org/r/2671/diff/


Testing
-------

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.


Thanks,

Mark Michelson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130718/1f67b901/attachment.htm>


More information about the asterisk-dev mailing list