[OpenSER-Users] db_extra: the avp value does not correspond to the real value
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue May 20 17:01:29 CEST 2008
Hi Bruno,
I advice you to upgrade to 1.3 as 1.1 is no longer supported, so nobody
will troubleshoot it anymore.
Regards,
Bogdan
Bruno Machado wrote:
> Hi friends.
>
> OK. People... I'm almost getting crazy. I don't understand what is
> happening.
> I already looked for an answer, but I didn't find nothing yet. I am
> recording 8 extra
> values in ACC, but the SQL command is using a weird value for one of
> them. So,
> I removed 6 of them to facilitate the analyze. Look at the code:
>
> .
> .
> modparam("acc", "db_extra", "valueA=$avp(i:15); valueB=$avp(i:16)")
> .
> .
> .
> avp_write("i:15","$avp(i:15)");
> avp_write("i:16","$avp(i:16)");
>
> if(!t_relay())
> {
> sl_reply_error();
> exit;
> };
>
> avp_print();
> exit;
>
>
>
> OK. Looking at these lines, I would say: "the sql INSERT command will
> use the value
> 15 for avp:15 and 16 for avp:16". Now, look at the result of "avp_print":
>
>
> 2(11112) INFO:avpops:print_avp: p=0xb3b4a900, flags=0x0000
> 2(11112) INFO: id=<16>
> 2(11112) INFO: val_int=<16>
> 2(11112) INFO:avpops:print_avp: p=0xb3b4a8e8, flags=0x0000
> 2(11112) INFO: id=<15>
> 2(11112) INFO: val_int=<15>
>
> Nice. AVP 15 has the value 15 and the AVP 16 has 16.
> But something is happening.... It is the insert command:
>
> insert into acc
> (from_uri,to_uri,sip_method...............valueA,valueB,time) values
> .........,'16','16','2008-05-19 12:48:38').
>
> 16 twice!! Why? This question is running in loop inside my head. It
> should be "....'15','16','2008-05-19 12:48:38'.....".
>
>
> The openser code above is executed just once by the INVITE.
>
> I can bet this error is the like when we sum "2 and 3" and the result
> is "6".
> You look at the equation, but you don't see it at all. And, when you
> ask your
> younger brother to see, he says: "you are stupid... 2+3=5".
>
> I never had this problem. I use several avps to log in the database
> and it is the
> first time that it happens. You can see that I'M NOT CHANGING the values
> of the avps.
>
> Am I doing a stupid thing? Or, maybe, am I being blind?
>
> By the way, I'm using version 1.1.1.
>
> Tks people.
>
>
>
>
> OK. Apparently, there's nothing wrong.
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
> Abra sua conta no Yahoo! Mail
> <http://br.rd.yahoo.com/mail/taglines/mail/*http://br.mail.yahoo.com/>,
> o único sem limite de espaço para armazenamento!
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
More information about the sr-users
mailing list