You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
240 lines
5.2 KiB
240 lines
5.2 KiB
[%
|
|
hostname = ngcp.get_hostname();
|
|
|
|
is_proxy = ngcp.has_role(hostname, 'proxy');
|
|
is_lb = ngcp.has_role(hostname, 'lb');
|
|
is_mgmt = ngcp.has_role(hostname, 'mgmt');
|
|
is_db = ngcp.has_role(hostname, 'db');
|
|
is_rtp = ngcp.has_role(hostname, 'rtp');
|
|
|
|
argv.host = hostname;
|
|
argv.type = 'sip_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
|
sip_ext_ips = out;
|
|
|
|
IF !sip_ext_ips.size;
|
|
argv.host = hostname;
|
|
argv.type = 'sip_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
|
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;
|
|
|
|
IF haproxy.enable == 'yes';
|
|
sip_proxy_ip = sip_int_ips.0;
|
|
ELSE;
|
|
sip_proxy_ip = sip_ext_ips.0;
|
|
END;
|
|
|
|
argv.host = hostname;
|
|
argv.type = 'web_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
|
web_ext_ips = out;
|
|
|
|
IF !web_ext_ips.size;
|
|
argv.host = hostname;
|
|
argv.type = 'web_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
|
web_ext_ips = out;
|
|
END;
|
|
|
|
argv.host = hostname;
|
|
argv.type = 'web_int';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
|
web_int_ips = out;
|
|
|
|
IF !web_int_ips.size;
|
|
argv.host = hostname;
|
|
argv.type = 'web_int';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
|
web_int_ips = out;
|
|
END;
|
|
|
|
argv.host = hostname;
|
|
argv.type = 'ha_int';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
|
ha_int_ips = out;
|
|
-%]
|
|
|
|
port:
|
|
|
|
[% IF is_mgmt -%]
|
|
# Nginx (IPv6 due to listening on all address families)
|
|
tcp6:80:
|
|
listening: true
|
|
|
|
# Nginx HTTPS (NGCP Panel)
|
|
tcp:443:
|
|
listening: true
|
|
ip: ["[% web_ext_ips.0 %]"]
|
|
|
|
# Nginx HTTPS (NGCP Panel Admin)
|
|
tcp:1443:
|
|
listening: true
|
|
ip: ["[% web_int_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
[% IF is_mgmt && pbx.enable == 'yes' -%]
|
|
# HTTPS PBX autoprovisioning
|
|
tcp:1444:
|
|
listening: true
|
|
ip: ["[% web_ext_ips.0 %]"]
|
|
|
|
# HTTP PBX autoprovisioning
|
|
tcp:1445:
|
|
listening: true
|
|
ip: ["[% web_ext_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
# MySQL
|
|
tcp:3306:
|
|
listening: true
|
|
ip: ["[% general.ngcp_type == 'spce' ? '127.0.0.1' : '0.0.0.0' %]"]
|
|
|
|
[% IF is_lb -%]
|
|
# Kamailio load-balancer
|
|
tcp:5060:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_ext_ips.0 %]"]
|
|
|
|
# HAProxy
|
|
tcp:5222:
|
|
listening: [% haproxy.enable == 'yes' ? 'true' : 'false' %]
|
|
ip: ["[% sip_ext_ips.0 %]"]
|
|
|
|
# HAProxy
|
|
tcp:5269:
|
|
listening: [% haproxy.enable == 'yes' ? 'true' : 'false' %]
|
|
ip: ["[% sip_ext_ips.0 %]"]
|
|
|
|
# HAProxy
|
|
tcp:5281:
|
|
listening: [% haproxy.enable == 'yes' ? 'true' : 'false' %]
|
|
ip: ["[% sip_ext_ips.0 %]"]
|
|
|
|
# HAProxy
|
|
tcp:8080:
|
|
listening: [% haproxy.enable == 'yes' && haproxy.admin == 'yes' ? 'true' : 'false' %]
|
|
ip: ["[% sip_ext_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
[% IF is_proxy -%]
|
|
# Kamailio proxy
|
|
tcp:5062:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# Prosody
|
|
tcp:5222:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_proxy_ip %]"]
|
|
|
|
# Prosody
|
|
tcp:5269:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_proxy_ip %]"]
|
|
|
|
# Prosody
|
|
tcp:5280:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# Prosody
|
|
tcp:5281:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# Prosody
|
|
tcp:5582:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
[% IF sems.enable == "yes" -%]
|
|
# SEMS
|
|
tcp:[% sems.xmlrpcport %]:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# SEMS
|
|
udp:5040:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# SEMS
|
|
udp:[% sems.bindport %]:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
[% IF b2b.enable == "yes" -%]
|
|
# sems-b2b
|
|
tcp:[% b2b.bindport %]:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# sems-b2b
|
|
tcp:[% b2b.xmlrpcport %]:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# sems-b2b
|
|
udp:5048:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
# sems-b2b
|
|
udp:[% b2b.bindport %]:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
# Asterisk
|
|
tcp:5038:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["127.0.0.1"]
|
|
|
|
# Asterisk
|
|
udp:5070:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
[% IF is_rtp || is_proxy || is_db -%]
|
|
# Redis
|
|
tcp:6379:
|
|
listening: true
|
|
ip: ["[% ha_int_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
[% IF is_rtp -%]
|
|
# rtpengine
|
|
udp:2223:
|
|
listening: {{.Vars.NODE_ACTIVE}}
|
|
ip: ["[% sip_int_ips.0 %]"]
|
|
|
|
[% END -%]
|
|
# InfluxDB Admin
|
|
tcp:8083:
|
|
listening: false
|
|
ip: ["127.0.0.1"]
|
|
|
|
# InfluxDb Query
|
|
tcp:8086:
|
|
listening: [% monitoring.backend == 'influxdb' || monitoring.influxdb_migrated == 'no' ? 'true' : 'false' %]
|
|
ip: ["[% ha_int_ips.0 %]"]
|
|
|
|
# InfluxDb Backup/Restore RPC
|
|
tcp:8088:
|
|
listening: [% monitoring.backend == 'influxdb' || monitoring.influxdb_migrated == 'no' ? 'true' : 'false' %]
|
|
ip: ["127.0.0.1"]
|