+
+ /* RFC 3261 section 9. "CANCEL has no effect on a request to which a UAS has
+ * already given a final response." */
+ if (!p->pendinginvite && (req->method == SIP_CANCEL)) {
+ transmit_response(p, "481 Call/Transaction Does Not Exist", req);
+ return res;
+ }
+