These modifications were implementated for dialogs having PRACK and UPDATE
--- a/modules/dialog/dlg_handlers.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_handlers.c Fri Jun 14 13:55:24 2013 +0200 @@ -1249,16 +1249,18 @@ }
if ( (event==DLG_EVENT_REQ || event==DLG_EVENT_REQACK) - && new_state==DLG_STATE_CONFIRMED) { + && (new_state==DLG_STATE_CONFIRMED || new_state==DLG_STATE_EARLY)) {
timeout = get_dlg_timeout(req); if (timeout!=default_timeout) { dlg->lifetime = timeout; } - if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) { + if (new_state!=DLG_STATE_EARLY) { + if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) { LM_ERR("failed to update dialog lifetime\n"); + } } - if (update_cseqs(dlg, req, dir)!=0) { + if ((event != DLG_EVENT_REQACK) && (update_cseqs(dlg, req, dir)!=0)) { LM_ERR("cseqs update failed\n"); } else { dlg->dflags |= DLG_FLAG_CHANGED;
--- a/modules/dialog/dlg_hash.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_hash.c Fri Jun 14 13:55:24 2013 +0200 @@ -883,6 +883,7 @@ break; case DLG_EVENT_REQACK: switch (dlg->state) { + case DLG_STATE_EARLY: case DLG_STATE_CONFIRMED_NA: dlg->state = DLG_STATE_CONFIRMED; break;
Hello,
I have some comments related to the patches, as I couldn't dig much into sources due to traveling constraints. See them inline.
On 6/14/13 2:10 PM, Halina Nowak wrote:
These modifications were implementated for dialogs having PRACK and UPDATE
--- a/modules/dialog/dlg_handlers.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_handlers.c Fri Jun 14 13:55:24 2013 +0200 @@ -1249,16 +1249,18 @@ }
if ( (event==DLG_EVENT_REQ || event==DLG_EVENT_REQACK)
- && new_state==DLG_STATE_CONFIRMED) {
&& (new_state==DLG_STATE_CONFIRMED ||
new_state==DLG_STATE_EARLY)) {
This above is to catch PRACK, right? UPDATE should be sent after 200ok, or is allowed also for early dialogs?
timeout = get_dlg_timeout(req); if (timeout!=default_timeout) { dlg->lifetime = timeout; }
if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) {
if (new_state!=DLG_STATE_EARLY) {
if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) { LM_ERR("failed to update dialog lifetime\n");
} }
if (update_cseqs(dlg, req, dir)!=0) {
if ((event != DLG_EVENT_REQACK) && (update_cseqs(dlg, req,
dir)!=0)) { LM_ERR("cseqs update failed\n"); } else { dlg->dflags |= DLG_FLAG_CHANGED;
--- a/modules/dialog/dlg_hash.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_hash.c Fri Jun 14 13:55:24 2013 +0200 @@ -883,6 +883,7 @@ break; case DLG_EVENT_REQACK: switch (dlg->state) {
case DLG_STATE_EARLY: case DLG_STATE_CONFIRMED_NA: dlg->state = DLG_STATE_CONFIRMED;
Here it seems to go to state DLG_STATE_CONFIRMED due to an ACK even there was no 200ok reply. Why is needed like that or have I misunderstood something?
Cheers, Daniel
On 21.06.2013 19:20, Daniel-Constantin Mierla wrote:
Hello,
I have some comments related to the patches, as I couldn't dig much into sources due to traveling constraints. See them inline.
On 6/14/13 2:10 PM, Halina Nowak wrote:
These modifications were implementated for dialogs having PRACK and UPDATE
--- a/modules/dialog/dlg_handlers.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_handlers.c Fri Jun 14 13:55:24 2013 +0200 @@ -1249,16 +1249,18 @@ }
if ( (event==DLG_EVENT_REQ || event==DLG_EVENT_REQACK)
- && new_state==DLG_STATE_CONFIRMED) {
&& (new_state==DLG_STATE_CONFIRMED ||
new_state==DLG_STATE_EARLY)) {
This above is to catch PRACK, right? UPDATE should be sent after 200ok, or is allowed also for early dialogs?
Just answering from a protocol point of view, without code review:
The main purpose of UPDATE is to update the sessions although there is a pending INVITE transaction. Thus, yes, UPDATE can be sent although there was no 200 OK to the INVITE yet.
regards Klaus
On 6/24/13 1:51 PM, Klaus Darilion wrote:
On 21.06.2013 19:20, Daniel-Constantin Mierla wrote:
Hello,
I have some comments related to the patches, as I couldn't dig much into sources due to traveling constraints. See them inline.
On 6/14/13 2:10 PM, Halina Nowak wrote:
These modifications were implementated for dialogs having PRACK and UPDATE
--- a/modules/dialog/dlg_handlers.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_handlers.c Fri Jun 14 13:55:24 2013 +0200 @@ -1249,16 +1249,18 @@ }
if ( (event==DLG_EVENT_REQ || event==DLG_EVENT_REQACK)
- && new_state==DLG_STATE_CONFIRMED) {
&& (new_state==DLG_STATE_CONFIRMED ||
new_state==DLG_STATE_EARLY)) {
This above is to catch PRACK, right? UPDATE should be sent after 200ok, or is allowed also for early dialogs?
Just answering from a protocol point of view, without code review:
The main purpose of UPDATE is to update the sessions although there is a pending INVITE transaction. Thus, yes, UPDATE can be sent although there was no 200 OK to the INVITE yet.
Thanks for clarification, so far the occasion of seeing UPDATE requests out there is rather a rare event.
Cheers, Daniel
Hello,
I reworked a bit the first patch and applied it to master branch.
But the second one, to set state DLG_STATE_CONFIRMED, is not clear that is needed and you didn't comment to my previous email related to it.
Cheers, Daniel
On 6/14/13 2:10 PM, Halina Nowak wrote:
These modifications were implementated for dialogs having PRACK and UPDATE
--- a/modules/dialog/dlg_handlers.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_handlers.c Fri Jun 14 13:55:24 2013 +0200 @@ -1249,16 +1249,18 @@ }
if ( (event==DLG_EVENT_REQ || event==DLG_EVENT_REQACK)
- && new_state==DLG_STATE_CONFIRMED) {
&& (new_state==DLG_STATE_CONFIRMED ||
new_state==DLG_STATE_EARLY)) {
timeout = get_dlg_timeout(req); if (timeout!=default_timeout) { dlg->lifetime = timeout; }
if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) {
if (new_state!=DLG_STATE_EARLY) {
if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) { LM_ERR("failed to update dialog lifetime\n");
} }
if (update_cseqs(dlg, req, dir)!=0) {
if ((event != DLG_EVENT_REQACK) && (update_cseqs(dlg, req,
dir)!=0)) { LM_ERR("cseqs update failed\n"); } else { dlg->dflags |= DLG_FLAG_CHANGED;
--- a/modules/dialog/dlg_hash.c Fri Jun 14 13:45:41 2013 +0200 +++ b/modules/dialog/dlg_hash.c Fri Jun 14 13:55:24 2013 +0200 @@ -883,6 +883,7 @@ break; case DLG_EVENT_REQACK: switch (dlg->state) {
case DLG_STATE_EARLY: case DLG_STATE_CONFIRMED_NA: dlg->state = DLG_STATE_CONFIRMED; break;
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users