[Asterisk-Users] Setting variable for a context for all
extensions?
Rich Adamson
radamson at routers.com
Mon May 9 06:12:08 MST 2005
The following works well with a Sipura spa3k:
exten => 3022,1,SetVar(_ALERT_INFO=bellcore-r3) ; selects Ringer
exten => 3022,2,Dial(SIP/3022,25,r) ; Sipura spa-3000 fxs port
------------------------
> Hi,
>
> Yes, I tried that, but it didn't work. I've tried this:
> [contextname]
> RING = r2
> _RING = r2
> __RING = r2
> but nothing worked...
>
> I did find that if I didn't set
> RING =
> under globals, the variable would actually never get reset between calls!
>
> Kind regards,
>
> Mark
>
> trixter http://www.0xdecafbad.com said:
> > have you tried setting the variable at the begining of the context?
> >
> > [contextname]
> > varname=value
> >
> >
> > On Sun, 2005-05-08 at 08:48 +0200, Mark Wormgoor wrote:
> >> Hi,
> >>
> >> Is it possible to set a variable for a context for all extensions? I
> >> haven't been able to find it. I want something like this in
> >> extensions.conf:
> >>
> >> [from-iaxfwd]
> >> exten => .,1,RING=r3
> >> exten => 123456,1,Goto(from-pstn,s,1)
> >>
> >> [from-internal]
> >> exten => .,1,RING=r2
> >> include => ext-local
> >>
> >> [ext-local]
> >> exten => 1,1,Dial(Zap/1,${LONGTIMEOUT})
> >> exten => 2,1,Dial(SIP/2,${LONGTIMEOUT})
> >>
> >> But how do I do this? I want to change the ring depending on the
> >> starting context. The above doesn't work.
> >>
> >> Kind regards,
> >>
> >> Mark
More information about the asterisk-users
mailing list