summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartin Pycko <martinp@digium.com>2003-12-18 23:42:10 +0000
committerMartin Pycko <martinp@digium.com>2003-12-18 23:42:10 +0000
commitf96c0762ff24135bdf3ed52f0be367e5d65998a4 (patch)
tree3e6dcf1531f45b32f4d5a26efcee9c8a57e20684 /include
parent9e996ceef8e3a0c0174cd539714f4a3eeb250a49 (diff)
Allow doing digital PRI to PRI calls automatically
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/channel.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 13e97da7c..f0d998b68 100755
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -224,12 +224,48 @@ struct ast_channel {
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;
#define LOAD_OH(oh) { \