diff options
author | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-18 23:42:10 +0000 |
---|---|---|
committer | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-18 23:42:10 +0000 |
commit | 004e6fbc01058a6d4378591c952ff81224486fe2 (patch) | |
tree | 3e6dcf1531f45b32f4d5a26efcee9c8a57e20684 /include/asterisk/channel.h | |
parent | ec575218eade22e49ff78bf6bf8c2ebac1e2ad88 (diff) |
Allow doing digital PRI to PRI calls automatically
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1868 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/channel.h')
-rwxr-xr-x | include/asterisk/channel.h | 36 |
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) { \ |