[Asterisk-cvs] asterisk/apps app_dial.c,1.59,1.60
markster at lists.digium.com
markster at lists.digium.com
Thu Mar 18 19:13:37 CST 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv1198/apps
Modified Files:
app_dial.c
Log Message:
Remember when we started/stopped ringing so that ringing twice works as expected
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- app_dial.c 18 Mar 2004 20:02:15 -0000 1.59
+++ app_dial.c 19 Mar 2004 00:08:43 -0000 1.60
@@ -139,6 +139,7 @@
ast_moh_start(in, NULL);
} else if (outgoing->ringbackonly) {
ast_indicate(in, AST_CONTROL_RINGING);
+ sentringing++;
}
}
@@ -172,7 +173,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;
@@ -281,7 +282,6 @@
if (!sentringing && !moh) {
ast_indicate(in, AST_CONTROL_RINGING);
sentringing++;
- ringind++;
}
break;
case AST_CONTROL_PROGRESS:
@@ -293,9 +293,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);
@@ -350,7 +353,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