Basically:
I want to connect my computer into the public phone line, and then, when a program requests it, Asterisk should dial a home/mobile phone, play a sound clip on repeat, and then stop when the other person hangs up.
I know dialplans can do this, if you use a local phone connected to the computer and dial an extension, then Asterisk can dial a number and play a sound clip, but is it possible for Asterisk to do this process when prompted simply by another program?
I am greatly interested to know at least if this is possible, although any pointers in the right direction would be handy.
Thank you very much for your time and insight.
2 quick ways i can think of doing this :
your app drops a .call file into /var/spool/asterisk/outgoing that originates the call, handing it to a context that does the soundfile loop
your app connects to the Manager port, authenticates and Originates a call, handing it to a context etc etc …
Thank you very much. So once I have asterisk running, and I place the .call file in the /var/spool/asterisk/outgoing directory, then asterisk will take the file, and, from the context field in the .call file, go to the right context in the extensions.conf file?
Does the .call file specify the number to dial, or do you start the extension section with
exten => [extension no.],1,Dial([phone no.]) ?
the .call file tells asterisk which number to dial, and then which context/exten to insert the call into when it is answered. You can define the context-extension-priority where the call gets inserted into (so you can put it in halfway through your IVR script if you want). Alternatively, it can run just one application.
see: voip-info.org/tiki-index.php … o-dial+out