i'm trying to link my webapplication with my Asterisk server.
When the webapp's user changes the current customer, I want the new customer to be called, and the user to be connected to this customer.
But, when I tried to use the 'Originate' API call, the user designed by 'Callerid' is never called so the call is Hung Up.
How can I connect these two?
preguntado el 03 de mayo de 12 a las 16:05
The originate command is not immediately intuitive. The way the command works is that it will call the customer, and then, once the call is connected, it will bridge them to another extension (the person at your company).
This is an example using Asterisk.NET that I put together, but it really doesn't matter what interface to the AMI you use, because the steps will be the same: Acción de originar interfaz AMI Asterisk Manager
This should connect Channel
+1 555 1234
channel originate SIP/10 extension 00015551234
Look up PHP-SIP class: http://level7systems.co.uk/en/blog/Click+to+Call+with+PHP-SIP
User submits a form with calling (sip:user1@sip) and called (sip:user2@sip) parties SIP URIs. Web Server sends INVITE to sip:user1@sip. Once INVITE is accepted by user1, web server immediately sends REFER with sip:user2@sip in "Refer-to" header. Web Server terminates "call" by sending BYE to user1. As instructed in REFER request sent by a web server, user1 sends INVITE to sip:user2@sip.