]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
sip_to_pjsip: Fix missing cases
authorNaveen Albert <asterisk@phreaknet.org>
Wed, 2 Jun 2021 13:11:24 +0000 (09:11 -0400)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 8 Jun 2021 20:17:04 +0000 (15:17 -0500)
Adds the "auto" case which is valid with
both chan_sip dtmfmode and chan_pjsip's
dtmf_mode, adds subscribecontext to
subscribe_context conversion, and accounts
for cipher = ALL being invalid.

ASTERISK-29459

Change-Id: Ie27d6606efad3591038000e5f3c34fa94730f6f2

contrib/scripts/sip_to_pjsip/sip_to_pjsip.py

index e0a5e1981a61444d116d45fefdabd66786cd996e..e7c3d8fa3ff5d6cc183bdd2d4d7d3723c0739392 100755 (executable)
@@ -158,7 +158,7 @@ def set_dtmfmode(key, val, section, pjsip, nmapped):
     """
     key = 'dtmf_mode'
     # available pjsip.conf values: rfc4733, inband, info, none
-    if val == 'inband' or val == 'info':
+    if val == 'inband' or val == 'info' or val == 'auto':
         set_value(key, val, section, pjsip, nmapped)
     elif val == 'rfc2833':
         set_value(key, 'rfc4733', section, pjsip, nmapped)
@@ -500,6 +500,7 @@ peer_map = [
     ['tonezone',           set_value('tone_zone')],
     ['language',           set_value],
     ['allowsubscribe',     set_value('allow_subscribe')],
+    ['subscribecontext',   set_value('subscribe_context')],
     ['subminexpiry',       set_value('sub_min_expiry')],
     ['rtp_engine',         set_value],
     ['mailbox',            from_mailbox],
@@ -773,6 +774,11 @@ def set_tls_private_key(val, pjsip, section, nmapped):
 
 def set_tls_cipher(val, pjsip, section, nmapped):
     """Sets cipher based on sip.conf tlscipher or sslcipher"""
+    if val == 'ALL':
+        return
+    print('chan_sip ciphers do not match 1:1 with PJSIP ciphers.' \
+          ' You should manually review and adjust this.', file=sys.stderr)
+
     set_value('cipher', val, section, pjsip, nmapped, 'transport')