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? /Chris
On Thu, 2004-01-22 at 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?Reread the documentation on variables again. exten => s,1,read(room) exten => s,2,SetVar(room=[${room} + 2000] exten => s,3,MeetMe(${room}|pqsd) -- Steven Critchfield <critch@basesys.com>
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