aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-24 20:37:30 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-24 20:37:30 +0000
commit088a2ae9d34f4740ceff8d77687bd4e9763460ac (patch)
tree80f88632c37b250bb4d472c253a03eb44bf70601
parent2dccbf6cb599561362521735c15bd3c768e30c82 (diff)
Backport fix for #6229, hangup on polarity reversal
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@8573 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_zap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index d591abd99..c219d61b2 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -4200,6 +4200,10 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast)
(ast->_state == AST_STATE_RINGING))) {
ast_log(LOG_DEBUG, "Answering on polarity switch!\n");
ast_setstate(p->owner, AST_STATE_UP);
+ if(p->hanguponpolarityswitch) {
+ gettimeofday(&p->polaritydelaytv, NULL);
+ }
+ break;
} else
ast_log(LOG_DEBUG, "Ignore switch to REVERSED Polarity on channel %d, state %d\n", p->channel, ast->_state);
}