i wants to publish a certain playback using a click2call PHP script,
so the scenario will be:
-user click on the click2call button
-asterisk will initiate a call to extension No. 69
-the extension 69 will play a certain sound file
-the user will receive a call on his mobile to listen to the sound file
so i added the following lines to “extensions_custom.conf”
exten => 69,1,Answer()
exten => 69,n,Set(i=1)
exten => 69,n,While($[${i} < 3])
exten => 69,n,Playback(/ccc/test)
exten => 69,n,Wait(3)
exten => 69,n,Set(i=$[${i} + 1])
exten => 69,n,EndWhile
exten => 69,n,Hangup()
but the problem in this scenario that the sound file “test” starts playing before the mobile answers the call, also the loop is continues working if the mobile accepted the call and hang the line before finishing the process
any idea?