[cisco-voip] Need TCL tip: playing monetary amount

Andrew Pogrebennyk andrew.pogrebennyk at portaone.com
Mon Apr 20 15:14:02 EDT 2009


Hi,

Today I was surprised to realize that "media play %a" TCL command 
expects integer. I have got a billing system that returns balance as 
decimal and from my past experience I remember Cisco (and the very same 
TCL script) had no problem dealing with such format. And what staggers 
me most, it can play balance only if it's multiple 100 like: 100 for $1, 
500 for $5. If there are cents, the call is cut off like:

This command:
media play leg_incoming %a500
is going to play "you have 5 dollars"
And this one:
media play leg_incoming %a540
will play nothing. There are no errors in the debug, absolutely nothing.

As a temporary workaround I have implemented rounding to the next dollar 
in my script, however the cisco behavior in this case seems indisputably 
wrong. Is there something I am missing?
I have checked AS5300 with IOS version 12.3(18) and AS5350 with IOS 
version 12.3(15).

-- 
Sincerely,
Andrew Pogrebennyk


More information about the cisco-voip mailing list