Allow doing digital PRI to PRI calls automatically

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Martin Pycko
2003-12-18 23:42:10 +00:00
parent 9e996ceef8
commit f96c0762ff
3 changed files with 41 additions and 0 deletions

View File

@@ -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) { \