[Asterisk-cvs] asterisk/apps app_dial.c,1.53.2.3,1.53.2.4
markster at lists.digium.com
markster at lists.digium.com
Thu Mar 18 19:14:07 CST 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv1214/apps
Modified Files:
Tag: v1-0_stable
app_dial.c
Log Message:
Remember when we started/stopped ringing appropriately
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.53.2.3
retrieving revision 1.53.2.4
diff -u -d -r1.53.2.3 -r1.53.2.4
--- app_dial.c 27 Feb 2004 04:24:57 -0000 1.53.2.3
+++ app_dial.c 19 Mar 2004 00:09:14 -0000 1.53.2.4
@@ -139,6 +139,7 @@
} else if (outgoing->ringbackonly) {
ast_indicate(in, AST_CONTROL_RINGING);
}
+ sentringing++;
}
while(*to && !peer) {
@@ -171,7 +172,7 @@
/* if no one available we'd better stop MOH/ringing to */
if (moh) {
ast_moh_stop(in);
- } else if (ringind) {
+ } else if (sentringing) {
ast_indicate(in, -1);
}
return NULL;
@@ -274,7 +275,6 @@
if (!sentringing && !moh) {
ast_indicate(in, AST_CONTROL_RINGING);
sentringing++;
- ringind++;
}
break;
case AST_CONTROL_PROGRESS:
@@ -286,9 +286,12 @@
/* Ignore going off hook */
break;
case -1:
- if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "%s stopped sounds\n", o->chan->name);
- ast_indicate(in, -1);
+ if (!ringind && !moh) {
+ if (option_verbose > 2)
+ ast_verbose( VERBOSE_PREFIX_3 "%s stopped sounds\n", o->chan->name);
+ ast_indicate(in, -1);
+ sentringing = 0;
+ }
break;
default:
ast_log(LOG_DEBUG, "Dunno what to do with control type %d\n", f->subclass);
@@ -343,7 +346,7 @@
}
if (moh) {
ast_moh_stop(in);
- } else if (ringind) {
+ } else if (sentringing) {
ast_indicate(in, -1);
}
More information about the svn-commits
mailing list