[Asterisk-Users] extensions.conf

Michael George george at mutualdata.com
Mon Aug 23 13:48:09 MST 2004


On Mon, Aug 23, 2004 at 09:40:54AM -0500, Steve Maroney wrote:
> For Example:
> 
> [iax-demo]
> exten => s,1,Playback(demo-abouttotry)
> exten => s,2,Dial(IAX2/guest at misery.digium.com/s at default)
> exten => s,3,Playback(demo-nogo)
> 
> 
> [some-menu]
> exten => s,1,Playback(Some-file)
> exten => s,2,Playback(another-file)
> exten => s,3,Playback(another-file)
> exten => s,4,WaitExten(4)
> exten => s,5,Queue(some-queue)
> 
> exten => 300,1,Goto(iax-demo,s,1)
> exten => 300,2,goto(s,3)
> 
> [some-other-menu]
> exten => s,1,Playback(Some-different-file)
> exten => s,2,Playback(some-other-file)
> exten => s,3,WaitExten(4)
> exten => s,4,Queue(different-queue)
> 
> exten => 300,1,Goto(iax-demo,s,1)
> exten => 300,2,Goto(s,1)
> 
> You see, I want the iax-demo in both contexts, but after the demos done,
> I want the caller to be returned to the context, but where depends on
> the calling context. Any help ?

Since you have the extensions the same in both contexts, why don't you just
change it to be like this:

[iax-demo]
exten => 300,1,Playback(demo-abouttotry)
exten => 300,2,Dial(IAX2/guest at misery.digium.com/s at default)
exten => 300,3,Playback(demo-nogo)


[some-menu]
exten => s,1,Playback(Some-file)
exten => s,2,Playback(another-file)
exten => s,3,Playback(another-file)
exten => s,4,WaitExten(4)
exten => s,5,Queue(some-queue)
include => iax-demo
wxten => 300,4,goto(s,3)

[some-other-menu]
exten => s,1,Playback(Some-different-file)
exten => s,2,Playback(some-other-file)
exten => s,3,WaitExten(4)
exten => s,4,Queue(different-queue)

include => iax-demo
exten => 300,4,Goto(s,1)

-- 
-M

There are 10 kinds of people in this world:
	Those who can count in binary and those who cannot.



More information about the asterisk-users mailing list