How to assign two different task for same extension in asterisk?


#1

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)

#2

I dont understand clearly your requiments but based on the title of your question you cand o this using Local chanel