[asterisk-commits] mmichelson: branch mmichelson/conversion_script r398832 - /team/mmichelson/co...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 11 13:46:52 CDT 2013
Author: mmichelson
Date: Wed Sep 11 13:46:50 2013
New Revision: 398832
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398832
Log:
Add outboundproxy to registrations
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=398832&r1=398831&r2=398832
==============================================================================
--- 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:46:50 2013
@@ -761,9 +761,10 @@
set_value('auth_type', 'md5', section, pjsip, nmapped, 'auth')
class Registration:
- def __init__(self, line, retry_interval, max_attempts):
+ def __init__(self, line, retry_interval, max_attempts, outbound_proxy):
self.retry_interval = retry_interval
self.max_attempts = max_attempts
+ self.outbound_proxy = outbound_proxy
self.parse(line)
def parse(self, line):
@@ -881,6 +882,10 @@
set_value('server_uri', server_uri, section, pjsip, nmapped,
'registration')
+ if self.outboundproxy:
+ set_value('outboundproxy', self.outboundproxy, section, pjsip,
+ nmapped, 'registartion')
+
def map_registrations(sip, pjsip, nmapped):
try:
@@ -898,8 +903,13 @@
except LookupError:
max_attempts = '10'
+ try:
+ outbound_proxy = sip.get('general', 'outboundproxy')[0]
+ except LookupError:
+ outbound_proxy = ''
+
for i in regs:
- reg = Registration(i, retry_interval, max_attempts)
+ reg = Registration(i, retry_interval, max_attempts, outbound_proxy)
reg.write(pjsip, nmapped)
def map_peer(sip, section, pjsip, nmapped):
More information about the asterisk-commits
mailing list