I have been trying to get phpagi to do originate and I fail over and over. I have been able to use Action: Command and send command originate which is the CLI originate and that works. But the AMI Originate doesn't work. Can anyone please guide me to an example of Originate somewhere? I am trying to have my php file (from the browser) to take variables $x, $y, and $z through a form and then process the call as follows:
- Code: Select all
Dial $x with Originate > Channel > SIP/testTrunk/$x and send call to Context: [testphp] and Exten: $y where the context [testphp] like the following (using CallerID: $z) :
exten => _X.,1,Answer()
exten => _X.,n,Dial(SIP/testTrunk/$y)
exten => _X.,n,Hangup()
Please guide me what the Originate part should look like in the php file and what file should go where as for as phpagi files go. I need some detailed documentation on how to use phpagi which unfortunately is missing on phpagi site.
I really appreciate any help on this.