[asterisk-users] dialling multiple extensions in an internal context
D Tucny
d at tucny.com
Sat Apr 18 12:47:03 CDT 2009
2009/4/19 Matthew Pounsett <matt at conundrum.com>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hi there. I've done some googling around to try and find an example
> of what I'm trying to do, but it's one of those things that just seems
> hard to find the right terms to search for. If there's some
> documentation out there on this, I'd appreciate being pointed in the
> right direction. If not, then if someone has some ideas I'd
> appreciate that too. :)
>
>
> What I'm trying to do is set up some 'special' extensions in my
> internal context to change variables, or change something else in the
> session before dialling. To be clearer, here's an example. Say I've
> got this rather simple dial plan:
>
> [globals]
> TRUNK1=Zap/1
> TRUNK2=Zap/2
> TRUNK=${TRUNK1}
>
> [internal]
> _NXXXXXX,1,Dial(${TRUNK}/${EXTEN})
>
>
> I'd like to add an extension which I can dial before placing the
> actual call to change which trunk I'm using, like so:
>
> *55,1,SetVar(TRUNK=${TRUNK2})
>
> The problem is that once that's done, asterisk stops looking for me to
> dial an extension, and I'm trying to figure out how to get back to the
> top of the context and have asterisk wait for a new extension to
> dial. I've dug through the Asterisk O'Reilly book, and googled around
> some, but haven't come up with the answer.
>
> Thoughts anyone?
How about, something like one of these...
exten => _*55NXXXXXX,1,SetVar(TRUNK=${TRUNK2})
exten => _*55NXXXXXX,n,Dial(${TRUNK}/${EXTEN:3})
or
exten => _*55NXXXXXX,1,SetVar(TRUNK=${TRUNK2})
exten => _*55NXXXXXX,n,Goto(internal,${EXTEN:3},1)
or
exten => *55,1,SetVar(TRUNK=${TRUNK2})
exten => *55,n,DISA(no-password,internal)
or
exten => *55,1,SetVar(TRUNK=${TRUNK2})
exten => *55,n,WaitExten(5)
or use your imagination :)
d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090419/07813224/attachment.htm
More information about the asterisk-users
mailing list