Closed catohagen closed 8 months ago
I think I might found a workaround....as after a crash, sometimes its restarting and sometimes not... so I found that every addon have a binary sensor to tell if its running or not. It needs to be enabled manually
In Settings -> Devices & Services -> Devices (tab) ..search 'ha-sip' or ha-sip-next and click on it
Under sensors there are +5 entities not shown, enable binary_sensor.ha_sip_running
or binary_sensor.ha_sip_next_running
Now I can have an automation, that triggers on {{ states('binary_sensor.ha_sip_next_running') == 'off' }}
and executes
service: hassio.addon_restart
data:
addon: 8cd50eef_ha-sip-next
Nice workaround! I really wonder what's going on here, because both versions are exactly the same, except the name. And if this sensor is able to identify a not working ha-sip, why doesn't the watchdog restart the add-on? I see nothing I can do here, except hoping that pjsip gets more stable or I find a bug in my code.
I dont know if this should be reported as a bug, but with running ha-sip-next (slug 8cd50eef-ha-sip-next) and do a manual call from developer tools/services like this :
it rings until timeout, but if I manually answer it after a few rings like this :
it stops ringing, but the addon resets itself, the log shows ha-sip-next just started. Here is the log i catched before it resets the addon :
I was trying to stop a ringing phone, as with the current bridging I do between two analog phones, if calling a phone and then just hang up, the target phone will just keep ringing until timeout...I wanted to stop the ringing, and that do happen now. I trigger the 'answer' command in the 'call_disconnected:' webhook
Very happy how things work now, but maybe there is a bug going on here since the addon restarts itself...