Skip to content

Commit c8bf8a5

Browse files
InterLinked1Friendly Automation
authored and
Friendly Automation
committed
sip_to_pjsip: Fix missing cases
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
1 parent c3654a9 commit c8bf8a5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

contrib/scripts/sip_to_pjsip/sip_to_pjsip.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def set_dtmfmode(key, val, section, pjsip, nmapped):
158158
"""
159159
key = 'dtmf_mode'
160160
# available pjsip.conf values: rfc4733, inband, info, none
161-
if val == 'inband' or val == 'info':
161+
if val == 'inband' or val == 'info' or val == 'auto':
162162
set_value(key, val, section, pjsip, nmapped)
163163
elif val == 'rfc2833':
164164
set_value(key, 'rfc4733', section, pjsip, nmapped)
@@ -500,6 +500,7 @@ def from_dtlsenable(key, val, section, pjsip, nmapped):
500500
['tonezone', set_value('tone_zone')],
501501
['language', set_value],
502502
['allowsubscribe', set_value('allow_subscribe')],
503+
['subscribecontext', set_value('subscribe_context')],
503504
['subminexpiry', set_value('sub_min_expiry')],
504505
['rtp_engine', set_value],
505506
['mailbox', from_mailbox],
@@ -773,6 +774,11 @@ def set_tls_private_key(val, pjsip, section, nmapped):
773774

774775
def set_tls_cipher(val, pjsip, section, nmapped):
775776
"""Sets cipher based on sip.conf tlscipher or sslcipher"""
777+
if val == 'ALL':
778+
return
779+
print('chan_sip ciphers do not match 1:1 with PJSIP ciphers.' \
780+
' You should manually review and adjust this.', file=sys.stderr)
781+
776782
set_value('cipher', val, section, pjsip, nmapped, 'transport')
777783

778784

0 commit comments

Comments
 (0)