[Asterisk-code-review] sip to pjsip: Map externhost/ip to Transports. (asterisk[14])

Alexander Traud asteriskteam at digium.com
Thu Aug 18 08:26:24 CDT 2016


Alexander Traud has uploaded a new change for review.

  https://gerrit.asterisk.org/3622

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(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/3622/1

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/3622
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>



More information about the asterisk-code-review mailing list