Last active
September 3, 2021 03:52
-
-
Save zubir2k/d1c98912512e5994ebba5863414bd2cf to your computer and use it in GitHub Desktop.
VoIP call on Home Assistant with DSS VoIP Addon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### DSS VoIP Addon Configuration with IPTel.org | |
### Consist of 2 areas: | |
### 1. configuration.yaml | |
### 2. lovelace | |
### | |
### Requirements: | |
### 1. SIP account with IPTel.org (free) | |
### 2. DSS VoIP addon (https://github.com/sdesalve/hassio-addons/tree/master/dss_voip) | |
### 3. A working TTS | |
### Lovelace Card ### | |
type: vertical-stack | |
cards: | |
- type: entities | |
entities: | |
- entity: input_select.sip_contact | |
- entity: input_text.sip_message | |
- type: call-service | |
service: script.call_voip | |
name: ' ' | |
icon: ' ' | |
action_name: Call | |
- entity: sensor.sip_contact | |
### configuration.yaml ### | |
### Sensor | |
sensor: | |
- platform: template | |
sensors: | |
sip_contact: | |
friendly_name: "VOIP Contact" | |
value_template: >- | |
{% if states("input_select.sip_contact") == 'Main' %}main@iptel.org | |
{% elif states("input_select.sip_contact") == 'Person 1' %}person1@iptel.org | |
{% elif states("input_select.sip_contact") == 'Person 2' %}person2@iptel.org | |
{% elif states("input_select.sip_contact") == 'Person 3' %}person3@iptel.org | |
{% endif %} | |
### Script | |
script: | |
call_voip: | |
alias: Call VOIP | |
sequence: | |
- service: hassio.addon_stdin | |
data: | |
addon: 89275b70_dss_voip | |
input: {"call_sip_uri":"sip:{{states('sensor.sip_contact')}}","message_tts":"{{states('input_text.sip_message')}}"} | |
### Input Select | |
input_select: | |
sip_contact: | |
name: 'Who to Call:' | |
options: | |
- 'Main' | |
- 'Person 1' | |
- 'Person 2' | |
- 'Person 3' | |
initial: 'Main' | |
icon: mdi:phone-classic | |
### Input Text | |
input_text: | |
sip_message: | |
name: 'Enter message:' | |
icon: mdi:phone-classic | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment