[asterisk-users] play file and action only stop if one definedkey has been p

Yuan LIU yliu11 at hotmail.com
Sat Mar 10 17:33:08 MST 2007


>From: Thomas Winter <thowinter at googlemail.com>
>Date: Sat, 10 Mar 2007 09:47:26 +0100
>
>Am Friday 09 March 2007 23:51 schrieb Steve Murphy:
> > On Fri, 2007-03-09 at 23:01 +0100, Thomas Winter wrote:
>
> > > I didnt see the option.
> > >
> > > The number can be different and is stored in mySQL
> > >
> > > exten => ${tmp_var},1,NoOp(INFO key pressed)
> > > exten => ${tmp_var},n,GoTo(s,restart)
> >
> > Woa! can you really do that? I would have to check the code, but I have
> > the strong impression that you cannot use a variable in the extension
> > name field, they are not evaluated, nor are they really evaluatable. All
> > the extensions in a context are compared when looking for a match to a
> > target location, but....
> > I know that goto's etc, can use a variable in a reference, but not in a
> > definition like this.
>
>I can do this, but it is not working as I wrote before.

Then there must be a reason:-)  No, Asterisk will not complain about the 
syntax - that's probably why you say you "can".  But you can use "CLI> show 
dialplan" to examine the actual dialplan entered into Asterisk's memory.  
You'll see that all the lines you used a variable as extension declaration 
contains a null string as extension.  Or better, use show dialplan 
test-extention at your-context and realize that it either matches nothing, or 
matches some unexpected item. (Replace test-extension with a real value such 
as 1234, and your-context with your context name.)

Asterisk does not do dynamic extension assignment (maybe in AEL, but 
definitely not in extensions.conf).  It interprets all extensions upon 
reading extensions.conf.

Hope this helps.

Yuan Liu




More information about the asterisk-users mailing list