[Asterisk-Users] Using varables in MeetMe?

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Thu Jan 22 13:11:49 MST 2004


On Thursday 22 January 2004 12:06, Christopher Arnold wrote:
> Hi,
>
> Im trying to enable users to enter a conference number and then do a
> calculation on this and then send them to the conference. Lokk at
> this example:
>
> exten => s,1,Read(room)
> exten => s,2,SetVar,"${room}=[${room} + 2000]";
> exten => s,3,Meetme($room|pqsd)
>
> What happens is that the conference gets setup and everything, but
> the conference number is "$room". Not really what i expected...
>
> Is this a bug of a feature?

You're using variables incorrectly.  The ONLY way to substitute
variables is to use the ${} notation.  EVERY time you use this notation
the variable is substituted prior to evaluation and execution.  So to
correct your dialplan logic:

Read(room)
SetVar(room=$[${room} + 2000])
MeetMe(${room}|pqsd)

-Tilghman




More information about the asterisk-users mailing list