diff --git a/modules/rhizo_base/manifests/freeswitch.pp b/modules/rhizo_base/manifests/freeswitch.pp index 7172061..8d2e765 100644 --- a/modules/rhizo_base/manifests/freeswitch.pp +++ b/modules/rhizo_base/manifests/freeswitch.pp @@ -118,6 +118,7 @@ class rhizo_base::freeswitch::common { $sip_central_ip_address = $rhizo_base::sip_central_ip_address $reg_provider = $rhizo_base::reg_provider $mncc_ip_address = $rhizo_base::mncc_ip_address + $upstream_codec = $rhizo_base::upstream_codec $fs_version = "${lsbdistcodename}" ? { 'buster' => '1.8.6', @@ -185,6 +186,14 @@ class rhizo_base::freeswitch::common { ensure => directory, } + file { '/etc/freeswitch/sip_profiles/outgoing.xml': + content => template('rhizo_base/outgoing.xml.erb'), + require => + [ Package[ 'freeswitch' ], + File[ '/etc/freeswitch/' ] ], + } + + file { '/etc/freeswitch/sip_profiles/extrtp/rhizoextrtp.xml': content => template('rhizo_base/rhizoextrtp.xml.erb'), require => diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index 455463c..0354e6b 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -67,6 +67,7 @@ class rhizo_base { $max_power_red = hiera('rhizo::max_power_red', '24') $mncc_codec = hiera('rhizo::mncc_codec', 'GSM') $inter_codec = hiera('rhizo::inter_codec', 'G729') + $upstream_codec = hiera('rhizo::upstream_codec', 'G729') $dids = hiera('rhizo::dids', '') $lcls = $osmo_stack ? { diff --git a/modules/rhizo_base/files/etc/freeswitch/sip_profiles/outgoing.xml b/modules/rhizo_base/templates/outgoing.xml.erb similarity index 95% rename from modules/rhizo_base/files/etc/freeswitch/sip_profiles/outgoing.xml rename to modules/rhizo_base/templates/outgoing.xml.erb index 71b3aef..31881be 100644 --- a/modules/rhizo_base/files/etc/freeswitch/sip_profiles/outgoing.xml +++ b/modules/rhizo_base/templates/outgoing.xml.erb @@ -33,8 +33,13 @@ +<%if @upstream_codec == "AMR" %> + + +<% else %> +<% end %>