[asterisk-users] MATH
Danny Nicholas
danny at debsinc.com
Mon Feb 1 08:20:02 CST 2010
There's nothing wrong with this per se; it just needs to be in a context;
try it this way;
- exten => 8284,1,Goto(domath,s,1)
[domath]
Exten => s,1,play(to-call-num-press)
- exten => 4,1,Set(TOTAL=${MATH(${TOTAL}+500,int)})
- exten => 4,n,WaitExten(3)
- exten => 4,n,Goto(domath,s,1)
- exten => 2,1,Set(TOTAL=${MATH(${TOTAL}+200,int)})
- exten => 2,n,Waitexten(3)
- exten => 2,n,Goto(domath,s,1)
- exten => 3,1,Set(TOTAL=${MATH(${TOTAL}+300,int)})
- exten => 3,n,WaitExten(3)
- exten => 3,n,Goto(domath,s,1)
- exten => 9,1,SayNumber(${TOTAL})
- exten => 9,n,Play(vm-goodbye)
- exten => 9,n,hangup
--
Danny Nicholas
--
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at 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 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 => 9,1,SayNumber(${TOTAL})
Heh, you might need to say what you're expecting and what you're getting :D
Straight off, all I can see is that 2 does 200, 3 does 300 and 4 does 500.
--
Cheers,
Matt Riddell
Managing Director
_______________________________________________
http://www.venturevoip.com/news.php (Daily Asterisk News)
http://www.venturevoip.com/exchange.php (Full ITSP Solution)
http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list