Good morning Daniel.
I cannot test this issue because I have no means, so I deduce what's
happening, and of course I could be mistaken.
1.- First BYE received, first listening process: dlg_onroute ->
..
/* run state machine */
switch ( req->first_line.u.request.method_value ) {
case METHOD_PRACK:
event = DLG_EVENT_REQPRACK; break;
case METHOD_ACK:
event = DLG_EVENT_REQACK; break;
case METHOD_BYE:
event = DLG_EVENT_REQBYE; break;
default:
event = DLG_EVENT_REQ;
}
next_state_dlg( dlg, event, &old_state, &new_state, &unref);
----------------------------------------------------------------------------
------------> new_state: DLG_STATE_DELETED ; old_state: DLG_STATE_CONFIRMED
2.- Second BYE received, second listening process: dlg_onroute ->
...
/* run state machine */
switch ( req->first_line.u.request.method_value ) {
case METHOD_PRACK:
event = DLG_EVENT_REQPRACK; break;
case METHOD_ACK:
event = DLG_EVENT_REQACK; break;
case METHOD_BYE:
event = DLG_EVENT_REQBYE; break;
default:
event = DLG_EVENT_REQ;
}
next_state_dlg( dlg, event, &old_state, &new_state, &unref);
----------------------------------------------------------------------------
------------> new_state: DLG_STATE_DELETED ; old_state: DLG_STATE_DELETED
...
done:
dlg_release(dlg); ---> before first process related callbacks are
executed by other processes like acc_cdr.c
return;
Thanks and best regards.
--
Eduardo Lejarreta.
De: sr-dev-bounces(a)lists.sip-router.org
[mailto:sr-dev-bounces@lists.sip-router.org] En nombre de Daniel-Constantin
Mierla
Enviado el: martes, 04 de junio de 2013 15:39
Para: Kamailio (SER) - Development Mailing List
Asunto: Re: [sr-dev] Dialog onroute requests.
Hello,
On 6/4/13 3:14 PM, Eduardo Lejarreta wrote:
Good evening.
Playing with latest "dialog module" versions (3.2, 3.3 and 4.0) I think
there could be an open "issue" with regard to dialog state management.
You can see on "dlg_handlers.c" on "dlg_onroute" function. On this
last
when you receive a BYE message it fires some CallBacks.
I you receive a close second BYE, this last one destroys the dialog because
"dlg_release" function is called from a parallel process avoiding the other
processes callback execution.
I know a second BYE it's not a normal circumstance but you know, the real
world .
I think dialog_ng doesn't have this issue but also it has no DB support.
can you give more specific details, like the lines of code you think may
have an open issue? A quick check, it seems dialog and dialog_ng have the
same processing of BYE request in dlg_onroute() and unref is done only on
transition state to terminate.
Cheers,
Daniel
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
*
http://asipto.com/u/katu *