[Asterisk-code-review] contrib/thirdparty/sip to pjsip: add additional flag mappings (asterisk[13])
Jenkins2
asteriskteam at digium.com
Tue Oct 10 12:24:38 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6643 )
Change subject: contrib/thirdparty/sip_to_pjsip: add additional flag mappings
......................................................................
contrib/thirdparty/sip_to_pjsip: add additional flag mappings
add mappings for udptl redundancy, rtptimeout, and debug flags
Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a
---
M contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
1 file changed, 30 insertions(+), 0 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
index 98a5e95..eb3aab3 100755
--- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
@@ -116,6 +116,27 @@
set_value(key, 'none', section, pjsip, nmapped)
+def setup_udptl(section, pjsip, nmapped):
+ """Sets values from udptl into the appropriate pjsip.conf options."""
+ try:
+ val = sip.get(section, 't38pt_udptl')[0]
+ except LookupError:
+ try:
+ val = sip.get('general', 't38pt_udptl')[0]
+ except LookupError:
+ return
+
+ ec = 'none'
+ if 'yes' in val:
+ set_value('t38_udptl', 'yes', section, pjsip, nmapped)
+ if 'no' in val:
+ set_value('t38_udptl', 'no', section, pjsip, nmapped)
+ if 'redundancy' in val:
+ ec = 'redundancy'
+ if 'fec' in val:
+ ec = 'fec'
+ set_value('t38_udptl_ec', ec, section, pjsip, nmapped)
+
def from_nat(key, val, section, pjsip, nmapped):
"""Sets values from nat into the appropriate pjsip.conf options."""
# nat from sip.conf can be comma separated list of values:
@@ -387,6 +408,7 @@
['allow', merge_value],
['nat', from_nat], # rtp_symmetric, force_rport,
# rewrite_contact
+ ['rtptimeout', set_value('rtp_timeout')],
['icesupport', set_value('ice_support')],
['autoframing', set_value('use_ptime')],
['outboundproxy', set_value('outbound_proxy')],
@@ -1068,6 +1090,7 @@
except LookupError:
pass # key not found in sip.conf
+ setup_udptl(section, pjsip, nmapped)
def find_non_mapped(sections, nmapped):
"""
@@ -1101,6 +1124,13 @@
except LookupError:
pass
+
+ try:
+ sipdebug = sip.get('general', 'sipdebug')[0]
+ set_value('debug', sipdebug, 'global', pjsip, nmapped, 'global')
+ except LookupError:
+ pass
+
try:
useroption_parsing = sip.get('general', 'legacy_useroption_parsing')[0]
set_value('ignore_uri_user_options', useroption_parsing, 'global', pjsip, nmapped, 'global')
--
To view, visit https://gerrit.asterisk.org/6643
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a
Gerrit-Change-Number: 6643
Gerrit-PatchSet: 3
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171010/838766f4/attachment.html>
More information about the asterisk-code-review
mailing list