Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue
Hi, Got a bit further with this, reason that the 200OK ( to INVITE) is being discarded is because of this code : static int nua_invite_client_preliminary(nua_client_request_t *cr, int status, char const *phrase, sip_t const *sip) { nua_handle_t *nh = cr->cr_owner; nua_dialog_usage_t *du = cr->cr_usage; nua_session_usage_t *ss = nua_dialog_usage_private(du); assert(sip); if (ss && sip && sip->sip_rseq) { /* Handle 100rel responses */ sip_rseq_t *rseq = sip->sip_rseq; /* Establish early dialog - we should fork here */ if (!nua_dialog_is_established(nh->nh_ds)) { nta_outgoing_t *tagged; nua_dialog_uac_route(nh, nh->nh_ds, sip, 1, 1); nua_dialog_store_peer_info(nh, nh->nh_ds, sip); /* Tag the INVITE request */ tagged = nta_outgoing_tagged(cr->cr_orq, nua_client_orq_response, cr, sip->sip_to->a_tag, sip->sip_rseq); if (tagged) { nta_outgoing_destroy(cr->cr_orq), cr->cr_orq = tagged; } else { cr->cr_graceful = 1; ss->ss_reason = "SIP;cause=500;text=\"Cannot Create Early Dialog\""; } } When we get a 183 reliable response Sofia creates an early dialog and creates a new tagged INVITE request if (tagged) { nta_outgoing_destroy(cr->cr_orq) It looks like it marks the original request for destruction, the problem is when a 200OK comes in with a different tag, it looks as if its matched against the original transaction which is marked for destruction and so is discarded by the code I posted initially in outgoing_recv in nta.c We are handling all media (SDP) ourselves and have set PRACK to be one of the methods our app handles. We are using the nua API. Can Pekka or someone say whether PRACK and forking is supported with the way we are using the Stack. We've seen some posts saying there are various bugs. When PRACK is not used the first 200OK received is passed to the application with cancel sent to the others. This is the behaviour we would like even when PRACK is used. However it seems that when the first 183 reliable is received this results in subsequent 200OK from other forks to be discarded. We just want the first 200OK final response to be passed to our application irrespective of which fork its from and are happy for CANCEL to be sent to others. Any comments most appreciated. Thanks --- On Wed, 29/6/11, Nauman Sulaiman wrote: > From: Nauman Sulaiman > Subject: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue > To: sofia-sip-devel@lists.sourceforge.net > Date: Wednesday, 29 June, 2011, 23:06 > Hi, using Sofia 1.12.11 > > We have the following flow > > > UAC > UAS > --> > INVITE > <-- > 183 rel > ---> > PRACK > <--- > 200OK > > <--- > 200 OK (different To tag to 183 > above) > > ---> > ACK > ---> > BYE > > > On the 200 OK to the Invite, if it has different To tag to > the 183 > Sofia thinks its orphan 200 final response and discards. > This is the code > that causes this. This only happens when PRACK is involved. > If the INVITE is sent without support for 100 rel all is ok > > > if (orq->orq_destroyed && 200 <= status > && status < 300) { > if (orq->orq_uas && > su_strcasecmp(sip->sip_to->a_tag, orq->orq_tag) != > 0) { > /* Orphan 200 Ok to INVITE. ACK > and BYE it */ > SU_DEBUG_5(("nta: Orphan 200 Ok > send ACK&BYE\n")); > return nta_msg_ackbye(sa, > msg); > } > return -1; /* Proxy statelessly > (RFC3261 section 16.11) */ > } > > > It looks like the orq_destroyed bit is set which is causing > this. Is the fork of the 200OK not regarded as existing > INVITE transaction. Any pointers > to help solve this most appreciated. > > Thanks > > -- > All of the data generated in your IT infrastructure is > seriously valuable. > Why? It contains a definitive record of application > performance, security > threats, fraudulent activity, and more. Splunk takes this > data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > ___ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel > -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2
Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue
Hi Nauman, 2011/7/1 Nauman Sulaiman : > We are handling all media (SDP) ourselves and have set PRACK to be one of the > methods our app handles. We are using the nua API. > > Can Pekka or someone say whether PRACK and forking is supported with the way > we are using the Stack. We've seen some posts saying there are various bugs. > > When PRACK is not used the first 200OK received is passed to the application > with cancel sent to the others. This is the behaviour we would like even when > PRACK is used. However it seems that when the first 183 reliable is received > this results in subsequent 200OK from other forks to be discarded. We just > want the first 200OK final response to be passed to our application > irrespective of which fork its from and are happy for CANCEL to be sent to > others. Unfortunately PRACK (and early dialog) support is broken vis-a-vis the forking. Sofia ditches the original invite, and treats the first early dialog as the only one. -- Pekka.Pessi mail at nokia.com -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue
Hi Nauman, did you find a solution for the problem when forking is combined with PRACK? Currently we are running into same problems with sofia-sip connecting to a server that uses forking. Seems that disabling PRACK and soa engine works. But what if PRACK is required? Thanks, Timo > Hi, > > Got a bit further with this, reason that the 200OK ( to INVITE) is being > discarded is because of this code : > > static int nua_invite_client_preliminary(nua_client_request_t *cr, > int status, char const *phrase, > sip_t const *sip) > { > nua_handle_t *nh = cr->cr_owner; > nua_dialog_usage_t *du = cr->cr_usage; > nua_session_usage_t *ss = nua_dialog_usage_private(du); > > assert(sip); > > if (ss && sip && sip->sip_rseq) { > /* Handle 100rel responses */ > sip_rseq_t *rseq = sip->sip_rseq; > > /* Establish early dialog - we should fork here */ > if (!nua_dialog_is_established(nh->nh_ds)) { > nta_outgoing_t *tagged; > > nua_dialog_uac_route(nh, nh->nh_ds, sip, 1, 1); > nua_dialog_store_peer_info(nh, nh->nh_ds, sip); > > /* Tag the INVITE request */ > tagged = nta_outgoing_tagged(cr->cr_orq, > nua_client_orq_response, cr, > sip->sip_to->a_tag, sip->sip_rseq); > if (tagged) { > nta_outgoing_destroy(cr->cr_orq), cr->cr_orq = tagged; > } > else { > cr->cr_graceful = 1; > ss->ss_reason = "SIP;cause=500;text=\"Cannot Create Early Dialog\""; > } > } > > > When we get a 183 reliable response Sofia creates an early dialog and creates > a new tagged INVITE request > > if (tagged) { > nta_outgoing_destroy(cr->cr_orq) > > It looks like it marks the original request for destruction, the problem is > when a 200OK comes in with a different tag, it looks as if its matched > against the original transaction which is marked for > destruction and so is > discarded by the code I posted initially in outgoing_recv in nta.c > > > We are handling all media (SDP) ourselves and have set PRACK to be one of the > methods our app handles. We are using the nua API. > > Can Pekka or someone say whether PRACK and forking is supported with the way > we are using the Stack. We've seen some posts saying there are various bugs. > > When PRACK is not used the first 200OK received is passed to the application > with cancel sent to the others. This is the behaviour we would like even when > PRACK is used. However it seems > that when the first 183 reliable is > received this results in subsequent 200OK from other forks to be discarded. > We just want the first 200OK final response to be passed to our application > > irrespective of which fork its from and are happy for CANCEL to be sent to > others. > > Any comments most appreciated. > Thanks > ___ Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android. https://produkte.web.de/freemail_mobile_startseite/ -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue
Hi Timo No we don't have a solution, we looked into it and it needs major changes so we left it. Regards From: Timo Bruhn To: nauman762-h...@yahoo.co.uk Cc: sofia-sip-devel@lists.sourceforge.net Sent: Wednesday, 14 March 2012, 11:04 Subject: Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue Hi Nauman, did you find a solution for the problem when forking is combined with PRACK? Currently we are running into same problems with sofia-sip connecting to a server that uses forking. Seems that disabling PRACK and soa engine works. But what if PRACK is required? Thanks, Timo > Hi, > > Got a bit further with this, reason that the 200OK ( to INVITE) is being > discarded is because of this code : > > static int nua_invite_client_preliminary(nua_client_request_t *cr, > int status, char const *phrase, > sip_t const *sip) > { > nua_handle_t *nh = cr->cr_owner; > nua_dialog_usage_t *du = cr->cr_usage; > nua_session_usage_t *ss = nua_dialog_usage_private(du); > > assert(sip); > > if (ss && sip && sip->sip_rseq) { > /* Handle 100rel responses */ > sip_rseq_t *rseq = sip->sip_rseq; > > /* Establish early dialog - we should fork here */ > if (!nua_dialog_is_established(nh->nh_ds)) { > nta_outgoing_t *tagged; > > nua_dialog_uac_route(nh, nh->nh_ds, sip, 1, 1); > nua_dialog_store_peer_info(nh, nh->nh_ds, sip); > > /* Tag the INVITE request */ > tagged = nta_outgoing_tagged(cr->cr_orq, > nua_client_orq_response, cr, > sip->sip_to->a_tag, sip->sip_rseq); > if (tagged) { > nta_outgoing_destroy(cr->cr_orq), cr->cr_orq = tagged; > } > else { > cr->cr_graceful = 1; > ss->ss_reason = "SIP;cause=500;text=\"Cannot Create Early Dialog\""; > } > } > > > When we get a 183 reliable response Sofia creates an early dialog and creates > a new tagged INVITE request > > if (tagged) { > nta_outgoing_destroy(cr->cr_orq) > > It looks like it marks the original request for destruction, the problem is > when a 200OK comes in with a different tag, it looks as if its matched > against the original transaction which is marked for > destruction and so is > discarded by the code I posted initially in outgoing_recv in nta.c > > > We are handling all media (SDP) ourselves and have set PRACK to be one of the > methods our app handles. We are using the nua API. > > Can Pekka or someone say whether PRACK and forking is supported with the way > we are using the Stack. We've seen some posts saying there are various bugs. > > When PRACK is not used the first 200OK received is passed to the application > with cancel sent to the others. This is the behaviour we would like even when > PRACK is used. However it seems > that when the first 183 reliable is > received this results in subsequent 200OK from other forks to be discarded. > We just want the first 200OK final response to be passed to our application > > irrespective of which fork its from and are happy for CANCEL to be sent to > others. > > Any comments most appreciated. > Thanks > ___ Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android. https://produkte.web.de/freemail_mobile_startseite/-- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue
Hi, I need to manage the PRACK side application, I set NUTAG_APPL_METHOD("PRACK"), With this configuration are passed to the application the 183. How do I configure the stack to deliver the application only the PRACK?, Thanks, Beppe 2012/3/14 Timo Bruhn : > Hi Nauman, > > did you find a solution for the problem when forking is combined with PRACK? > Currently we are running into same problems with sofia-sip connecting to a > server that uses forking. > > Seems that disabling PRACK and soa engine works. But what if PRACK is > required? > > Thanks, > Timo > > >> Hi, >> >> Got a bit further with this, reason that the 200OK ( to INVITE) is being >> discarded is because of this code : >> >> static int nua_invite_client_preliminary(nua_client_request_t *cr, >> int status, char const *phrase, >> sip_t const *sip) >> { >> nua_handle_t *nh = cr->cr_owner; >> nua_dialog_usage_t *du = cr->cr_usage; >> nua_session_usage_t *ss = nua_dialog_usage_private(du); >> >> assert(sip); >> >> if (ss && sip && sip->sip_rseq) { >> /* Handle 100rel responses */ >> sip_rseq_t *rseq = sip->sip_rseq; >> >> /* Establish early dialog - we should fork here */ >> if (!nua_dialog_is_established(nh->nh_ds)) { >> nta_outgoing_t *tagged; >> >> nua_dialog_uac_route(nh, nh->nh_ds, sip, 1, 1); >> nua_dialog_store_peer_info(nh, nh->nh_ds, sip); >> >> /* Tag the INVITE request */ >> tagged = nta_outgoing_tagged(cr->cr_orq, >> nua_client_orq_response, cr, >> sip->sip_to->a_tag, sip->sip_rseq); >> if (tagged) { >> nta_outgoing_destroy(cr->cr_orq), cr->cr_orq = tagged; >> } >> else { >> cr->cr_graceful = 1; >> ss->ss_reason = "SIP;cause=500;text=\"Cannot Create Early Dialog\""; >> } >> } >> >> >> When we get a 183 reliable response Sofia creates an early dialog and >> creates a new tagged INVITE request >> >> if (tagged) { >> nta_outgoing_destroy(cr->cr_orq) >> >> It looks like it marks the original request for destruction, the problem is >> when a 200OK comes in with a different tag, it looks as if its matched >> against the original transaction which is marked for > destruction and so is >> discarded by the code I posted initially in outgoing_recv in nta.c >> >> >> We are handling all media (SDP) ourselves and have set PRACK to be one of >> the methods our app handles. We are using the nua API. >> >> Can Pekka or someone say whether PRACK and forking is supported with the >> way we are using the Stack. We've seen some posts saying there are various >> bugs. >> >> When PRACK is not used the first 200OK received is passed to the application >> with cancel sent to the others. This is the behaviour we would like even >> when PRACK is used. However it seems > that when the first 183 reliable is >> received this results in subsequent 200OK from other forks to be discarded. >> We just want the first 200OK final response to be passed to our application >> > irrespective of which fork its from and are happy for CANCEL to be sent to >> others. >> >> Any comments most appreciated. >> Thanks >> > > ___ > Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone > und Android. > https://produkte.web.de/freemail_mobile_startseite/ > > -- > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > ___ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel