[Asterisk-cvs] asterisk/apps app_dial.c,1.81,1.82
markster at lists.digium.com
markster at lists.digium.com
Wed Jul 7 12:16:33 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv30189/apps
Modified Files:
app_dial.c
Log Message:
Cleanups to the ordering of events in dial, don't freak out on the wrong codec
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- app_dial.c 25 Jun 2004 03:59:07 -0000 1.81
+++ app_dial.c 7 Jul 2004 16:02:13 -0000 1.82
@@ -142,7 +142,7 @@
if (single) {
/* Turn off hold music, etc */
- ast_indicate(in, -1);
+ ast_deactivate_generator(in);
/* If we are calling a single channel, make them compatible for in-band tone purpose */
ast_channel_make_compatible(outgoing->chan, in);
}
@@ -853,13 +853,6 @@
pbx_builtin_setvar_helper(chan, "DIALEDPEERNAME", peer->name);
if (numsubst)
pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", numsubst);
- /* Make sure channels are compatible */
- res = ast_channel_make_compatible(chan, peer);
- if (res < 0) {
- ast_log(LOG_WARNING, "Had to drop call because I couldn't make %s compatible with %s\n", chan->name, peer->name);
- ast_hangup(peer);
- return -1;
- }
/* JDG: sendurl */
if( url && !ast_strlen_zero(url) && ast_channel_supports_html(peer) ) {
ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", url);
@@ -913,6 +906,15 @@
sentringing = 0;
ast_indicate(chan, -1);
}
+ /* Be sure no generators are left on it */
+ ast_deactivate_generator(chan);
+ /* Make sure channels are compatible */
+ res = ast_channel_make_compatible(chan, peer);
+ if (res < 0) {
+ ast_log(LOG_WARNING, "Had to drop call because I couldn't make %s compatible with %s\n", chan->name, peer->name);
+ ast_hangup(peer);
+ return -1;
+ }
res = ast_bridge_call(chan,peer,&config);
} else
res = -1;
More information about the svn-commits
mailing list