From b94a2baa2f6a44ee6d9a199808a7c821d0219f87 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 10 Dec 2024 15:47:42 -0500 Subject: [PATCH] [asterisk] Add a homeassistant extension --- roles/asterisk/templates/extensions.conf.j2 | 10 ++++++++++ roles/asterisk/templates/pjsip.conf.j2 | 10 ++++++++++ .../files/tftpboot/SEP00CCFC4B5DE1.cnf.xml | 6 ++++++ roles/traefik/files/conf.d/sailmaker.yaml | 8 ++++++++ 4 files changed, 34 insertions(+) diff --git a/roles/asterisk/templates/extensions.conf.j2 b/roles/asterisk/templates/extensions.conf.j2 index 8f05c4d..9be7062 100644 --- a/roles/asterisk/templates/extensions.conf.j2 +++ b/roles/asterisk/templates/extensions.conf.j2 @@ -49,6 +49,16 @@ exten => 700,1,Answer() ; Other extensions ; 3-digit extensions dial their associated devices + +exten => 100,hint,PJSIP/100 +exten => 101,hint,PJSIP/101 +exten => 102,hint,PJSIP/102 +exten => 500,hint,PJSIP/homeassistant + +exten => 500,1,NoOp() + same => n,Dial(PJSIP/homeassistant) + same => n,Hangup() + exten => _XXX,1,NoOp() same = n,Dial(PJSIP/${EXTEN}, 15) same = n,Set(MAILBOXES=${PJSIP_ENDPOINT(${EXTEN},mailboxes)}) diff --git a/roles/asterisk/templates/pjsip.conf.j2 b/roles/asterisk/templates/pjsip.conf.j2 index 739fdfa..bf890ef 100644 --- a/roles/asterisk/templates/pjsip.conf.j2 +++ b/roles/asterisk/templates/pjsip.conf.j2 @@ -80,6 +80,16 @@ type=aor max_contacts=1 remove_existing=yes +[homeassistant] +type=endpoint +context=from-internal +allow=opus +aors=homeassistant + +[homeassistant] +type=aor +contact=sip:homeassistant@192.168.1.13:5060 + [pstn] type=endpoint context=incoming diff --git a/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml b/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml index a6ff5df..abefc1c 100644 --- a/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml +++ b/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml @@ -161,6 +161,12 @@ 1 102 + + 21 + Home Assistant + 1 + 500 + 5060 diff --git a/roles/traefik/files/conf.d/sailmaker.yaml b/roles/traefik/files/conf.d/sailmaker.yaml index 550c01d..51a6c60 100644 --- a/roles/traefik/files/conf.d/sailmaker.yaml +++ b/roles/traefik/files/conf.d/sailmaker.yaml @@ -61,6 +61,10 @@ http: rule: "Host(`hugo.sailmaker.fenix.lgbt`)" service: hugo <<: *sailmaker-tls + minecraft-public: + rule: "Host(`minecraft.fenix.lgbt`)" + service: minecraft-dynmap + <<: *public-tls omada-internal: rule: "Host(`omada.sailmaker.fenix.lgbt`)" service: omada @@ -142,6 +146,10 @@ http: loadBalancer: servers: - url: "http://reason.sailmaker.fenix.lgbt:3100" + minecraft-dynmap: + loadBalancer: + servers: + - url: "http://reason.sailmaker.fenix.lgbt:8123" omada: loadBalancer: servers: