[Asterisk-Users] Prefix the * character

Steven Critchfield critch at basesys.com
Mon Dec 8 08:56:43 MST 2003


On Mon, 2003-12-08 at 09:15, Nicolas Bougues wrote:
> On Mon, Dec 08, 2003 at 08:58:07AM -0600, Barton Hodges wrote:
> > 
> > The lines in a context get reordered.  If you want to force the order
> > of those lines, put the exten lines in separate contexts and "include"
> > them... something like this:
> > 
> > [some-context]
> > include => prefix
> > include => my_local_e164_extension
> > 
> > [prefix]
> > exten => _XXXX,1,Prefix(3312345)
> > 
> > I don't know if that will solve your problem, but it is something to
> > consider.
> > 
> 
> My problem is that the exten lines in "my_local_e164_extension" still
> have to start at 2, since "prefix" used the 1 position, and that's
> what I'd like to avoid by using "s".
> 
> To do that, I put "immediate=yes" on my PRI in zapata.conf, but
> unfortunatly the Prefix command will use "s" as the extension, and
> generate a new extension like 3316918s, which is not really nice.

With "immediate=yes" you won't be capturing your DID information. So
turn it back to no. Then do a pattern match in your [prefix] context.
Something like below.

[prefix]
exten => _XXXX,1,Goto(my_local_e164_extension,3312345${EXTEN},1)

This will do the proper jump and get you back to priority 1 as you want.
It also eliminates the need for an include into this context. 

> Is there any way ta manipulate ${EXTEN} as a variable, rather that
> wich the Prefix function ? If so, I haven't found out.
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list