THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Eduardo Lejarreta (lejarreta.e) 

Attached to Project - sip-router
Summary - Dialog bugs
Task Type - Bug Report
Category - dialog
Status - Unconfirmed
Assigned To - 
Operating System - Linux
Severity - Medium
Priority - Normal
Reported Version - 3.2
Due in Version - Undecided
Due Date - Undecided
Details - Good morning.

I think I've found 2 bugs and 1 improvement. Please correct me if I'm wrong.


1.- Having for instance "modparam("dialog", "default_timeout", 10800)" -> after 
a "kamctl restart" no timeout was triggered  

On "dlg_db_handler.c" -> on "load_dialog_info_from_db" function we should 
change this:

""""""""""""""""""""
...
dlg->tl.timeout = (unsigned int)(VAL_INT(values+9)) + get_ticks();
                        if (dlg->tl.timeout<=(unsigned int)time(0))
                                dlg->tl.timeout = 0;
                        else
                                dlg->tl.timeout -= (unsigned int)time(0);

dlg->lifetime = dlg->tl.timeout - get_ticks(); --------------->(NEW)

GET_STR_VALUE(cseq1, values, 10 , 1, 1);
                        GET_STR_VALUE(cseq2, values, 11 , 1, 1);
                        GET_STR_VALUE(rroute1, values, 12, 0, 0);
                        GET_STR_VALUE(rroute2, values, 13, 0, 0);
                        GET_STR_VALUE(contact1, values, 14, 1, 1);
                        GET_STR_VALUE(contact2, values, 15, 1, 1);
...
if (0 != insert_dlg_timer( &(dlg->tl), dlg->lifetime )) { ...  
--------------->(CORRECT)
...
//dlg->lifetime = 0; ---------------> (no sense on this)
dlg->dflags = 0;
dlg->dflags |= DLG_FLAG_TOBYE; --------------->(IMPROVEMENT: DLG_FLAG_TOBYE 
should be also saved in any way on DB. After a "kamctl restart" we loose this 
contextual flag. As for us it's very important we've forced on code.)
...
""""""""""""""""""""

instead of

""""""""""""""""""""
...
dlg->tl.timeout = (unsigned int)(VAL_INT(values+9)) + get_ticks();
                        if (dlg->tl.timeout<=(unsigned int)time(0))
                                dlg->tl.timeout = 0;
                        else
                                dlg->tl.timeout -= (unsigned int)time(0);

GET_STR_VALUE(cseq1, values, 10 , 1, 1);
                        GET_STR_VALUE(cseq2, values, 11 , 1, 1);
                        GET_STR_VALUE(rroute1, values, 12, 0, 0);
                        GET_STR_VALUE(rroute2, values, 13, 0, 0);
                        GET_STR_VALUE(contact1, values, 14, 1, 1);
                        GET_STR_VALUE(contact2, values, 15, 1, 1);
...
if (0 != insert_dlg_timer( &(dlg->tl), (int)dlg->tl.timeout )) { ... " 
--------------->(INCORRECT)
...
dlg->lifetime = 0;
dlg->dflags = 0;
...
""""""""""""""""""""

2.- In this scenario, if a RE-INVITE was received by Kamailio after restart, 
the call was dropped automatically (the timeout left was ignored).

On "dlg_handlers.c" -> on "dlg_onroute" function we should change this:

""""""""""""""""""""
...
timeout = get_dlg_timeout(req);
dlg->lifetime = timeout;
...
"""""""""""""""""""" --------------->(CORRECT)

instead of

""""""""""""""""""""
...
timeout = get_dlg_timeout(req);
if (timeout!=default_timeout) {
    dlg->lifetime = timeout;
}
...
""""""""""""""""""""  --------------->(INCORRECT)


As always, only for helping purpose not to bother anyone. 

Thanks and best regards.

Eduardo Lejarreta.

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=282

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to