[OpenSIPS-Users] opensips-cp CDR correlation

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Apr 29 15:40:16 CEST 2009


Brett Nemeroff wrote:
> On Wed, Apr 29, 2009 at 3:06 AM, Bogdan-Andrei Iancu
> <bogdan at voice-system.ro> wrote:
>   
>> So a proxy may account several BYEs, but the CDR generator has the duty
>> in picking the right one - like searching for the first 200OK BYE, if
>> not, picking the first non-200OK with a reply code that does not
>> indicate a malformed BYE ( parsing, transaction, etc)..
>>     
>
> Soooo.. Any chance of updating the SP for opensips-cp to do this? :)
> Can I just look for an ACC event where method='BYE' sip_code = 200 and
> ((from_tag=v_from_tag and to_tag=v_to_tag) or (from_tag=v_to_tag and
> to_tag=v_from_tag))
>   
this is not correct - see the example with 408 I gave to Inaki. It is 
not so simple to disregard the non-200 OK - you need to look at them if 
no 200 OK is present.

So, you should have BYEs sorted by reply_code (ASC) and if more with the 
same code, by time :D...Or do 2 selects: first for 200 replies (order by 
time) and if no result, for non-200 (also ordered by time)

Regards,
Bogdan



More information about the Users mailing list