asteriskvoipphone-callpbx

Asterisk / FreePBX - 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)


Solution

  • Solved by just adding:

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