[asterisk-users] MATH

2010-02-02 Thread Thomas Perron
I want to allow users to dial my DID Then, hear my ginger3 intro Then, depending on the number that they press, provide a total via MATH. Comments. Will this work? exten = 866,1,Goto(tommath,s,1) [tommath] exten = s,1,Read(NUMBER,ginger3,2,skip,5) exten = s,n,Gotoif($[${NUMBER} = 14]?onefour)

Re: [asterisk-users] MATH

2010-02-02 Thread Steve Edwards
On Tue, 2 Feb 2010, Thomas Perron wrote: I want to allow users to dial my DID Then, hear my ginger3 intro Then, depending on the number that they press, provide a total via MATH. Comments. Will this work? [snip] You've been asking this and related questions for days. Wouldn't it be faster

Re: [asterisk-users] MATH

2010-02-02 Thread Thomas Perron
hi Steve, I am trying it and I am using the feedback from the group. In my view, that is the purpose; try, test, talk. Thanks for your interest. On Tue, Feb 2, 2010 at 7:15 PM, Steve Edwards asterisk@sedwards.com wrote: On Tue, 2 Feb 2010, Thomas Perron wrote: I want to allow users to

Re: [asterisk-users] MATH

2010-02-02 Thread --[ UxBoD ]--
- Thomas Perron thomas.per...@gmail.com wrote: hi Steve, I am trying it and I am using the feedback from the group. In my view, that is the purpose; try, test, talk. Thanks for your interest. On Tue, Feb 2, 2010 at 7:15 PM, Steve Edwards asterisk@sedwards.com wrote: On Tue, 2

Re: [asterisk-users] MATH

2010-02-01 Thread Danny Nicholas
-- Danny Nicholas -- -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Matt Riddell Sent: Sunday, January 31, 2010 5:11 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] MATH

Re: [asterisk-users] MATH

2010-02-01 Thread Danny Nicholas
Discussion' Subject: Re: [asterisk-users] MATH Clue, If a caller keys in 4 5 3 will some variable return 453? I ASSume yes, since you can make menu selections with DTMF, obviously you can process the results further or in other ways than that. Cary -Original Message- From: asterisk

Re: [asterisk-users] MATH

2010-02-01 Thread Thomas Perron
-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Matt Riddell Sent: Sunday, January 31, 2010 5:11 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] MATH On 31/01/10 6:27 PM, Thomas Perron wrote: what is wrong

Re: [asterisk-users] MATH

2010-02-01 Thread Danny Nicholas
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Thomas Perron Sent: Saturday, January 30, 2010 7:48 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] MATH I want to create a script for IVR that compiles responses, aggregates them to a total number. Then, run an equation based

Re: [asterisk-users] MATH

2010-01-31 Thread Håkon Nessjøen
You probably have to do a exten = s,1,n,Set(TOTAL=0) in the start of the call, to initialize the TOTAL variable On Sun, Jan 31, 2010 at 4:29 AM, Thomas Perron thomas.per...@gmail.comwrote: thanks for the response. I tried to simplify and am now tuning the following, but it is not responding

Re: [asterisk-users] MATH

2010-01-31 Thread Thomas Perron
hi i don't claim to be a star at this but there must be some obvious part missing; my dial plan is below. out put from cli follows. exten = 3011,1,Answer() exten = 3011,n,Set(TOTAL=0) exten = 3011,n,Set(TOTAL=${Math(${TOTAL}+300,int)}) exten = 3011,n,WaitExten(3) exten =

Re: [asterisk-users] MATH

2010-01-31 Thread Tzafrir Cohen
On Sun, Jan 31, 2010 at 10:37:29AM -0500, Thomas Perron wrote: hi i don't claim to be a star at this but there must be some obvious part missing; my dial plan is below. out put from cli follows. exten = 3011,1,Answer() exten = 3011,n,Set(TOTAL=0) exten =

Re: [asterisk-users] MATH

2010-01-31 Thread Thomas Perron
ok. that worked thanks!! On Sun, Jan 31, 2010 at 10:50 AM, Tzafrir Cohen tzafrir.co...@xorcom.com wrote: On Sun, Jan 31, 2010 at 10:37:29AM -0500, Thomas Perron wrote: hi i don't claim to be a star at this but there must be some obvious part missing; my dial plan is below.  out put from

Re: [asterisk-users] MATH

2010-01-31 Thread Thomas Perron
does dtmf any any variable that i can capture and use w/ some logic like in the case of a gotoif so, if caller enters a certain number then gotoif matches XX otherwise go to YY. On Sun, Jan 31, 2010 at 10:58 AM, Thomas Perron thomas.per...@gmail.com wrote: ok. that worked thanks!! On

Re: [asterisk-users] MATH

2010-01-31 Thread Steve Edwards
On Sun, 31 Jan 2010, Thomas Perron wrote: does dtmf any any variable that i can capture and use w/ some logic like in the case of a gotoif Anyone have a clue what this means? Anyone? Anyone? -- Thanks in advance, - Steve

Re: [asterisk-users] MATH

2010-01-31 Thread Philipp von Klitzing
does dtmf any any variable that i can capture and use w/ some logic like in the case of a gotoif Anyone have a clue what this means? Anyone? Anyone? How about this: does dtmf transmit any variable that i can capture and use w/ some logic like [in the case of a] gotoif Philipp --

Re: [asterisk-users] MATH

2010-01-31 Thread Cary Fitch
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards Sent: Sunday, January 31, 2010 2:29 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] MATH On Sun, 31 Jan 2010, Thomas Perron wrote: does dtmf any any variable that i can capture and use w

Re: [asterisk-users] MATH

2010-01-31 Thread Matt Riddell
On 31/01/10 6:27 PM, Thomas Perron wrote: what is wrong with this please: ;exten = 4,1,WaitExten(3) exten = 4,1,Set(TOTAL=${MATH(${TOTAL}+500,int)}) exten = 4,n,WaitExten(3) exten = 2,1,Set(TOTAL=${MATH(${TOTAL}+200,int)}) exten = 2,n,Waitexten(3) exten =

[asterisk-users] MATH

2010-01-30 Thread Thomas Perron
I want to create a script for IVR that compiles responses, aggregates them to a total number. Then, run an equation based on the result. Press 1 for X (X is a positive number 500) Press 2 for Y (Y is a positive number 200) Press 3 for Z (Z is a positive number 300) Press 20 to calculate the

Re: [asterisk-users] MATH

2010-01-30 Thread Håkon Nessjøen
For all calls combined, or for the current call? On Sat, Jan 30, 2010 at 2:48 PM, Thomas Perron thomas.per...@gmail.comwrote: I want to create a script for IVR that compiles responses, aggregates them to a total number. Then, run an equation based on the result. Press 1 for X (X is a

Re: [asterisk-users] MATH

2010-01-30 Thread Thomas Perron
total up for current call. then read back the number 2010/1/30 Håkon Nessjøen haa...@avelia.no: For all calls combined, or for the current call? On Sat, Jan 30, 2010 at 2:48 PM, Thomas Perron thomas.per...@gmail.com wrote: I want to create a script for IVR that compiles responses,

Re: [asterisk-users] MATH

2010-01-30 Thread Håkon Nessjøen
Try something like: exten = 1,1,WaitExten(3) exten = 1,1,Set(TOTAL=${MATH(${TOTAL}+500,int)}) exten = 1,n,WaitExten(3) exten = 2,1,Set(TOTAL=${MATH(${TOTAL}+200,int)}) exten = 2,n,WaitExten(3) exten = 3,1,Set(TOTAL=${MATH(${TOTAL}+300,int)}) exten = 3,n,WaitExten(3) exten =

Re: [asterisk-users] MATH

2010-01-30 Thread Thomas Perron
thanks for the response. I tried to simplify and am now tuning the following, but it is not responding with anything. something wrong with timing? here is what I have: exten = 1625,1,Answer() exten = 1625,n,Set(TOTAL=${MATH(${TOTAL}+500,int)}) exten = 1625,n,WaitExten(3) exten = 9625,1,Answer()

[asterisk-users] MATH

2010-01-30 Thread Thomas Perron
what is wrong with this please: ;exten = 4,1,WaitExten(3) exten = 4,1,Set(TOTAL=${MATH(${TOTAL}+500,int)}) exten = 4,n,WaitExten(3) exten = 2,1,Set(TOTAL=${MATH(${TOTAL}+200,int)}) exten = 2,n,Waitexten(3) exten = 3,1,Set(TOTAL=${MATH(${TOTAL}+300,int)}) exten = 3,n,WaitExten(3) exten =

[asterisk-users] MATH function

2006-12-19 Thread Rilawich Ango
I try to use function MATH or GoToIf for checking the negative value but CLI shows an error as following. exten = s,11,Set(bt=${MATH(-10)}) func_math.c:164 builtin_function_math: '' is not a valid number exten = s,11,GoToIf($[-1 0]?20) WARNING[12926]: ast_expr2.y:729 op_negate: non-numeric