I want to run a php script before each call in freepbx. also i need destination gateway ip and did. this is the first time that I try to do this function and I don't have any idea for this.
Asked
Active
Viewed 577 times
2 Answers
0
First of all run php script is bad idea, it slow, will slow down your pbx.
But if you insist you can add it via asterisk System call into predial-hook.
You can write hook in extensions_ovveride_freepbx.conf
List of hooks in current freepbx version is:
[macro-dialout-trunk-predial-hook]
[macro-dialout-one-predial-hook]
[macro-dial-hunt-predial-hook]
[macro-dial-ringall-predial-hook]
[macro-dialout-dundi-predial-hook]

arheops
- 15,544
- 1
- 21
- 27
0
you can do it without any configuration in asterisk configs. first you have to install DialPlanInjection module on your freepbx and then route the calls to the php file in this path : /var/lib/asterisk/agi-bin

iman tavakoli
- 7
- 1