aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-26 18:38:19 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-26 18:38:19 +0000
commit0af53fd8bfd5017f3cc58ea3c54e856da4367200 (patch)
tree02e9d386668b27aa444ab9bd31fe87d8277e7db9 /channels
parent5a8bbaced441435467669f18aab1b8a0b0aa9031 (diff)
Minor cleanups on zap when hangup on callwait
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3319 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_zap.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 181a6629c..e8851c47f 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -3132,6 +3132,9 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast)
p->callwaitingrepeat = 0;
p->cidcwexpire = 0;
p->owner = NULL;
+ /* Don't start streaming audio yet if the incoming call isn't up yet */
+ if (p->subs[SUB_REAL].owner->_state != AST_STATE_UP)
+ p->dialing = 1;
zt_ring_phone(p);
} else if (p->subs[SUB_THREEWAY].owner) {
struct timeval tv;
@@ -3619,6 +3622,7 @@ static struct ast_frame *__zt_exception(struct ast_channel *ast)
zt_set_hook(p->subs[SUB_REAL].zfd, ZT_OFFHOOK);
if (p->owner && (p->owner->_state == AST_STATE_RINGING)) {
p->subs[SUB_REAL].needanswer = 1;
+ p->dialing = 0;
}
break;
case ZT_EVENT_HOOKCOMPLETE:
@@ -3976,17 +3980,11 @@ struct ast_frame *zt_read(struct ast_channel *ast)
} else
zt_confmute(p, 0);
}
-#if 0
- if (f->frametype == AST_FRAME_VOICE && (ast->_state == AST_STATE_UP)) {
- p->subs[index].f.frametype = AST_FRAME_NULL;
- p->subs[index].f.subclass = 0;
- f = &p->subs[index].f;
- }
-#endif
+
/* If we have a fake_event, trigger exception to handle it */
if (p->fake_event)
ast->exception = 1;
-
+
ast_mutex_unlock(&p->lock);
return f;
}
@@ -8011,6 +8009,7 @@ static int zap_show_channel(int fd, int argc, char **argv)
ast_cli(fd, "File Descriptor: %d\n", tmp->subs[SUB_REAL].zfd);
ast_cli(fd, "Span: %d\n", tmp->span);
ast_cli(fd, "Extension: %s\n", tmp->exten);
+ ast_cli(fd, "Dialing: %s\n", tmp->dialing ? "yes" : "no");
ast_cli(fd, "Context: %s\n", tmp->context);
ast_cli(fd, "Caller ID string: %s\n", tmp->callerid);
ast_cli(fd, "Destroy: %d\n", tmp->destroy);