[OpenSIPS-Users] Performing math functions in OpenSIPs

Brad Bendy brad.bendy at benganetworks.com
Thu Mar 4 21:43:48 CET 2010


Yeah, that's exactly what I just did. Works like a champ, little
confusing on the eyes when your use to seeing 5 digit decimals, but it
gets the job done!

Thanks for the suggestion.

On Thu, 2010-03-04 at 20:23 +0000, Stanisław Pitucha wrote:

> On 04.03.2010 20:05, Brad Bendy wrote:
> > That makes since now, we had a float actually. At this time no way to
> > work with floats at all right?
> 
> There's always a workaround :)
> 
> >>> $avp(i:55) = $avp(i:70) * .006;
> 
> $avp(i:55) = $avp(i:70) * 6;
> 
> Just treat i:55 as if it was multiplied by 1000. It seems like you're
> trying to do some cost calculation - so just assume that i:55 is
> expressed as the number of 10'ths of a cent.
> 
> Then format it properly when needed for output.
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-- 
Brad Bendy
Chief Technical Officer
brad.bendy at benganetworks.com

Benga Networks, LLC.
10115 E. Bell Rd, Ste. 107-451
Scottsdale, AZ 85260-2189

Toll Free:    877-44-BENGA
Local:          480-970-5200
Cell:             602-550-4004
Fax:             866-852-4468
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100304/1567ce01/attachment.htm 


More information about the Users mailing list