Asterisk Play a file while calling for curl
In my dialplan I need to call a php file like below:
exten => 6666,n,Set(foo=${CURL(http://reports.cr.mrgroup.in/IVR/sp.php?tid=${tid})})
it gives reponse after 1 min or 2min , I want to play a music file in these times.
please give me some idea how to achieve this and if there any other option.
You can this as below example:
exten => test,1,Answer()
same => n,StartMusicOnHold()
same => n,Wait(20) ; Do processing here.
same => n,StopMusicOnHold()
same => n,Hangup()
Also your music on hold configuration will live /etc/asterisk/musiconhold.conf — if you install the sample configuration, it will be there with documentation inline.