From 3389f0d4a6ab2d9b052e2212d1bc6667c9b3cc89 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Sun, 22 Dec 2024 01:58:30 -0500 Subject: [PATCH] Configure the kitchen intercom --- roles/asterisk/templates/pjsip.conf.j2 | 22 +++++++++++++++++++ .../files/tftpboot/dashboard-kitchen.json | 18 +++++++++++++++ .../tasks/install_apache2.yml | 3 +++ .../templates/001-tftpboot.conf.j2 | 1 + roles/traefik/files/conf.d/sailmaker.yaml | 6 ++++- 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 roles/phone-provisioning/files/tftpboot/dashboard-kitchen.json diff --git a/roles/asterisk/templates/pjsip.conf.j2 b/roles/asterisk/templates/pjsip.conf.j2 index bf890ef..5d05099 100644 --- a/roles/asterisk/templates/pjsip.conf.j2 +++ b/roles/asterisk/templates/pjsip.conf.j2 @@ -13,6 +13,28 @@ type=transport protocol=wss bind=0.0.0.0 +[1] +type=endpoint +context=from-internal +dtls_auto_generate_cert=yes +webrtc=yes +disallow=all +allow=opus,ulaw +auth=1 +aors=1 +mailboxes=436@sailmaker + +[1] +type=auth +auth_type=userpass +password=kqLOkwpI89Yo6S2e0rvcH7Aha +username=1 + +[1] +type=aor +max_contacts=5 +remove_existing=yes + ; Correl's main extension [100] type=endpoint diff --git a/roles/phone-provisioning/files/tftpboot/dashboard-kitchen.json b/roles/phone-provisioning/files/tftpboot/dashboard-kitchen.json new file mode 100644 index 0000000..cb577ea --- /dev/null +++ b/roles/phone-provisioning/files/tftpboot/dashboard-kitchen.json @@ -0,0 +1,18 @@ +{ + "name": "Kitchen", + "websocket": "wss://pbx.sailmaker.fenix.lgbt/ws", + "domain": "192.168.1.21", + "username": "1", + "password": "kqLOkwpI89Yo6S2e0rvcH7Aha", + "voicemail": "*436", + "contacts": [ + { + "name": "Correl", + "number": "100" + }, + { + "name": "Test", + "number": "700" + } + ] +} diff --git a/roles/phone-provisioning/tasks/install_apache2.yml b/roles/phone-provisioning/tasks/install_apache2.yml index 0cfca6b..4d5ef93 100644 --- a/roles/phone-provisioning/tasks/install_apache2.yml +++ b/roles/phone-provisioning/tasks/install_apache2.yml @@ -3,6 +3,9 @@ name: apache2 update_cache: true state: latest +- name: Enable Apache2 Header mod + community.general.apache2_module: + name: headers - name: Start Apache2 HTTP server ansible.builtin.service: name: apache2 diff --git a/roles/phone-provisioning/templates/001-tftpboot.conf.j2 b/roles/phone-provisioning/templates/001-tftpboot.conf.j2 index d5b50b5..73e14e3 100644 --- a/roles/phone-provisioning/templates/001-tftpboot.conf.j2 +++ b/roles/phone-provisioning/templates/001-tftpboot.conf.j2 @@ -7,5 +7,6 @@ Listen 6970 Options +FollowSymlinks Require all granted + Header set Access-Control-Allow-Origin "*" diff --git a/roles/traefik/files/conf.d/sailmaker.yaml b/roles/traefik/files/conf.d/sailmaker.yaml index fce1624..783b766 100644 --- a/roles/traefik/files/conf.d/sailmaker.yaml +++ b/roles/traefik/files/conf.d/sailmaker.yaml @@ -37,6 +37,10 @@ http: rule: "Host(`pbx.sailmaker.fenix.lgbt`)" service: asterisk-web <<: *sailmaker-tls + pbx-provisioning-internal: + rule: "Host(`pbx-provisioning.sailmaker.fenix.lgbt`)" + service: asterisk-provisioning + <<: *sailmaker-tls plex-internal: rule: "Host(`plex.sailmaker.fenix.lgbt`)" service: plex @@ -113,7 +117,7 @@ http: asterisk-provisioning: loadBalancer: servers: - - url: "http://192.168.1.21" + - url: "http://192.168.1.21:6970" asterisk-web: loadBalancer: servers: