[asterisk-users] How to make the sum of a ${VARIABLE} + 1 ??

2010-11-03 Thread Jonas Kellens
Hello, I have this in my dialplan : exten = s,n,Set(vgLabel=vg(${number}+1)) exten = s,n,GoTo(${vgLabel}) But in stead of vgLabel becoming the SUM of 2 numbers, it is just a string : [Nov 3 16:17:27] -- Executing [...@macro-f:43] Set(SIP/test-0002, vgLabel=vg(1+1)) in new stack [Nov

Re: [asterisk-users] How to make the sum of a ${VARIABLE} + 1 ??

2010-11-03 Thread Paul Belanger
On Wed, Nov 3, 2010 at 9:18 AM, Jonas Kellens jonas.kell...@telenet.be wrote: exten = s,n,Set(vgLabel=vg(${number}+1)) exten = s,n,Set(vgLabel=vg$[${number} + 1]) untested -- Paul Belanger | dCAP Polybeacon | Consultant Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode) | Blog:

Re: [asterisk-users] How to make the sum of a ${VARIABLE} + 1 ??

2010-11-03 Thread Danny Nicholas
_ From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jonas Kellens Sent: Wednesday, November 03, 2010 8:19 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] How to make the sum of a ${VARIABLE}

Re: [asterisk-users] How to make the sum of a ${VARIABLE} + 1 ??

2010-11-03 Thread Philipp von Klitzing
exten = s,n,Set(vgLabel=vg(${number}+1)) exten = s,n,GoTo(${vgLabel}) But in stead of vgLabel becoming the SUM of 2 numbers, it is just a string : Use the MATH function. Philipp -- _ -- Bandwidth and Colocation

Re: [asterisk-users] How to make the sum of a ${VARIABLE} + 1 ??

2010-11-03 Thread Zeeshan Zakaria
Its good to know the MATH function because it can do much more and also deal with floating point numbers. However in your case a simple addition would be suffice as other posters posted, or try Danny's GotoIf if it fits your scenario. Set(vgLabel=vg${MATH(${vg}+1,i)}) Zeeshan A Zakaria --