<p>Torrey Searle has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6643">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">contrib/thirdparty/sip_to_pjsip: add additional flag mappings<br><br>add mappings for udptl redundancy, rtptimeout, and debug flags<br><br>Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a<br>---<br>M contrib/scripts/sip_to_pjsip/sip_to_pjsip.py<br>1 file changed, 32 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/43/6643/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py<br>index 98a5e95..6d41caa 100755<br>--- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py<br>+++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py<br>@@ -116,6 +116,29 @@<br> set_value(key, 'none', section, pjsip, nmapped)<br> <br> <br>+def setup_udptl(section, pjsip, nmapped):<br>+ """Sets values from nat into the appropriate pjsip.conf options."""<br>+ # nat from sip.conf can be comma separated list of values:<br>+ # yes/no, [auto_]force_rport, [auto_]comedia<br>+ try:<br>+ val = sip.get(section, 't38pt_udptl')[0]<br>+ except LookupError:<br>+ try:<br>+ val = sip.get('general', 't38pt_udptl')[0]<br>+ except LookupError:<br>+ return<br>+<br>+ ec = 'none'<br>+ if 'yes' in val:<br>+ set_value('t38_udptl', 'yes', section, pjsip, nmapped)<br>+ if 'no' in val:<br>+ set_value('t38_udptl', 'no', section, pjsip, nmapped)<br>+ if 'redundancy' in val:<br>+ ec = 'redundancy'<br>+ if 'fec' in val:<br>+ ec = 'fec'<br>+ set_value('t38_udptl_ec', ec, section, pjsip, nmapped)<br>+<br> def from_nat(key, val, section, pjsip, nmapped):<br> """Sets values from nat into the appropriate pjsip.conf options."""<br> # nat from sip.conf can be comma separated list of values:<br>@@ -387,6 +410,7 @@<br> ['allow', merge_value],<br> ['nat', from_nat], # rtp_symmetric, force_rport,<br> # rewrite_contact<br>+ ['rtptimeout', set_value('rtp_timeout')],<br> ['icesupport', set_value('ice_support')],<br> ['autoframing', set_value('use_ptime')],<br> ['outboundproxy', set_value('outbound_proxy')],<br>@@ -1068,6 +1092,7 @@<br> except LookupError:<br> pass # key not found in sip.conf<br> <br>+ setup_udptl(section, pjsip, nmapped); <br> <br> def find_non_mapped(sections, nmapped):<br> """<br>@@ -1101,6 +1126,13 @@<br> except LookupError:<br> pass<br> <br>+<br>+ try:<br>+ sipdebug = sip.get('general', 'sipdebug')[0]<br>+ set_value('debug', sipdebug, 'global', pjsip, nmapped, 'global')<br>+ except LookupError:<br>+ pass<br>+<br> try:<br> useroption_parsing = sip.get('general', 'legacy_useroption_parsing')[0]<br> set_value('ignore_uri_user_options', useroption_parsing, 'global', pjsip, nmapped, 'global')<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6643">change 6643</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6643"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a </div>
<div style="display:none"> Gerrit-Change-Number: 6643 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>