[Asterisk-cvs] asterisk/channels chan_vpb.c,1.67,1.68

bkramer at lists.digium.com bkramer at lists.digium.com
Mon Jan 31 21:26:14 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv21254

Modified Files:
	chan_vpb.c 
Log Message:
/ fix for when caller hangs up after first ring


Index: chan_vpb.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_vpb.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- chan_vpb.c	31 Jan 2005 23:51:19 -0000	1.67
+++ chan_vpb.c	1 Feb 2005 03:27:36 -0000	1.68
@@ -964,6 +964,8 @@
 					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 @@
 						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:




More information about the svn-commits mailing list