From 2e27cdc1b29211387257cef0c88543c93bf1852d Mon Sep 17 00:00:00 2001 From: duffyduck Date: Wed, 25 Jun 2025 09:32:54 +0000 Subject: [PATCH] Dateien nach "/" hochladen init version --- Dockerfile | 12 ++++++++++++ README.md | 12 +++++++++++- baresip.conf.j2 | 5 +++++ build.json | 9 +++++++++ config.yaml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 baresip.conf.j2 create mode 100644 build.json create mode 100644 config.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4ee367e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM debian:bookworm + +RUN apt-get update && \ + apt-get install -y baresip mosquitto-clients alsa-utils curl bash espeak jq && \ + apt-get clean + +COPY run.sh /run.sh +COPY baresip.conf.j2 /baresip.conf.j2 + +RUN chmod +x /run.sh + +CMD ["/run.sh"] \ No newline at end of file diff --git a/README.md b/README.md index 1483ee4..2203dea 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ -# ha-siptriggter +# SIP Trigger Add-on (TTS Advanced) +Dieses Add-on erlaubt es, bei einem eingehenden Anruf via SIP MQTT-Nachrichten zu senden. Zusätzlich können per TTS Textnachrichten bei PIN-Abfrage, Erfolg oder Fehler gesprochen werden. + +## Unterstützt: +- Mehrere SIP-Konten +- Eigene MQTT-Aktionen pro Konto +- Eigene PIN-Abfrage +- Eigene Sprachnachrichten via TTS für: + - PIN-Eingabe-Aufforderung + - Erfolgreiche PIN + - Falsche PIN \ No newline at end of file diff --git a/baresip.conf.j2 b/baresip.conf.j2 new file mode 100644 index 0000000..8c670c9 --- /dev/null +++ b/baresip.conf.j2 @@ -0,0 +1,5 @@ +sip_account sip:{{ sip_user }}@{{ sip_host }};auth_user={{ sip_user }};auth_pass={{ sip_password }};outbound=sip:{{ sip_host }} + +sipnat no +sip_listen 0.0.0.0:5060 +sip_trans_bsize 512 \ No newline at end of file diff --git a/build.json b/build.json new file mode 100644 index 0000000..6b2f78d --- /dev/null +++ b/build.json @@ -0,0 +1,9 @@ +{ + "name": "SIP Trigger Multi TTS Advanced", + "version": "1.3", + "slug": "sip_trigger_multi_tts_advanced", + "description": "Mehrere SIP-Accounts mit TTS bei PIN-Eingabe, Erfolg oder Fehler", + "startup": "services", + "boot": "auto", + "arch": ["amd64", "aarch64", "armv7"] +} \ No newline at end of file diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..f54b784 --- /dev/null +++ b/config.yaml @@ -0,0 +1,51 @@ +name: SIP Trigger Add-on (TTS Advanced) +version: "1.3" +slug: sip_trigger_multi_tts_advanced +description: "Mehrere SIP-Accounts mit separaten TTS-Texten für PIN-Eingabe, Erfolg & Fehler" +startup: services +boot: auto +options: + accounts: + - sip_user: "620" + sip_password: "geheim" + sip_host: "192.168.178.1" + mqtt_host: "mqtt.local" + mqtt_topic: "sip/trigger/1" + mqtt_payload: "incoming_call" + pin_required: true + pin_code: "1234" + tts_pin_prompt_enabled: true + tts_pin_prompt_text: "Bitte geben Sie Ihre PIN ein." + tts_success_enabled: true + tts_success_text: "Willkommen. Zugriff gewährt." + tts_failure_enabled: false + tts_failure_text: "Falsche Eingabe. Verbindung wird beendet." + - sip_user: "621" + sip_password: "geheim2" + sip_host: "192.168.178.1" + mqtt_host: "mqtt.local" + mqtt_topic: "sip/trigger/2" + mqtt_payload: "call_2" + pin_required: false + tts_pin_prompt_enabled: false + tts_pin_prompt_text: "" + tts_success_enabled: false + tts_success_text: "" + tts_failure_enabled: false + tts_failure_text: "" +schema: + accounts: + - sip_user: str + sip_password: str + sip_host: str + mqtt_host: str + mqtt_topic: str + mqtt_payload: str + pin_required: bool + pin_code: str + tts_pin_prompt_enabled: bool + tts_pin_prompt_text: str + tts_success_enabled: bool + tts_success_text: str + tts_failure_enabled: bool + tts_failure_text: str \ No newline at end of file