From: alex Date: Sat, 14 Oct 2023 12:09:48 +0000 (+0200) Subject: Configure freeswitch X-Git-Tag: 20240214-emacs~219 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=7fde74c5f7c2233f2c2612479e6c1c35dc59e6a2;p=alex.git Configure freeswitch --- diff --git a/personal_infra/puppet/modules/freeswitch/README.md b/personal_infra/puppet/modules/freeswitch/README.md new file mode 100644 index 0000000..9662c68 --- /dev/null +++ b/personal_infra/puppet/modules/freeswitch/README.md @@ -0,0 +1,6 @@ +Baresip config: + +account: sip:ext@sip.pdp7.net;transport=tls +password: xxx +out proxy: sip:sip.pdp7.net;transport=tls +sip provider: sip.pdp7.net diff --git a/personal_infra/puppet/modules/freeswitch/manifests/init.pp b/personal_infra/puppet/modules/freeswitch/manifests/init.pp new file mode 100644 index 0000000..4ebdf3a --- /dev/null +++ b/personal_infra/puppet/modules/freeswitch/manifests/init.pp @@ -0,0 +1,24 @@ +class freeswitch($freeswitch_password, $freeswitch_address, $freeswitch_rtp_start_port, $freeswitch_rtp_end_port) { + package {'okay-release': + source => 'http://repo.okay.com.mx/centos/9/x86_64/release/okay-release-1-9.el9.noarch.rpm', + } + -> + package {['freeswitch-config-vanilla', 'freeswitch-systemd', 'freeswitch-sounds-en-us-callie-all']:} + -> + service {'freeswitch': + enable => true, + ensure => running, + } + + file {'/etc/freeswitch/vars.xml': + content => template('freeswitch/vars.xml'), + require => Package['freeswitch-config-vanilla'], + notify => Service['freeswitch'], + } + + file {'/etc/freeswitch/autoload_configs/switch.conf.xml': + content => template('freeswitch/switch.conf.xml'), + require => Package['freeswitch-config-vanilla'], + notify => Service['freeswitch'], + } +} diff --git a/personal_infra/puppet/modules/freeswitch/templates/switch.conf.xml b/personal_infra/puppet/modules/freeswitch/templates/switch.conf.xml new file mode 100644 index 0000000..36891f9 --- /dev/null +++ b/personal_infra/puppet/modules/freeswitch/templates/switch.conf.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/personal_infra/puppet/modules/freeswitch/templates/vars.xml b/personal_infra/puppet/modules/freeswitch/templates/vars.xml new file mode 100644 index 0000000..850c0a1 --- /dev/null +++ b/personal_infra/puppet/modules/freeswitch/templates/vars.xml @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp b/personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp index ca4d42a..2f8b308 100644 --- a/personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp +++ b/personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp @@ -1,2 +1,8 @@ node 'freeswitch.h1.int.pdp7.net' { + class {'freeswitch': + freeswitch_password => lookup("freeswitch.password"), + freeswitch_address => 'stun:stun.freeswitch.org', + freeswitch_rtp_start_port => '20000', + freeswitch_rtp_end_port => '20010', + } }