Hello Everyone, :mrgreen:
Here is what I want to do:
Allow a user to dial a number through browser. Index.php will ask for user phone number ($x), party phone number ($y), and caller id number ($z). Then process the call to $x and give him ringtone of calling to $y with caller id $z as provided by the user on the form.
Here is what I have done so far:
Explored floAPI (phpclasses.org/browse/package/2521.html) and here is my dial request in a php file:
Vairables $x and $y are typed by user when they browes to index.php and so this works beautifully.
Here is my problem and question to you:
1- The above method works for calling but it has a BIG flaw. Asterisk calls both parties simultaneously leading to confusion if one party picks up later than the other. In fact Asterisk should dial party $x first because they initiaed the call and once they pickup then dial party $y. How can I overcome this problem in originate command? do a channel status check? how? I am pretty new to this so maybe there is even a whole new approach through phpagi???!!! or something else.
2- I know that originate through AMI should be able to pass CallerID and Async variable but I am not sure how to do it with floAPI. Any leads would be much appreciated.
3- I am also confused about phpagi and floAPI. Maybe someone can shed a bit of light there. Is floAPI an application that does the dirty work for connecting to Asterisk AMI? I have used it to run any CLI command possible on Asterisk and it works. While if I do a “manager show commands” then I come up with different set of commands. Which way should I take? phpagi or floAPI? I am totally confused.
spits out different instructions than those of:
from Asterisk CLI, leading me to beleive they are two different things?! Or are they? and that floAPI uses originate and not manager originate command. Please correct me if I am wrong. That’s also when I get stuck with Caller ID because I don’t know how to pass caller id variable along with originate.
Thanks a bunch