Hi,

Please find attached the new patch. It is intended to trigger the dialog duration computing when an acknowledged dialog times out. (Non acknowledged dialogs are not considered). Previously, such dialogs would not have a duration set on timeout. This is not configurable.

From an implementation point of view, the dialog duration computing is triggered when the timeout takes place while the dialog is inside a DLG_STATE_CONFIRMED state. I renounced at the string defines and defined an int value inside a dlg_cb.h header accessible to both acc and dialog module (didn't see fit to move the DLG_STATE_CONFIRMED from the dlg_hash.h header to this one).

Have a nice day,
Lucian

On 04/16/2015 06:57 PM, Lucian Balaceanu wrote:
Hello Daniel,

Thank you for your input. I will come with a second tested patch tomorrow.


On 04/16/2015 03:56 PM, Daniel-Constantin Mierla wrote:
Hello,

if I understood right, you want the calls that are cut after 30sec (or so) because the ACK was not routed to be stored with duration 0, right? If yes, then it should be made configurable via module parameter, with default of what was so far, because those calls also cost money in most of the cases, being answered.

As an extra note, I don't see a reason declare and to give the old state as a string, should be given as the associated integer ID (e.g., DLG_STATE_CONFIRMED) and compare params->dlg_data casting to unsigned int.

Cheers,
Daniel

On 16/04/15 11:51, Lucian Balaceanu wrote:
Hi,

I would like to propose a patch in which the dialog duration displayed in the cdrs is:
    0 -> timed-out not acknowledged dialogs
    duration from creation to timeout -> timed-out acknowledged dialogs

I am still testing the solution for the master branch while tests pass on a previous version.
Any comments on the code? (I am not particularly proud of the string defines in the dlg_cb.h, but am unsure where to include some const variable accessible to both acc and dialog to pass as calback param for dialog expiration)

Thank you,
Lucian Balaceanu


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
_______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev