r3276 - trunk/libminisip/source/subsystem_signaling/sip

erik at minisip.org erik at minisip.org
Wed May 9 21:33:55 CEST 2007


Author: erik
Date: 2007-05-09 21:33:54 +0200 (Wed, 09 May 2007)
New Revision: 3276

Modified:
   trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx
Log:

 * Answer with "481" instead of "405" when we receive unexpected
  "BYE" / "CANCEL" / "ACK" requests.



Modified: trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx	2007-05-09 19:23:34 UTC (rev 3275)
+++ trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx	2007-05-09 19:33:54 UTC (rev 3276)
@@ -290,15 +290,13 @@
 		int statusCode;
 		const char *reasonPhrase;
 
-		if( pkt->getType()=="CANCEL" ){
+		if (pkt->getType()=="BYE" || 
+				pkt->getType()=="CANCEL" || 
+				pkt->getType()=="ACK")
+		{
 			statusCode = 481;
-			reasonPhrase = "Call/Transaction Does Not Exist";
-		}
-// 		else{
-// 			statusCode = 501;
-// 			reasonPhrase = "Not Implemented";
-// 		}
-		else{
+			reasonPhrase = "Call/transaction does not exist";
+		}else {
 			statusCode = 405;
 			reasonPhrase = "Method Not Allowed";
 		}



More information about the Minisip-devel mailing list