From dd26bb9b2ffb2bfbe65cc65fa9107e7e79ca5c0c Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 12 Dec 2019 17:10:13 +0100 Subject: [PATCH] TT#72351 Fix SIP address usage on CARRIER Use new sip_int_ips instead of 127.0.0.1 for SIP serivces. Change-Id: I2a156eec19c04726ae0656a70d6451f161325465 --- templates/821_network-ports-ngcp.yaml.tt2 | 30 ++++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/templates/821_network-ports-ngcp.yaml.tt2 b/templates/821_network-ports-ngcp.yaml.tt2 index 2c81aeb..758a9e5 100644 --- a/templates/821_network-ports-ngcp.yaml.tt2 +++ b/templates/821_network-ports-ngcp.yaml.tt2 @@ -19,6 +19,18 @@ sip_ext_ips = out; END; + argv.host = hostname; + argv.type = 'sip_int'; + PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host'; + sip_int_ips = out; + + IF !sip_int_ips.size; + argv.host = hostname; + argv.type = 'sip_int'; + PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host'; + sip_int_ips = out; + END; + argv.host = hostname; argv.type = 'web_ext'; PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host'; @@ -101,7 +113,7 @@ port: # Kamailio proxy tcp:5062: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] # Prosody tcp:5222: @@ -116,22 +128,22 @@ port: # Prosody tcp:5280: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] # Prosody tcp:5281: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] # Prosody tcp:5582: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] # SEMS tcp:8090: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] # Asterisk tcp:5038: @@ -141,17 +153,17 @@ port: # SEMS udp:5040: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] # Asterisk udp:5070: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] # SEMS udp:5080: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] [% END -%] [% IF is_rtp || is_proxy || is_db -%] @@ -165,7 +177,7 @@ port: # rtpengine udp:2223: listening: [% node_state == 'active' ? 'true' : 'false' %] - ip: ["127.0.0.1"] + ip: ["[% sip_int_ips.0 %]"] [% END -%] # InfluxDB Admin