#457 acc db_extra parameters not inserted for failed calls

1.7.x
open
modules (454)
5
2012-01-05
2011-12-27
No

I am experiencing a strange problem. Here is my setup,

X (caller) -> A (opensips) -> B (asterisk) -> A (opensips) -> C1, C2, C3 ... Cn (carrier) -> Y (callee)

I get a minimum of two cdrs for each call since every call passes through same opensips twice at least. The problem is that if call fails on first carrier C1 and then terminated by second carrier C2, then respective failed cdr i.e. B -> A -> C1 has all db_extra fields as empty string. However, success cdr i.e. B -> A -> C2 has all values correct.

This happens for all intermediate failed cdrs, i.e. if C1, C2, C3 and so on all fail, and Cn is successful then only Cn will have db_extra values set, all others have empty string.

Even more interesting fact is that if ALL carriers fail, then only last failed cdr has db_extra values, rest have empty string.

Do note that db_extra fields are NOT null, but empty string. Also i have xlog these fields everywhere in opensips dial plan (route, failure route, branch route, reply route etc). The logs always show these fields with correct values but for some unknown reason these values are not going into db and empty string is being inserted instead.

Please help.

I am using Debian 6.0 32-bit, with opensips stable release 1.7.1, revision 8615. Feel free to ask for more info as needed.

Thank you.

Discussion

  • Muhammad Shahzad

    Guys, any suggestions on this problem?

     
  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> razvancrainea
     
  • Razvan Crainea

    Razvan Crainea - 2012-01-06

    Hi, Muhammad!

    What kind of pseudo-variables are you using in the db_extra parameter? AVPs, VARs?

    Regards,
    Răzvan Crainea

     
  • Muhammad Shahzad

    I am using AVPs. I have this in opensips.cfg,

    modparam("acc", "db_extra", "from_uri=$fu; \ from_transport=$pr; \ source_ip=$si; \ source_port=$sp; \ to_uri=$ru; \ to_transport=$rP; \ destination_ip=$rd; \ destination_port=$rp; \ contact=$ct; \ p_asserted_identity=$re; \ user_agent=$ua; \ cdr_id=$avp(cdr_id); \ call_type=$avp(call_type)")

    All the variables work correctly except last two. I can ignore call_type variable but need correct value in cdr_id.

    Thank you.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks