[libpri-commits] rmudgett: branch 1.4 r1489 - /branches/1.4/q931.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Feb 11 15:47:28 CST 2010


Author: rmudgett
Date: Thu Feb 11 15:47:24 2010
New Revision: 1489

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1489
Log:
Must send DISCONNECT if we have sent a response to a SETUP message.

Q.931 Section 5.3.2 a) says we send a RELEASE_COMPLETE to reject a call
SETUP if we have not already sent a message in response to the SETUP
message.

Modified:
    branches/1.4/q931.c

Modified: branches/1.4/q931.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/q931.c?view=diff&rev=1489&r1=1488&r2=1489
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Thu Feb 11 15:47:24 2010
@@ -5290,6 +5290,26 @@
 	case PRI_CAUSE_REQUESTED_CHAN_UNAVAIL:
 	case PRI_CAUSE_IDENTIFIED_CHANNEL_NOTEXIST:
 	case PRI_CAUSE_UNALLOCATED:
+		/* See Q.931 Section 5.3.2 a) */
+		switch (c->ourcallstate) {
+		case Q931_CALL_STATE_NULL:
+		case Q931_CALL_STATE_CALL_INITIATED:
+		case Q931_CALL_STATE_CALL_PRESENT:
+			/*
+			 * Send RELEASE_COMPLETE because some other message
+			 * has not been sent previously.
+			 */
+			disconnect = 0;
+			release_compl = 1;
+			break;
+		default:
+			/*
+			 * Send DISCONNECT because some other message
+			 * has been sent previously.
+			 */
+			break;
+		}
+		break;
 	case PRI_CAUSE_INVALID_CALL_REFERENCE:
 		/* We'll send RELEASE_COMPLETE with these causes */
 		disconnect = 0;




More information about the libpri-commits mailing list