sdesalve / hassio-addons

MIT License
86 stars 21 forks source link

cant wrap my config file right #61

Closed itiotdk closed 1 year ago

itiotdk commented 1 year ago

sorry that i need to ask this proberly stupid question. but i try to add call_duration to my config. but tit seems to be ignored, i put it in single quotes but when i save it changes to normal qoutes. tried to edit in yaml with no indention. still no luck.

sip_parameters: caller_id_uri: sip:8004@10.0.0.247:5060 realm: "*" username: xx password: xxxxxxxxxxxxxx call_duration: '-1'

when i save it changes to:

sip_parameters: caller_id_uri: sip:8004@10.0.0.247:5060 realm: "*" username: xx password: xxxxxxxxxxxxxx call_duration: "-1"

tried this as well:

sip_parameters: caller_id_uri: sip:8004@10.0.0.247:5060 realm: "*" username: xx password: xxxxxxxxxxxxxx call_duration: '-1'

again when i save it changes to:

sip_parameters: caller_id_uri: sip:8004@10.0.0.247:5060 realm: "*" username: xx password: xxxxxxxxxxxxxx call_duration: "-1"

any of the above gives me looped messages.

thanks for your work on this project. i use it to call a door bell from dahua. it autoanswers and plays the message to anyone on the street .. real funny sometimes when i am bored...

andy

sdesalve commented 1 year ago

https://github.com/sdesalve/hassio-addons/tree/master/dss_voip#option-max_call_time-optional

sip_parameters:
  caller_id_uri: 'sip:username@fritz.box:5060'
  realm: '*'
  username: 'username'
  password: 'password'
pjsua_custom_options: '--ip-addr=RASPBERRY_IP_ADDRESS'
max_call_time: "10"

or https://github.com/sdesalve/hassio-addons/tree/master/dss_voip#option-call_duration-optional

   ...
    - service: hassio.addon_stdin
      data_template:
        addon: 89275b70_dss_voip
        input: {"call_sip_uri":"sip:+393334455667@sipserver.com","message_tts":"Write here your message", "call_duration":"10"}
   ...

max_call_time must be used in addon config and it's the same for all calls. call_duration must be used in service call parameters and can be different for each call. It will override max_call_time setted value