Hi how should i assign two different task for same extension in asterisk? For example, in context2 when caller presses 0 when audio is played completely, he/she taken to context2 and same audio is replayed from starting. I want to implement another task to extension 0, when audio is still playing if caller presses 0(once or twice) caller should be taken to context1. Is it possible?
[context1]
exten => s,1,NoOp(context1)
same => n,Playback(audio)
same => n,WaitExten(10)
exten => 1,1,Goto(context2,s,1)
exten => 0,1,Goto(context1,s,1)
[context2]
exten => s,1,NoOp(context2)
same => n,Playback(audio2)
same => n,WaitExten(10)
exten => 1,1,Goto(context3,s,1)
exten => 0,1,Goto(context2,s,1)
You may need four contexts. You need to change contexts before and after playing the recording, so that you are in contexts with the right set of actions.
It’s not possible in one context? Because I have many recordings. In each context audio will be played. After listening to the audio caller will provide dtmf to listen to next audio in next context. Suppose an audio is started playing, dude to some disturbance caller missed some sentence. so caller wants to listen the audio again from starting by pressing 0 from his dialpad, instead of waiting to finish the audio and listen again.
Replay should happen when audio is playing because when audio is played and caller presses 0 from his dailpad then caller will be taken to context 1 as shown in above example. Am I clear?