diff options
| author | alex <alex@pdp7.net> | 2025-10-26 10:00:41 +0100 |
|---|---|---|
| committer | alexpdp7 <alex@corcoles.net> | 2025-10-26 12:14:27 +0100 |
| commit | 184f1a0143945549bf173a4bab22563a3af769c6 (patch) | |
| tree | 9b3027c49a14473f34efd83031562e647c14dc39 /personal_infra/puppet/site | |
| parent | 51d9cd16d8f625603e0eecad315431f62fb8841f (diff) | |
Migrate from freeswitch to flexisip
Diffstat (limited to 'personal_infra/puppet/site')
| -rw-r--r-- | personal_infra/puppet/site/flexisip.h1.int.pdp7.net.pp | 17 | ||||
| -rw-r--r-- | personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp | 8 | ||||
| -rw-r--r-- | personal_infra/puppet/site/h1.pdp7.net.pp | 28 |
3 files changed, 45 insertions, 8 deletions
diff --git a/personal_infra/puppet/site/flexisip.h1.int.pdp7.net.pp b/personal_infra/puppet/site/flexisip.h1.int.pdp7.net.pp new file mode 100644 index 00000000..75b57fe0 --- /dev/null +++ b/personal_infra/puppet/site/flexisip.h1.int.pdp7.net.pp @@ -0,0 +1,17 @@ +node 'flexisip.h1.int.pdp7.net' { + $password = lookup("flexisip.password") + + class {'flexisip': + flexisip_domain => 'sip.pdp7.net', + flexisip_sdp_port_range_min => '20000', + flexisip_sdp_port_range_max => '20010', + flexisip_user_database => @("EOT") + version:1 + + 1000@sip.pdp7.net clrtxt:$password ; + 1001@sip.pdp7.net clrtxt:$password ; + 1002@sip.pdp7.net clrtxt:$password ; + | EOT + , + } +} diff --git a/personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp b/personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp deleted file mode 100644 index 2f8b3080..00000000 --- a/personal_infra/puppet/site/freeswitch.h1.int.pdp7.net.pp +++ /dev/null @@ -1,8 +0,0 @@ -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', - } -} diff --git a/personal_infra/puppet/site/h1.pdp7.net.pp b/personal_infra/puppet/site/h1.pdp7.net.pp index 967a6348..f8b88ce3 100644 --- a/personal_infra/puppet/site/h1.pdp7.net.pp +++ b/personal_infra/puppet/site/h1.pdp7.net.pp @@ -179,4 +179,32 @@ node 'h1.pdp7.net' { } ~> Service['apache2'] + + # bogus host to obtain a certificate for sip.pdp7.net + file {"/etc/apache2/sites-enabled/sip.pdp7.net.conf": + content => @("EOT") + MDomain sip.pdp7.net + + <VirtualHost *:443> + ServerName sip.pdp7.net + SSLEngine on + Alias / /bogus + </VirtualHost> + | EOT + , + } + ~> + Service['apache2'] + + file {"/usr/local/bin/notify_md_renewal_hook_sip": + content => @("EOT"/$) + #!/bin/sh + + cp /etc/apache2/md/domains/sip.pdp7.net/pubcert.pem /rpool/data/subvol-209-disk-0/etc/pki/tls/certs/localhost.crt + cp /etc/apache2/md/domains/sip.pdp7.net/privkey.pem /rpool/data/subvol-209-disk-0/etc/pki/tls/private/localhost.key + pct exec 209 systemctl restart flexisip-proxy + | EOT + , + mode => '0755', + } } |
