In all three cases the call has been completed successfully because the UAS has sent the final response (200-OK). A CANCEL only works if it arrives at the UAS before the UAS sends a final response.
The proxy should always forward the 200-OK for the INVITE on toward the UAC. The UAS responds to the CANCEL with 200-OK, but does not do anything (the CANCEL is too late). Section 9.2 of RFC 3261 describes the UAS behavior. If the proxy forwarded the 200-OK for the INVITE before it processed the CANCEL request, it can respond to the CANCEL with 200-OK without passing it on toward the UAS. If the proxy processes the CANCEL first, it would respond to the CANCEL with 200-OK, and send the CANCEL to all branches it had sent the original INVITE to. However, the state of the INVITE transaction does not change until a final response is seen for the INVITE. In the cases below, that will be 200-OK because the CANCEL is too late. The proxy would process the 200-OK as if it did not send the CANCEL. The CANCEL completes independently when the cancel response is seen. The UAC too must wait for a final response to the INVITE. A 200-OK response to the CANCEL does not mean the INVITE was cancelled, only that it matched a transaction. If the caller hung up, the UAC can respond to the 200-OK (INVITE) by sending the ACK followed immediately with a BYE request to terminate the dialog. cheers, (-:bob Robert F. Penfield Chief Software Architect Acme Packet, Inc. 130 New Boston Street Woburn, MA 01801 [EMAIL PROTECTED] ----- Original Message ----- From: "feng zhang" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 26, 2002 10:49 AM Subject: [Sip-implementors] What shold do ? > Hi All, > > Look at the scenarios below: > > 1) > > User A Stateful Proxy User B > | | | > |-----1.INVITE--------->| | > | |------2.INVITE---------->| > |<----3. 100------------| | > | |<------4. 100------------| > | | | > |-----5.CANCEL--------->| <--200 OK-----| > > NOTE that , Stateful Proxy has received "CANCEL", at the same time > > User B's "200 OK" is on the line, and Proxy has not received it. For > > stateful proxy has received User A's "CANCEL", so it forwords "CANCEL" > > request to User B. But once it sends "CANCEL", User B's "200 OK" > > arrives. NOW, what should the proxy do? and what should User B do? > > User B has just sent "200 OK", then he/she will receive "CANCEL" > > 2) > > User A Stateful Proxy User B > | | | > |-----1.INVITE--------->| | > | |------2.INVITE---------->| > |<----3. 100------------| | > | |<------4. 100------------| > | | | > |-----5.CANCEL--------->|<-------------200 OK-----| > > Here, AT THE SAME TIME Stateful Proxy receives User A's "CANCEL" AND User B's "200 OK", > > what should Proxy do then? > > 3) > > User A Stateful Proxy User B > | | | > |-----1.INVITE--------->| | > | |------2.INVITE---------->| > |<----3. 100------------| | > | |<------4. 100------------| > | | | > |-----5.CANCEL---> |<-------------200 OK-----| > > Here, User A's "CANCEL" is on the line, while stateful proxy has recieved > > User B's 200 OK, proxy should forward this 200 OK, but when it has forwarded > > the 200 OK, it receives User A's "CANCEL", then , what should proxy do? > > And User A will receive User B's 200 OK after the "CANCEL" request, > > what should User A do ? > > Thanks a lot to give me an answer1 > > Best Regards. > > > > > _______________________________________________ > Sip-implementors mailing list > [EMAIL PROTECTED] > http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors > _______________________________________________ Sip-implementors mailing list [EMAIL PROTECTED] http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
