From 178a5023d73bf010d4440cb19bcd9895d8f3cf59 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Mon, 20 Jul 2009 01:14:25 +0000 Subject: [PATCH] fix: if a CANCEL to non-existing call received, reply 481 error git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1473 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmSipDispatcher.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/AmSipDispatcher.cpp b/core/AmSipDispatcher.cpp index 0a209b2b..a8f93fb1 100644 --- a/core/AmSipDispatcher.cpp +++ b/core/AmSipDispatcher.cpp @@ -94,8 +94,14 @@ void AmSipDispatcher::handleSipMsg(AmSipRequest &req) // Basic OPTIONS support AmSipDialog::reply_error(req,200,"OK"); return; - } - else { + + } else if(req.method == "CANCEL"){ + // CANCEL to a (here) non-existing dialog + AmSipDialog::reply_error(req,481, + "Call leg/Transaction does not exist"); + return; + + } else { AmSessionFactory* sess_fact = AmPlugIn::instance()->findSessionFactory(req); if(!sess_fact){