[Serusers] Avpops: avp_op() function

Xavier TRENTIN xavier.trentin at efixo.com
Fri Apr 21 12:30:29 CEST 2006


Hi all,
i'm using openser 1.0.0.

I'm trying to use avpops' avp_op() function to add 100 to the Cseq value 
(just to test the  avp_op() function).

Here is the code inserted in ser.cfg:

    if (is_method("REGISTER"))
    {
        avp_printf("i:20","$hdr(CSeq)");
        xlog("L_INFO"," +*+ 1 : '$avp(i:20)'\n");
        avp_subst("i:20","/(.*) REGISTER/\1/");
        xlog("L_INFO"," +*+ 2 : '$avp(i:20)'\n");
        avp_op("i:20","add/i:0x1100100");
        xlog("L_INFO"," +*+ 3 : '$avp(i:20)'\n");
    }

And here is the log:
 3(19936)  +*+ 1 : '6543 REGISTER'
 3(19936)  +*+ 2 : '6543'
 3(19936)  +*+ 3 : '6543'

So the final result is 6543 instead of 6643...

Can  anybody tell me what I am doing wrong?

Thanks in  advance.

Best Regards,
Xavier.




More information about the sr-users mailing list