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.
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.