Asterisk / FreePBX - Perform action when receiving a call

霸气de小男生 提交于 2019-12-23 04:49:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!