Originate call from php, play sounds, and receive dtmf


(Erdei Dominik) #1

Hello!
Is there any solution to originate a call from a php script, and if the called extension answered play sound, and ability to receive dtmf signals?
Thanks!


(TheJames) #2

Yes…
https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=4817239


(Erdei Dominik) #3

Is there any example for this? Because I couldn’t find any example, how to hang up a call what I originated.


(TheJames) #4

You would typically originate to a context…

An example is shown here:


(Erdei Dominik) #5

I write down the scenario, maybe someone has a good idea. I used the alarmreceiver module to get the messages from my alarm system, it works great, it calls a php file and saves the event to mysql. I want that if there is an alarm, call multiple external numbers ans play a sound after hang up the phone and calls the second number etc. I successfully called a number and played a sound with callfiles, but how can I know when the call is finished and call the second number?


(David55) #6

Also asked on https://community.asterisk.org/t/originate-call-from-php-and-play-sound-and-return/90105