Perform action when receiving a call

I’m using FreePBX and have this configuration in extensions_custom.conf so that I can receive a notification via Pushover.

[macro-dialout-trunk-predial-hook]
exten => s,1,System(/usr/bin/sendpush.php "Call from ${CALLERID(num)} to ${OUTNUM}")

I also need to receive notifications on incoming calls, but can’t figure it out on what context should I apply it.
(If it makes any difference, I’m using 4 trunks and want notifications from all of them)
Thank you.

Do you have all of the trunk inbound to the same context?

Using ‘from-pstn’ as an example, I’d set up a custom context call ‘from-pstn-push’, put your line of code in, and then a ‘goto(from-pstn,s,0)’ as the second line.

Just a thought.

Solved by adding:

[ext-did-custom]
exten => s,1,System(/usr/bin/sendpush.php "External call from ${CALLERID(num)}")

Thanks anyway.

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