FreeSwitch, make use of the mncc_ip_address variable
This commit is contained in:
parent
32256fb66f
commit
b179f58489
5 changed files with 21 additions and 6 deletions
|
@ -92,6 +92,7 @@ class rhizo_base::freeswitch::common {
|
|||
$voip_proxy = $rhizo_base::voip_proxy
|
||||
$sip_central_ip_address = $rhizo_base::sip_central_ip_address
|
||||
$reg_provider = $rhizo_base::reg_provider
|
||||
$mncc_ip_address = $rhizo_base::mncc_ip_address
|
||||
|
||||
package {
|
||||
['freeswitch', 'freeswitch-lang-en',
|
||||
|
@ -149,6 +150,10 @@ class rhizo_base::freeswitch::common {
|
|||
File['/etc/freeswitch/sip_profiles/external'] ],
|
||||
}
|
||||
|
||||
file { '/etc/freeswitch/sip_profiles/internal.xml':
|
||||
content => template('rhizo_base/internal.xml.erb'),
|
||||
}
|
||||
|
||||
file {'/etc/freeswitch/sip_profiles/outgoing':
|
||||
ensure => directory,
|
||||
}
|
||||
|
@ -160,6 +165,11 @@ class rhizo_base::freeswitch::common {
|
|||
File['/etc/freeswitch/sip_profiles/outgoing'] ],
|
||||
}
|
||||
|
||||
file { '/etc/freeswitch/autoload_configs/acl.conf.xml':
|
||||
content => template('rhizo_base/acl.conf.xml.erb'),
|
||||
require => Package['freeswitch'],
|
||||
}
|
||||
|
||||
file { '/etc/freeswitch/autoload_configs/cdr_pg_csv.conf.xml':
|
||||
content => template('rhizo_base/cdr_pg_csv.conf.xml.erb'),
|
||||
require => Package['freeswitch'],
|
||||
|
|
|
@ -252,6 +252,11 @@ schedule { 'repo':
|
|||
purge => false,
|
||||
}
|
||||
|
||||
file { '/home/rhizomatica/bin/monitor_freeswitch.sh':
|
||||
ensure => present,
|
||||
content => template('rhizo_base/monitor_freeswitch.sh.erb'),
|
||||
}
|
||||
|
||||
file { '/home/rhizomatica/bin/vars.sh':
|
||||
ensure => present,
|
||||
content => template('rhizo_base/vars.sh.erb'),
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<!--<node type="allow" domain="$${domain}"/> -->
|
||||
<node type="allow" cidr="192.168.11.0/24"/>
|
||||
<node type="allow" cidr="10.23.0.0/16"/>
|
||||
<node type="allow" cidr="172.16.0.0/16"/>
|
||||
<node type="allow" cidr="<%= @mncc_ip_address %>/32"/>
|
||||
<node type="allow" cidr="127.0.0.1/32"/>
|
||||
|
||||
<!-- use cidr= if you wish to allow ip ranges to this domains acl. -->
|
|
@ -91,9 +91,9 @@
|
|||
<param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>
|
||||
<param name="rtp-timer-name" value="soft"/>
|
||||
<!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
|
||||
<param name="rtp-ip" value="172.16.0.1"/>
|
||||
<param name="rtp-ip" value="<%= @mncc_ip_address %>"/>
|
||||
<!-- ip address to bind to, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
|
||||
<param name="sip-ip" value="172.16.0.1"/>
|
||||
<param name="sip-ip" value="<%= @mncc_ip_address %>"/>
|
||||
<!--<param name="hold-music" value="$${hold_music}"/>-->
|
||||
<param name="apply-nat-acl" value="nat.auto"/>
|
||||
|
||||
|
@ -272,8 +272,8 @@
|
|||
auto - Use guessed ip.
|
||||
auto-nat - Use ip learned from NAT-PMP or UPNP
|
||||
-->
|
||||
<param name="ext-rtp-ip" value="172.16.0.1"/>
|
||||
<param name="ext-sip-ip" value="172.16.0.1"/>
|
||||
<param name="ext-rtp-ip" value="<%= @mncc_ip_address %>"/>
|
||||
<param name="ext-sip-ip" value="<%= @mncc_ip_address %>"/>
|
||||
|
||||
<!-- rtp inactivity timeout -->
|
||||
<param name="rtp-timeout-sec" value="300"/>
|
|
@ -10,7 +10,7 @@ LOGFILE="/var/log/monitor_fs.log"
|
|||
IFS=
|
||||
FS_STATUS="$(fs_cli -x 'sofia status')"
|
||||
|
||||
if !(echo $FS_STATUS | egrep -q "internal.*172.16.0.1"); then
|
||||
if !(echo $FS_STATUS | egrep -q "internal.*<%= @mncc_ip_address %>"); then
|
||||
logc "Missing internal profile! Restarting Profile";
|
||||
fs_cli -x "sofia profile internal stop"
|
||||
sleep 10
|
Loading…
Add table
Add a link
Reference in a new issue