[Asterisk-cvs] asterisk/channels chan_zap.c,1.339,1.340

markster at lists.digium.com markster at lists.digium.com
Mon Sep 13 18:12:54 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv15224/channels

Modified Files:
	chan_zap.c 
Log Message:
Bring sanity to inband notification on PRI


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.339
retrieving revision 1.340
diff -u -d -r1.339 -r1.340
--- chan_zap.c	13 Sep 2004 21:34:47 -0000	1.339
+++ chan_zap.c	13 Sep 2004 22:14:34 -0000	1.340
@@ -4174,9 +4174,10 @@
 		switch(condition) {
 		case AST_CONTROL_BUSY:
 #ifdef ZAPATA_PRI
-			if (p->priindication_oob && p->sig == SIG_PRI)
-				res = pri_hangup(p->pri->pri, p->call, PRI_CAUSE_USER_BUSY);
-			else
+			if (p->priindication_oob && p->sig == SIG_PRI) {
+				chan->hangupcause = AST_CAUSE_USER_BUSY;
+				chan->_softhangup |= AST_SOFTHANGUP_DEV;
+			} else
 #endif
 				res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_BUSY);
 			break;
@@ -4242,9 +4243,10 @@
 		case AST_CONTROL_CONGESTION:
 			chan->hangupcause = AST_CAUSE_CONGESTION;
 #ifdef ZAPATA_PRI
-			if (p->priindication_oob && p->sig == SIG_PRI)
-				res = pri_hangup(p->pri->pri, p->call, PRI_CAUSE_SWITCH_CONGESTION);
-			else
+			if (p->priindication_oob && p->sig == SIG_PRI) {
+				chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
+				chan->_softhangup |= AST_SOFTHANGUP_DEV;
+			} else
 #endif
 				res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
 			break;




More information about the svn-commits mailing list