Integration with elastix pbx

I suggust integration with elastix pbx for make call when trigger an alarm or to have a message response when i’m not at home ecc. I have in the same server elastix homeassistant and zoneminder working together.

If I am correct, Elastix PBX has Asterisk running as a backend, which means it can be done with Asterisk Manager API:

Home Assistant could serve as a client and be able to subscribe and listen for events coming from Asterisk. Not sure if Elastix PBX would overwrite /etc/asterisk/manager.conf, though:

my
/etc/asterisk/manager.conf

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+

[admin]
secret = ********
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
writetimeout = 5000

“#” include manager_additional.conf
“#” include manager_custom.conf
“#” include manager_europesip.conf

i think is the same of asterisk

Then you will want to modify manager_custom.conf to add a new user. You can grant all read permissions or portion of it such as call,reporting,cdr,dialplan,originate.

It might be possible if Home Assistant could function as a SIP client so that those using FreeSwitch or want to have Home Assistant connect with Callcentric or Anveo to dial out to your phone number can do so as well.

Speaking of which, Home Assistant could make use of SIP SIMPLE:

Why you’d want Home Assistant to be a SIP client? Perhaps SIP could be implemented as a notification component:

[code]notify:

  • platform: sip
    name: Asterisk
    username: 105
    password: secret
    phonenumber: 555-123-4567[/code]

Asterisk will need a built-in TTS (Text To Speech) for this to work.

But if you want a complete integration with Asterisk, which includes FreePBX and Elastix, then I’m open for that as well.

Oh! I found something:
https://readthedocs.org/projects/asterisk-python/

Looks like there’s a library available that exposes Asterisk Manager API for Python.

Maybe that will work.

This is interesting. I can create an automation so that HA can give me a morning call when use together with this alarm clock.