mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
Version 0.1.6 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -514,6 +514,11 @@ static int park_exec(struct ast_channel *chan, void *data)
|
|||||||
nchan = chan;
|
nchan = chan;
|
||||||
else
|
else
|
||||||
nchan = ast_translator_create(chan, peer->format, AST_DIRECTION_BOTH);
|
nchan = ast_translator_create(chan, peer->format, AST_DIRECTION_BOTH);
|
||||||
|
if (!nchan) {
|
||||||
|
ast_log(LOG_WARNING, "Had to drop call because there was no translator for %s to %s.\n", chan->name, peer->name);
|
||||||
|
ast_hangup(peer);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
/* This runs sorta backwards, since we give the incoming channel control, as if it
|
/* This runs sorta backwards, since we give the incoming channel control, as if it
|
||||||
were the person called. */
|
were the person called. */
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
@@ -649,11 +654,17 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
npeer = peer;
|
npeer = peer;
|
||||||
else
|
else
|
||||||
npeer = ast_translator_create(peer, chan->format, AST_DIRECTION_BOTH);
|
npeer = ast_translator_create(peer, chan->format, AST_DIRECTION_BOTH);
|
||||||
|
if (!npeer) {
|
||||||
|
ast_log(LOG_WARNING, "Had to drop call because there was no translator for %s to %s.\n", chan->name, peer->name);
|
||||||
|
ast_hangup(peer);
|
||||||
|
res = -1;
|
||||||
|
} else {
|
||||||
res = bridge_call(chan, npeer, allowredir);
|
res = bridge_call(chan, npeer, allowredir);
|
||||||
if (npeer != peer)
|
if (npeer != peer)
|
||||||
ast_translator_destroy(npeer);
|
ast_translator_destroy(npeer);
|
||||||
ast_hangup(peer);
|
ast_hangup(peer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
out:
|
out:
|
||||||
hanguptree(outgoing, NULL);
|
hanguptree(outgoing, NULL);
|
||||||
free(info);
|
free(info);
|
||||||
|
Reference in New Issue
Block a user