Try something like:<br><br>exten => 1,1,WaitExten(3)<br>exten => 1,1,Set(TOTAL=${MATH(${TOTAL}+500,int)})
<br>exten => 1,n,WaitExten(3)<br>exten => 2,1,Set(TOTAL=${MATH(${TOTAL}+200,int)})
<br>exten => 2,n,WaitExten(3)<br>exten => 3,1,Set(TOTAL=${MATH(${TOTAL}+300,int)})
<br>exten => 3,n,WaitExten(3)<br>exten => 9,1,SayNumber(${TOTAL})<br><br>Or something. Never used either math or saynumber before, but according to the documentation, something like this should work..<br><br><br><div class="gmail_quote">
On Sat, Jan 30, 2010 at 3:06 PM, Thomas Perron <span dir="ltr"><<a href="mailto:thomas.perron@gmail.com">thomas.perron@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
total up for current call.<br>
then read back the number<br>
<br>
<br>
<br>
2010/1/30 Håkon Nessjøen <<a href="mailto:haakon@avelia.no">haakon@avelia.no</a>>:<br>
<div><div></div><div class="h5">> For all calls combined, or for the current call?<br>
><br>
> On Sat, Jan 30, 2010 at 2:48 PM, Thomas Perron <<a href="mailto:thomas.perron@gmail.com">thomas.perron@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I want to create a script for IVR that compiles responses, aggregates<br>
>> them to a total number.<br>
>> Then, run an equation based on the result.<br>
>><br>
>> Press 1 for X (X is a positive number 500)<br>
>> Press 2 for Y (Y is a positive number 200)<br>
>> Press 3 for Z (Z is a positive number 300)<br>
>><br>
>> Press 20 to calculate the results<br>
>> = 500+200+300 =1000<br>
>> then,<br>
>> exten => s,n,Read(NUMBER,,1000)<br>
>> exten => s,n,SayDigits(${NUMBER})<br>
>><br>
>> --<br>
>> _____________________________________________________________________<br>
>> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
>><br>
>> asterisk-users mailing list<br>
>> To UNSUBSCRIBE or update options visit:<br>
>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
><br>
> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>