[Asterisk-Dev] Re: [Asterisk-cvs] asterisk/configs extensions.conf.sample, 1.34, 1.35

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Oct 29 12:10:26 MST 2004


On Friday 29 October 2004 12:59, Florian Overkamp wrote:
> Hi,
>
> On Sun, 2004-10-24 at 05:49, markster at lists.digium.com wrote:
> >  ; switch => IAX2/user:password at bigserver/local
> > +;
> > +; An "lswitch" is like a switch but is literal, in that
> > +; variable substitution is not performed at load time
> > +; but is passed to the switch directly (presumably to
> > +; be substituted in the switch routine itself)
> > +;
> > +; lswitch => Loopback/12${EXTEN}@othercontext
>
> Could we make one variable parsed and one literal ?
>
> I'm thinking of using this for SIP SRV virtual hosting:
>
> lswitch = Loopback/${EXTEN}*${SIPDOMAIN}@in-guest
>
> However, inside the local channel ${SIPDOMAIN} is empty, therefore the
> ${SIPDOMAIN} should really be expanded before going into the switch. Can
> that be done ?

Try:

switch => Loopback/$\{EXTEN\}*${SIPDOMAIN}@in-guest

The backslashes escape the first variable until runtime.  Not sure if this
will work or not, but it's worth a try.  If it doesn't work, should be a
one-line change.

-- 
Tilghman



More information about the asterisk-dev mailing list