aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authormoy <moy@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-21 04:23:52 +0000
committermoy <moy@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-21 04:23:52 +0000
commit1218e168e5b2533c022df0dedf998d0e7a072e64 (patch)
treed3a4392b12423a54f441b383c2f06b88e1b82398 /channels/chan_dahdi.c
parent6cb3cad07264b9dfc19c0af4858991d87606472b (diff)
Merged revisions 213216 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r213216 | moy | 2009-08-19 23:26:59 -0400 (Wed, 19 Aug 2009) | 1 line fixed bug caused by calling ast_request without calling ast_call on an R2 channel, ie, CHANISAVAIL ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@213475 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 7beb0d735..81a0e17dc 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -3544,6 +3544,7 @@ static int dahdi_call(struct ast_channel *ast, char *rdest, int timeout)
if (p->mfcr2) {
openr2_calling_party_category_t chancat;
int callres = 0;
+ char *c, *l;
c = strchr(dest, '/');
if (c) {
@@ -4524,7 +4525,7 @@ static int dahdi_hangup(struct ast_channel *ast)
}
#endif
#ifdef HAVE_OPENR2
- if (p->mfcr2) {
+ if (p->mfcr2 && p->mfcr2call && openr2_chan_get_direction(p->r2chan) != OR2_DIR_STOPPED) {
ast_log(LOG_DEBUG, "disconnecting MFC/R2 call on chan %d\n", p->channel);
/* If it's an incoming call, check the mfcr2_forced_release setting */
if (openr2_chan_get_direction(p->r2chan) == OR2_DIR_BACKWARD && p->mfcr2_forced_release) {
@@ -4537,6 +4538,9 @@ static int dahdi_hangup(struct ast_channel *ast)
openr2_chan_disconnect_call(p->r2chan, r2cause);
}
dahdi_r2_update_monitor_count(p->mfcr2, 1);
+ } else if (p->mfcr2call) {
+ ast_log(LOG_DEBUG, "Clearing call request on channel %d\n", p->channel);
+ p->mfcr2call = 0;
}
#endif
#ifdef HAVE_PRI