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
  • 37,241
  • 25
  • 195
  • 267
Filipe YaBa Polido
  • 1,656
  • 1
  • 17
  • 39

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
  • 15,544
  • 1
  • 21
  • 27
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,656
  • 1
  • 17
  • 39
  • 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