r3197 - in trunk: libminisip/source/sip minisip/minisip/gui/textui

mikma at minisip.org mikma at minisip.org
Tue Feb 6 21:51:10 CET 2007


Author: mikma
Date: 2007-02-06 21:51:09 +0100 (Tue, 06 Feb 2007)
New Revision: 3197

Modified:
   trunk/libminisip/source/sip/SipDialogVoipClient.cxx
   trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx
Log:
* Don't send invite_ok to gui if mikey authentication problem caused
  the call to fail.
* Handle security_failed in textui.



Modified: trunk/libminisip/source/sip/SipDialogVoipClient.cxx
===================================================================
--- trunk/libminisip/source/sip/SipDialogVoipClient.cxx	2007-02-06 17:48:51 UTC (rev 3196)
+++ trunk/libminisip/source/sip/SipDialogVoipClient.cxx	2007-02-06 20:51:09 UTC (rev 3197)
@@ -261,13 +261,18 @@
 //FIXME: CESC: for now, route set is updated at the transaction layer		
 		
 		bool ret = sortMIME(*resp->getContent(), peerUri, 3);
+		if( !ret ) {
+			// Fall through to a2012 terminating the
+			// call and sending security_failed to the gui
+			return false;
+		}
 
 		CommandString cmdstr(dialogState.callId, SipCommandString::invite_ok, getMediaSession()->getPeerUri(),
 							(getMediaSession()->isSecure()?"secure":"unprotected"));
 		
 		getSipStack()->getCallback()->handleCommand("gui", cmdstr);
 		
-		return ret;
+		return true;
 	}else{
 		return false;
 	}

Modified: trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx
===================================================================
--- trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx	2007-02-06 17:48:51 UTC (rev 3196)
+++ trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx	2007-02-06 20:51:09 UTC (rev 3197)
@@ -187,6 +187,13 @@
 		sendCommand("media", cmdstr);
 	
 	}
+	else if (cmd.getOp()=="security_failed"){
+		handled=true;
+		state="IDLE";
+		setPrompt(state);
+		displayMessage("Security is not handled by the receiver", red);
+		inCall=false;
+	}
 	
 	if (cmd.getOp()=="remote_ringing"){
 		handled=true;



More information about the Minisip-devel mailing list