[asterisk-commits] sip to pjsip: Map externhost/ip to Transports. (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 19 17:32:34 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: sip_to_pjsip: Map externhost/ip to Transports.
......................................................................


sip_to_pjsip: Map externhost/ip to Transports.

When using the migration script sip_to_pjsip.py, the externhost or externip of
sip.conf were erroneously written to Endpoints instead to Transports.

ASTERISK-22374

Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4
---
M contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
index 8909216..bf45530 100755
--- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
@@ -383,8 +383,6 @@
     ['session-timers',     set_timers],          # timers
     ['session-minse',      set_value('timers_min_se')],
     ['session-expires',    set_value('timers_sess_expires')],
-    ['externip',           set_value('external_media_address')],
-    ['externhost',         set_value('external_media_address')],
     # identify_by ?
     ['directmedia',        set_direct_media],    # direct_media
                                                  # direct_media_method
@@ -598,6 +596,8 @@
         extern_addr = sip.multi_get('general', ['externaddr', 'externip',
                                     'externhost'])[0]
         host, port = split_hostport(extern_addr)
+        set_value('external_media_address', host, 'transport-udp', pjsip,
+                  nmapped, 'transport')
         set_value('external_signaling_address', host, 'transport-udp', pjsip,
                   nmapped, 'transport')
         if port:
@@ -645,6 +645,8 @@
             tcpport = sip.get('general', 'externtcpport')[0]
         except:
             tcpport = port
+        set_value('external_media_address', host, 'transport-tcp', pjsip,
+                  nmapped, 'transport')
         set_value('external_signaling_address', host, 'transport-tcp', pjsip,
                   nmapped, 'transport')
         if tcpport:
@@ -789,6 +791,8 @@
             tlsport = sip.get('general', 'externtlsport')[0]
         except:
             tlsport = port
+        set_value('external_media_address', host, 'transport-tls', pjsip,
+                  nmapped, 'transport')
         set_value('external_signaling_address', host, 'transport-tls', pjsip,
                   nmapped, 'transport')
         if tlsport:

-- 
To view, visit https://gerrit.asterisk.org/3621
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list