[asterisk-commits] mmichelson: branch mmichelson/conversion_script r398831 - /team/mmichelson/co...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 11 13:25:04 CDT 2013
Author: mmichelson
Date: Wed Sep 11 13:25:02 2013
New Revision: 398831
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398831
Log:
Finish filling in peer -> endpoint mappings.
With this, the conversion should be complete. What's left
is to do cleanup, hunt down bugs, and document.
Modified:
team/mmichelson/conversion_script/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
Modified: team/mmichelson/conversion_script/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/conversion_script/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py?view=diff&rev=398831&r1=398830&r2=398831
==============================================================================
--- team/mmichelson/conversion_script/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py (original)
+++ team/mmichelson/conversion_script/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py Wed Sep 11 13:25:02 2013
@@ -162,10 +162,8 @@
"""If record on/off feature is set to automixmon then set
one_touch_recording, otherwise it can't be mapped.
"""
- if val == 'automixmon':
- set_value('one_touch_recording', 'yes', section, pjsip, nmapped)
- else:
- nmapped(section, key, val + " ; could not be fully mapped")
+ set_value('one_touch_recording', 'yes', section, pjsip, nmapped)
+ set_value(key, val, section, pjsip, nmapped)
def from_progressinband(key, val, section, pjsip, nmapped):
"""Sets the inband_progress value in pjsip.conf"""
@@ -284,6 +282,7 @@
set_value('auth', section, section, pjsip, nmapped)
set_value('outbound_auth', realm_str, section, pjsip, nmapped)
+
def setup_ident(key, val, section, pjsip, nmapped):
if val != 'peer' and val != 'friend':
return
@@ -301,6 +300,11 @@
set_value('endpoint', section, section, pjsip, nmapped, 'identify')
set_value('match', ip, section, pjsip, nmapped, 'identify')
+
+def from_encryption_taglen(key, val, section, pjsip, nmapped):
+ if val == '32':
+ set_value('srtp_tag_32', 'yes', section, pjsip, nmapped)
+
###############################################################################
@@ -339,7 +343,7 @@
['sendrpid', from_sendrpid], # send_pai, send_rpid
['send_diversion', set_value],
['encrpytion', set_media_encryption],
- ['use_avpf', set_value],
+ ['avpf', set_value('use_avpf')],
['recordonfeature', from_recordfeature], # automixon
['recordofffeature', from_recordfeature], # automixon
['progressinband', from_progressinband], # in_band_progress
@@ -347,11 +351,36 @@
['pickupgroup', set_value],
['namedcallgroup', set_value],
['namedpickupgroup', set_value],
+ ['allowtransfer', set_value],
+ ['fromuser', set_value],
+ ['fromdomain', set_value],
+ ['mwifrom', set_value('mwifromuser')],
+ ['tos_audio', set_value],
+ ['tos_video', set_value],
+ ['cos_audio', set_value],
+ ['cos_video', set_value],
+ ['sdpowner', set_value],
+ ['sdpsession', set_value],
+ ['tonezone', set_value],
+ ['language', set_value],
+ ['allowsubscribe', set_value],
+ ['subminexpiry', set_value],
+ ['rtp_engine', set_value('rtpengine')],
['mailbox', from_mailbox],
['busylevel', set_value('devicestate_busy_at')],
['secret', setup_auth],
['md5secret', setup_auth],
['type', setup_ident],
+ ['dtlsenable', set_value('media_encryption', 'dtls')],
+ ['dtlsverify', set_value],
+ ['dtlsrekey', set_value],
+ ['dtlscertfile', set_value],
+ ['dtlsprivatekey', set_value],
+ ['dtlscipher', set_value],
+ ['dtlscafile', set_value],
+ ['dtlscapath', set_value],
+ ['dtlssetup', set_value],
+ ['encryption_taglen', from_encryption_taglen],
############################ maps to an aor ###################################
@@ -368,12 +397,12 @@
# auth_type
######################### maps to acl/security ################################
- ['permit', merge_value(type='security', section_to='acl')],
- ['deny', merge_value(type='security', section_to='acl')],
- ['acl', merge_value(type='security', section_to='acl')],
- ['contactpermit', merge_value(type='security', section_to='acl')],
- ['contactdeny', merge_value(type='security', section_to='acl')],
- ['contactacl', merge_value(type='security', section_to='acl')],
+ ['permit', merge_value(type='acl', section_to='acl')],
+ ['deny', merge_value(type='acl', section_to='acl')],
+ ['acl', merge_value(type='acl', section_to='acl')],
+ ['contactpermit', merge_value(type='acl', section_to='acl')],
+ ['contactdeny', merge_value(type='acl', section_to='acl')],
+ ['contactacl', merge_value(type='acl', section_to='acl')],
########################### maps to transport #################################
# type = transport
More information about the asterisk-commits
mailing list