[Asterisk-Users] Prefix the * character

Barton Hodges barton at gcmcomputers.com
Mon Dec 8 08:45:54 MST 2003


asterisk-users-admin at lists.digium.com 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.
> 
> Is there any way ta manipulate ${EXTEN} as a variable, rather that
> wich the Prefix function ? If so, I haven't found out.

You could always do something like this:

exten => 2,1,Dial(WHEREVER,3312345${EXTEN})

or assign it to a new variable:

exten => 2,1,SetVar(NEWEXTEN=3312345${EXTEN})
exten => 2,2,Dial(WHEREVER,${NEWEXTEN})

If I still don't have a grasp on what you're trying to accomplish,
could you post your extensions.conf?

Barton





More information about the asterisk-users mailing list