aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorbkramer <bkramer@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-01 03:27:36 +0000
committerbkramer <bkramer@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-01 03:27:36 +0000
commit58bd6b402a2ad468a7c326636b3ed82a3373301c (patch)
treec3799fe16128c9fd2b05c0e23c65e68717a02232 /channels
parent2fa663856ed4100bb70c749d594427e4dfe4463f (diff)
/ fix for when caller hangs up after first ring
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4940 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_vpb.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/channels/chan_vpb.c b/channels/chan_vpb.c
index fe3d7b95c..ffb05cc52 100755
--- a/channels/chan_vpb.c
+++ b/channels/chan_vpb.c
@@ -964,6 +964,8 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
get_callerid(p); /* Australian Caller ID only between 1st and 2nd ring */
}
get_callerid_ast(p); /* Caller ID using the ast functions */
+ vpb_timer_stop(p->ring_timer);
+ vpb_timer_start(p->ring_timer);
}
break;
@@ -1019,7 +1021,13 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
ast_verbose(VERBOSE_PREFIX_4 "%s: handle_notowned: DTMF IDD timer out, matching on [%s] in [%s]\n", p->dev,p->ext , p->context);
vpb_new(p,AST_STATE_RING, p->context);
}
- }
+ } else if (e->data == p->ring_timer_id) {
+ /* We didnt get another ring in time! */
+ if (p->owner->_state != AST_STATE_UP) {
+ /* Assume caller has hung up */
+ vpb_timer_stop(p->ring_timer);
+ }
+ }
break;
case VPB_DTMF: