[OpenSIPStack] FW: Proxy - CANCEL Processing
Brought to you by:
joegenbaclor
From: Gustavo C. <cur...@ho...> - 2007-08-02 14:42:17
|
Resending with compressed logs. From: cur...@ho...To: ope...@li...urceforge.n= et; jb...@so...; joe...@gm...Subject: Proxy - CANC= EL ProcessingDate: Wed, 1 Aug 2007 22:32:29 +0200 Hi Joegen: I was checking the cancel processing in Proxy Only Mode. From t= he RFC 3261:=20 16.10 CANCEL Processing A stateful proxy MAY generate a CANCEL to any other request it has generate= d at any time (subject to receiving a provisional response to that request = as described in section 9.1). A proxy MUST cancel any pending client transa= ctions associated with a response context when it receives a matching CANCE= L request. A stateful proxy MAY generate CANCEL requests for pending INVITE client tra= nsactions based on the period specified in the INVITE=92s Expires header fi= eld elapsing. However, this is generally unnecessary since the endpoints in= volved will take care of signaling the end of the transaction. While a CANCEL request is handled in a stateful proxy by its own server tra= nsaction, a new response context is not created for it. Instead, the proxy = layer searches its existing response contexts for the server transaction ha= ndling the request associated with this CANCEL. If a matching response cont= ext is found, the element MUST immediately return a 200 (OK) response to th= e CANCEL request. In this case, the element is acting as a user agent serve= r as defined in Section 8.2. Furthermore, the element MUST generate CANCEL = requests for all pending client transactions in the context as described in= Section 16.7 step 10. If a response context is not found, the element does not have any knowledge= of the request to apply the CANCEL to. It MUST statelessly forward the CAN= CEL request (it may have statelessly forwarded the associated request previ= ously). From the RFC 3665: 3.8. Unsuccessful No Answer Alice Proxy 1 = Proxy 2 Bob | | | = | | INVITE F1 | | | = |--------------->| INVITE F2 | | | 100 F3 |= --------------->| INVITE F4 | |<---------------| 100 F5 |-= -------------->| | |<---------------| | = | | | 180 F6 | | = | 180 F7 |<---------------| | 180 F8 |<--------------= -| | |<---------------| | = | | CANCEL F9 | | | |-----------= ---->| | | | 200 F10 | = | | |<---------------| CANCEL F11 | = | | |--------------->| | | = | 200 F12 | | | |<--------= -------| | | | | CANCEL = F13 | | | |--------------->| | = | | 200 F14 | | | = |<---------------| | | | 48= 7 F15 | | | |<---------------| | = | | ACK F16 | | | = 487 F17 |--------------->| | |<---------------| = | | | ACK F18 | | = | 487 F19 |--------------->| | |<---------------|= | | | ACK F20 | | = | |--------------->| | | = | | | | In this scenario,= Alice gives up on the call before Bob answers (sends a 200 OK response). = Alice sends a CANCEL (F9) since no final response had been received from Bo= b. If a 200 OK to the INVITE had crossed with the CANCEL, Alice would have= sent an ACK then a BYE to Bob in order to properly terminate the call. Not= e that the CANCEL message is acknowledged with a 200 OK on a hop by hop bas= is, rather than end to end. But the OpenSBC behavior in Proxy Mode is: = Alice Proxy-OpenSBC Bob | INVITE | = | |--------------->| INVITE | | 100 |---------= ------>| |<---------------| 180 | | 180 |<---= ------------| |<---------------| | | CANCEL = | | |--------------->| | | 487 = | | |<---------------| CANCEL | | A= CK |--------------->| |--------------->| 200 | | = |<---------------| | | 487 | = | |<---------------| | | ACK = | | 200 |--------------->| |<---------------| = | I attached a log (CANCEL-OK.log) and a sip flow (CANCEL-OK.jpg). = I have two problems with the cancel: -When the callee don't answer, the cal= ler retransmit the cancel, because the OpenSBC don't send the 200 ok respon= se for the cancel. Log: CANCEL-RETRANS.log , Sip Flow: CANCEL-RETRANS.jpg -= When the callee send the 487(Request Cancelled) response for the INVITE bef= ore the 200 ok response for the CANCEL, the 200 ok is not been proxy by the= OpenSBC. Log: CANCEL-NOTOK.log , Sip Flow: CANCEL-NOTOK.jpg. In the log, t= he sesion is deleted by the 487:: 222:22:52.761 DBG: [CID=3D0x0475] Finding= transaction for SIP/2.0 487 Request Terminated222:22:52.762 DBG: [CID=3D0x= 0475] Setting Transaction ID to 955903155@192.168.0.60|z9hG4bKe531e528fbc6f= 89e|INVITE222:22:52.762 DTL: [CID=3D0x0475] Found IST|955903155@192.168.0.6= 0|z9hG4bKe531e528fbc6f89e|INVITE for SIP/2.0 487 Request Terminated222:22:5= 2.763 DTL: [CID=3D0x0475] IST(800569658) Event(SIPMessage) - SIP/2.0 487 Re= quest Terminated222:22:52.763 DBG: [CID=3D0x0475] TRANSACTION: (IST) SIP/2.= 0 487 Request Terminated State: 3222:22:52.764 DTL: [CID=3D0x06cb] *** QUEU= ED FOR DELETION *** SIPSession: 955903155@192.168.0.60222:22:52.764 DBG: [C= ID=3D0x0000] GC: First Stale Object ProxySession222:22:52.765 ERR: [CID=3D= 0x0000] GC: .\src\ProxySession.cxx:601 ProxySession::OnCheckRoutePolicy:: A= ttempt to CreateReference() a garbage collected pointer222:22:52.766 ERR: [= CID=3D0x0000] GC: .\src\ProxySession.cxx:625 ProxySession::OnFinalResponse:= : Attempt to CreateReference() a garbage collected pointerAny idea? Thanks = for your help. Gustavo =20 Descubre Live.com - tu propia p=E1gina de inicio, personalizada para ver r= =E1pidamente todo lo que te interesa en un mismo sitio. todo en el mismo si= tio.=20 Env=EDa mensajes de correo electr=F3nico directamente a tu blog con MSN. Ca= rga chistes, fotograf=EDas y muchas otras cosas. Es gratis.=20 _________________________________________________________________ Descubre Live.com - tu propia p=E1gina de inicio, personalizada para ver r= =E1pidamente todo lo que te interesa en un mismo sitio. http://www.live.com/getstarted= |