[asterisk-users] Match a Numer - then continue with dialplan

Douglas Garstang dgarstang at oneeighty.com
Wed Dec 20 10:58:49 MST 2006


> -----Original Message-----
> From: Eric "ManxPower" Wieling [mailto:eric at fnords.org]
> Sent: Wednesday, December 20, 2006 10:19 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Match a Numer - then continue with
> dialplan
> 
> 
> Douglas Garstang wrote:
> >> -----Original Message-----
> >> From: David Thomas [mailto:punknow at gmail.com]
> >> Sent: Tuesday, December 19, 2006 3:01 PM
> >> To: Asterisk Users Mailing List - Non-Commercial Discussion
> >> Subject: Re: [asterisk-users] Match a Numer - then continue with
> >> dialplan
> >>
> >>
> >> On 12/19/06, Douglas Garstang <dgarstang at oneeighty.com> wrote:
> >>> Anyone know if there's a way to match a dialplan extension, 
> >> execute some code, say set a variable, and then continue with 
> >> the dialplan?
> >>> I want to set a variable when the dialplan flows beyond a 
> >> certain context. This would be a great feature.
> >>> Doug.
> >> Have you tried using the SetVar cmd? I haven't tried it 
> but it sounds
> >> like it might work for this.
> >>
> >> http://www.voip-info.org/wiki/view/Asterisk+variables
> >>
> >> Regards,
> >> David
> > 
> > David,
> > 
> > If I call setvar, my variable will be set, but dialplan 
> processing will stop...
> 
> Then something else is wrong.  SetVar will not stop dialplan 
> processing. 
>   In 1.4, I believe SetVar() was removed.  Check upgrade.txt. 
>  Use Set 
> in 1.4 instead.

I was not clear. EXTENSION processing will stop. Once you've matched an extension, and your logic is running through priorities in an extension, you no longer have the ability to search for another extension to match against. That's what I need to do. Again, when control flows beyond a certain point, ie when all calls are now known to be extra-company, we need to set the callerid to the external company id... so that later on when we dial, the caller id presented to person in the other company is correct.


More information about the asterisk-users mailing list