[Asterisk-cvs] asterisk/include/asterisk channel.h,1.36,1.37

martinp at lists.digium.com martinp at lists.digium.com
Thu Dec 18 17:50:36 CST 2003


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

Modified Files:
	channel.h 
Log Message:
Allow doing digital PRI to PRI calls automatically


Index: channel.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- channel.h	1 Oct 2003 21:01:31 -0000	1.36
+++ channel.h	18 Dec 2003 23:42:10 -0000	1.37
@@ -224,11 +224,47 @@
 
 	unsigned int callgroup;
 	unsigned int pickupgroup;
+
+	/*! channel flags of AST_FLAG_ type */
+	int flag;
 	
 	/*! For easy linking */
 	struct ast_channel *next;
 
 };
+
+#define AST_FLAG_DIGITAL	1	/* if the call is a digital ISDN call */
+
+static inline int ast_test_flag(struct ast_channel *chan, int mode)
+{
+	return chan->flag & mode;
+}
+
+static inline void ast_set_flag(struct ast_channel *chan, int mode)
+{
+	chan->flag |= mode;
+}
+
+static inline void ast_clear_flag(struct ast_channel *chan, int mode)
+{
+	chan->flag &= ~mode;
+}
+
+static inline void ast_set2_flag(struct ast_channel *chan, int value, int mode)
+{
+	if (value)
+		ast_set_flag(chan, mode);
+	else
+		ast_clear_flag(chan, mode);
+}
+
+static inline void ast_dup_flag(struct ast_channel *dstchan, struct ast_channel *srcchan, int mode)
+{
+	if (ast_test_flag(srcchan, mode))
+		ast_set_flag(dstchan, mode);
+	else
+		ast_clear_flag(dstchan, mode);
+}	
 
 struct chanmon;
 




More information about the svn-commits mailing list