jeet
1
Hi,
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.
Thanks.
jeet
2
currently can only think of doing it via phpagi, but still want to know if i can do it from dialplan.
[code]$str=‘22*05’;
if(strpos($str,’’) !== false) {
//String '’ found
//Replacing it with string ‘.’
$str = str_replace(’*’,’.’,$str);
}
[/code]
There are string replace, regular expression matching and sub-stringing operators available in the dial plan, so I believe the answer is yes.
jeet
4
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} ***)