[SR-Users] decimal fraction problem

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 22 23:05:38 CET 2011


Hello,

On 2/21/11 10:28 AM, 侯旭光 wrote:
> Hello
>
> I need to add q value while using  function append_branch(),but the 
> function only takes decimal fraction as the parameter.
> What if I want to use pv to add q value?
> The $var and $avp just have string and integer type.
> Thanks a lot!
do:

km_append_branch("$var(branchuri)");
$(branch(q)[-1]) = $var(q);

$var(q) has to hold an integer value that represents the decimal 
fraction value multiplied with 100 (so if q should be 0.5, then $var(q) 
= 50).

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110222/35e27840/attachment.htm>


More information about the sr-users mailing list