[OpenSER-Devel] [ openser-Bugs-1737524 ] dialog: missing callback call for timeout on early dialogs

SourceForge.net noreply at sourceforge.net
Tue Jul 24 20:29:19 CEST 2007


Bugs item #1737524, was opened at 2007-06-14 18:10
Message generated for change (Comment added) made by osas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1737524&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.2.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Bogdan (bogdan_iancu)
Summary: dialog: missing callback call for timeout on early dialogs

Initial Comment:
This bug is related to bug 1729550 - CANCEL does not update the dialog state:
http://sourceforge.net/tracker/index.php?func=detail&aid=1729550&group_id=139143&atid=743020

The scenario is the same. The dialog will transition from DLG_STATE_EARLY to DLG_STATE_DELETED on a callback from tm (TMCB_TRANS_DELETED) that will generate a DLG_EVENT_TDEL event.

In this particular case, the DLGCB_FAILED is not invoked.


Here's a simple patch that will fix this particular problem.  Maybe this is not the best approach (and it may not cover all other cases, but it is fixing this particular scenario):

# diff -Naurp dlg_handlers.c dlg_handlers.c.new 
--- dlg_handlers.c      2007-06-14 18:09:12.000000000 -0400
+++ dlg_handlers.c.new  2007-06-14 18:09:06.000000000 -0400
@@ -208,6 +208,13 @@ static void dlg_onreply(struct cell* t, 
                return;
        }
 
+       if ( event==DLG_EVENT_TDEL && new_state==DLG_STATE_DELETED &&
+               old_state==DLG_STATE_EARLY) {
+               DBG("DEBUG:dialog:dlg_onreply: dialog %p failed (transaction timeout)\n",
+                       dlg);
+               /* dialog setup not completed (timeout) */
+               run_dlg_callbacks( DLGCB_FAILED, dlg, rpl);
+       }
 
        return;
 }

----------------------------------------------------------------------

>Comment By: Ovidiu Sas (osas)
Date: 2007-07-24 14:29

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Hi Bogdan,

Tested ok and thanks for catching the dialog removal before running the
callback.
You can backport it to 1.2.
Time to move to the in-dialog requests ;-)


Thanks and regards,
Ovidiu

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2007-07-20 05:58

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Ovidiu,

can test with the current trunk version? I made a fix (hopefully) for
this. The match you sent was not correct as you were running the callbacks
after the dialog was completly removed :).

Please let me know if it works and if it yes, if it does what expected. If
again yes, I will prepare a backport to 1.2.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2007-07-06 13:19

Message:
Logged In: YES 
user_id=1395524
Originator: YES

without 100rel enabled and noisy_ctimer set, the dialog is destroyed.
with 100rel enabled (with or without the noisy_ctimer set), the dialog is
not destroyed.

see latest comments from bug 1727883

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2007-07-06 10:42

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Hi Bogdan,

If noisy_ctimer is set, then a 408 is generated and there is a callback.
If noisy_ctimer is not set, then no 408 is generated and as a result,
there is no callback.

Regards,
Ovidiu

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2007-07-06 04:51

Message:
Logged In: YES 
user_id=1275325
Originator: NO

OK...
First try to see if you don't get a 408 reply (if you don't, set
noisy_ctimer in TM to 1 and try again)..

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2007-07-05 10:22

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Can't remember exactly, but I think that I didn't got a 408 ... it was
quite silent ...

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2007-07-05 09:17

Message:
Logged In: YES 
user_id=1275325
Originator: NO

But in yhis case, you get a local 408 as a final reply......isn't it?

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2007-07-05 09:06

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Here's the scenario:
Make a call to an ATA.  While ringing, unplug the power cord for the ATA.
Now abort the call (hang up).

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2007-07-05 03:06

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Ovidiu,

do you have an example for a scenario where the transaction gets deleted
without any prior final reply?

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2007-07-03 09:21

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Ovidiu,

I will take a look on this.

Regards,
bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1737524&group_id=139143



More information about the Devel mailing list