Oops! ....
I wrote:
> In article <[EMAIL PROTECTED]>,
> Mark Wormgoor <[EMAIL PROTECTED]> 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)
>
> In the above example, you have both lines on priority 1. You've also
> forgotten the "_" to signify a pattern. Also, "_." would match the
> special extensions like i, h and t. Try the following:
>
> [from-iaxfwd]
> exten => _X.,1,RING=r3
should be:
exten => _X.,1,SetVar(RING=r3)
> exten => 123456,2,Goto(from-pstn,s,1)
>
> Then when a call to 123456 comes in, the first line will match (123456,1)
> and after executing it, Asterisk will be looking for (123456,2), which
> will match the second line.
>
> > [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})
>
> I'm not sure whather you can use include, but you could certainly do
> something like this. If you want to handle both single-digit and
> multi-digit extensions, you have to do them separately, because "."
> matches a minimum of one character:
>
> [from-internal]
> exten => _X,1,RING=r2
> exten => _X,2,Goto(ext-local,${EXTEN},1)
> exten => _X.,1,RING=r2
> exten => _X.,2,Goto(ext-local,${EXTEN},1)
And here too, the RING assignments should be in a SetVar().
> [ext-local]
> exten => 1,1,Dial(Zap/1,${LONGTIMEOUT})
> exten => 2,1,Dial(SIP/2,${LONGTIMEOUT})
>
> Hope this helps (and works!)
>
> Cheers
> Tony
> --
> Tony Mountifield
> Work: [EMAIL PROTECTED] - http://www.softins.co.uk
> Play: [EMAIL PROTECTED] - http://tony.mountifield.org
> _______________________________________________
> Asterisk-Users mailing list
> [email protected]
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users