Matthew Pounsett
2009-Apr-18 17:21 UTC
[asterisk-users] dialling multiple extensions in an internal context
-----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? Thanks, Matt Pounsett -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) iEYEARECAAYFAknqDAgACgkQmFeRJ0tjIxEjtACfVujjF+WC/If7LubuY1mfU8og 4N8An3tAXOQFpQDALqPpuDVWhOPP7ETf =RwS5 -----END PGP SIGNATURE-----
D Tucny
2009-Apr-18 17:47 UTC
[asterisk-users] dialling multiple extensions in an internal context
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
John F. Ervin
2009-Apr-18 21:17 UTC
[asterisk-users] dialling multiple extensions in an internal context
Can't you handle that by defining an outbound route? set it to hit a trunk or set of trunks when the correct dial pattern is detected? Matthew Pounsett wrote:> -----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? > > Thanks, > Matt Pounsett > > >