Dialplan hook following execution of caller id superfecta for caller id name announcment

dialplan
freepbx
asterisk
callerid
Tags: #<Tag:0x00007f703a333a68> #<Tag:0x00007f703a333338> #<Tag:0x00007f703a332ff0> #<Tag:0x00007f703a332de8>

(Mitch Mitchell) #1

I am trying to find the right place in FreePBX dialplans to insert a call to an AGI script to send the caller id name to MQTT. I’m using this to announce callers on Alex and Google Home, but right now where I have the script called [from-pstn-custom] the caller id lookups (superfecta etc.) have not yet been performed.

I’ve been tracing down the incoming dialplan execution trying to find a custom hook context I could use to execute the script but there doesn’t seem to be a consistent place to do it for all inbound external calls. I can do it for selected destination end points (like ring groups) but I’d rather have the script called independent of the inbound route selected.

Any recommendations?

Thanks!

Mitch


#2

Set your Inbound Route to point to a Custom Destination, with Return set to Yes and Destination set to the original target. The target of the Custom Destination is custom dial plan that calls your AGI then returns.

This will be cumbersome if you have many Inbound Routes with different targets.


#3

You could just send directly from superfecta.

There was a Send-to-MQTT module submitted:

https://community.freepbx.org/t/context-for-scripts-incoming-calls/70473/52

@lgaetz - any reason this was never merged?


Community Contributions
(Mitch Mitchell) #4

Wow, that’s looks like exactly what I want – I’d be willing to help work on it if there is some reason it could not be merged in! For now I will download it and give it a shot.

I did play with the custom context capability too – there is a lot more power there than I realized. I guess I will be up late a few nights in the coming weeks.

Thanks to both of you for your responses.

Mitch


(Mitch Mitchell) #5

I download the script from the pull request, added it to the superfecta module, re-signed it with a local key and all is working perfectly, thanks!


(Lorne Gaetz) #6

My bad. We had discussed this last fall, and I was told to alert the contributor to ask them to raise the PR at git.freepbx.org, which I then forgot to do. I’ve done so now. Thanks for this heads up.