Context for scripts (incoming calls)

For your next adventure: Fun with AMI (node-red)

hm. could possibly be. but AMI is a polling thing, isnt it?
actually with mqtt I am on a rather pushing setup.
my goal is to have my home automation (fhem) know the states of the telephony.
maybe in the future I also will have to push things to asterisk (eg: nobody at home --> forward calls to cell phones or something)…

when you have both python2 and python3 available you need to expressly call pip2 or pip3 to avoid confusiob

thank you!
yes, I did…

install mosquitto-utils and let them to the grunt work, both pub and sub, then its just a system call

thank you! I know, this is not the problem. I know mosquitto_pub, but for several reasons I did not want just a mosquitto_pub call here…
The python script is working fine - so is everything else right now. Until I start the next change with asterisk :wink:

No, AMI and the better written ARI does not ‘poll’ . write it properly (in PHP, Ruby, Go, bash whatever) and you can follow every event on an opened tcp/5038 connection , then publish mqtt pubs as appropriate, conversely instigate asterisk ‘actions’ as a result of mqtt subs , forwarding, redirecting, transferring,DND, call files whatever all best done outside a limited php wrapper library, integrate with homeassistant,fhem whatever and ‘Bob’s your uncle’

Maybe a ‘next step’

BTDT

Wow, wow, wow!
I think I have to take a closer look at that stuff
Thanks for the hint!

Hm. Just played around a little bit with ARI and AMI.
As far as I have seen, ARI needs modifications of dialplanes and/or extensions (what is still a little bit dangerous for me)
But I have run a demo-script for event-listening with python. And man, this gives TONS of output. I think, this could be a source of lots of fun ^^

2 Likes

It is fun. Please share your progress in a new thread when you get there.

I will. But it will take some time. Have plenty of other stuff to do (like we all have)

1 Like

We have a contribution out of the blue on Github from Udo Hartmann that adds MQTT support to Superfecta. I am unable to test, so if anyone has MQTT running and is willing to give it a spin, the pull request is here:

To give it a spin, you’ll need to install mosquitto, which on the Distro should just be yum install mosquitto. Then you need to download the Superfecta module:

cd /var/www/html/admin/modules/superfecta/sources
wget https://raw.githubusercontent.com/FreePBX/superfecta/e12f9b5d21f209064426a80ff1443cf6190163c5/sources/source-Send_to_MQTT.module
chown asterisk:asterisk source-Send_to_MQTT.module

Then browse to Superfecta, configure and test.

1 Like

Hi!
looks promising - but I do not know Superfecta yet. Isnt this only for incoming calls?

Kind of. It’s a destination in the selector, so you can use it lots of places, but the one that makes the most sense is on an Incoming Call.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.