Decimal in Read Dialplan


I want the caller to be able to enter a digits with decimal in between.

How can a caller enter 21.05 in following dialplan, if they use * on keypad, it comes as * and not as a decimal.

same => n(cc_amt),Read(cc_amt,ccamt,10,3,5)

Any suggestion would be appreciated.

currently can only think of doing it via phpagi, but still want to know if i can do it from dialplan.


if(strpos($str,’’) !== false) {
//String '
’ found
//Replacing it with string ‘.’
$str = str_replace(’*’,’.’,$str);

There are string replace, regular expression matching and sub-stringing operators available in the dial plan, so I believe the answer is yes.

Thanks for the reply david55.

Got the solution.

same => n,Set(rep_cc_amt=${REPLACE(cc_amt,*,.)}) same => n,NoOp(*** Replaced variable ${rep_cc_amt} ***)