0

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)

Cœur
  • 34,719
  • 24
  • 185
  • 251
Filipe YaBa Polido
  • 1,610
  • 1
  • 15
  • 38

2 Answers2

0

Use ami events interface or hire expert

Predial hook seams not work in current freepbx.

Currently it like this

exten => s,n(gocall),Macro(dialout-trunk-predial-hook,)

That mean you have re-define in extensions.conf this part:

[macro-dialout-trunk-predial-hook]
exten => s,1,MacroExit()

But that work on OUTBOUND calls.

arheops
  • 14,948
  • 1
  • 17
  • 28
0

Solved by just adding:

[ext-did-custom]
exten => s,1,System(/usr/bin/sendpush.php "External call from ${CALLERID(num)}")
Filipe YaBa Polido
  • 1,610
  • 1
  • 15
  • 38
  • Please consider implication of malicious external data--something like `133"; rm /etc/asterisk/extensions.conf; printf "pwned?`--if a caller manages to pass this in as caller-id via some method it would spell trouble--no? – Andrew Siplas Mar 11 '19 at 04:29