问题
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)
回答1:
Solved by just adding:
[ext-did-custom]
exten => s,1,System(/usr/bin/sendpush.php "External call from ${CALLERID(num)}")
回答2:
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.
来源:https://stackoverflow.com/questions/29200252/asterisk-freepbx-perform-action-when-receiving-a-call