tmp->chan->callingpres = chan->callingpres;
/* Presense of ADSI CPE on outgoing channel follows ours */
tmp->chan->adsicpe = chan->adsicpe;
+ /* pass the digital flag */
+ ast_dup_flag(tmp->chan, chan, AST_FLAG_DIGITAL);
/* Place the call, but don't wait on the answer */
res = ast_call(tmp->chan, numsubst, 0);
ast_log(LOG_WARNING, "Unable to create call on channel %d\n", p->channel);
return -1;
}
+ p->digital = ast_test_flag(ast,AST_FLAG_DIGITAL);
if (pri_call(p->pri->pri, p->call, p->digital ? PRI_TRANS_CAP_DIGITAL : PRI_TRANS_CAP_SPEECH,
p->prioffset, p->pri->nodetype == PRI_NETWORK ? 0 : 1, 1, l, p->pri->dialplan - 1, n,
l ? (ast->restrictcid ? PRES_PROHIB_USER_NUMBER_PASSED_SCREEN : (p->use_callingpres ? ast->callingpres : PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN)) : PRES_NUMBER_NOT_AVAILABLE,
/* Assume calls are not idle calls unless we're told differently */
i->isidlecall = 0;
i->alreadyhungup = 0;
+ i->digital = ctype;
+ ast_set2_flag(tmp, ctype, AST_FLAG_DIGITAL);
#endif
/* clear the fake event in case we posted one before we had ast_chanenl */
i->fake_event = 0;
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) { \