summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-03-14 17:39:45 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-03-14 17:39:45 +0000
commit2019a7e6b9672af4f560b5e2c087c6301beb4537 (patch)
treebfabe8ab97fcb684e4214d8a7163e75139359d5d /main/channel.c
parent6df0ae5c1fb6b780874f859e9c1be89c5ee881ac (diff)
Fix Dial m and r options and forked calls generating warnings for voice frames.
When connected line support was added, the wait_for_answer() variable single changed its meaning slightly. Unfortunately, the places where single was used did not necessarily get updated to reflect that change. Also audio/video frames were sent to all forked calls when the endpoints were never made compatible. * Don't pass audio/video media frames when the channels have not been made compatible. * Added handling of AST_CONTROL_SRCCHANGE to app_dial.c. * Fixed app_dial.c passing on AST_CONTROL_HOLD because that frame can also pass a requested MOH class. (closes issue ASTERISK-16901) Reported by: Chris Gentle (closes issue ASTERISK-17541) Reported by: clint Review: https://reviewboard.asterisk.org/r/1805/ ........ Merged revisions 359344 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359355 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/main/channel.c b/main/channel.c
index c1431c7ef..35155bb6b 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4730,15 +4730,19 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
if (ast_format_cmp(&fr->subclass.format, ast_channel_rawwriteformat(chan)) != AST_FORMAT_CMP_NOT_EQUAL) {
f = fr;
} else {
- /* XXX Something is not right we are not compatible with this frame bad things can happen
- * problems range from no/one-way audio to unexplained line hangups as a last resort try adjust the format
- * ideally we do not want to do this and this indicates a deeper problem for now we log these events to
- * eliminate user impact and help identify the problem areas
- * JIRA issues related to this :-
- * ASTERISK-14384, ASTERISK-17502, ASTERISK-17541, ASTERISK-18063, ASTERISK-18325, ASTERISK-18422*/
if ((!ast_format_cap_iscompatible(ast_channel_nativeformats(chan), &fr->subclass.format)) &&
(ast_format_cmp(ast_channel_writeformat(chan), &fr->subclass.format) != AST_FORMAT_CMP_EQUAL)) {
char nf[512];
+
+ /*
+ * XXX Something is not right. We are not compatible with this
+ * frame. Bad things can happen. Problems range from no audio,
+ * one-way audio, to unexplained line hangups. As a last resort
+ * try to adjust the format. Ideally, we do not want to do this
+ * because it indicates a deeper problem. For now, we log these
+ * events to reduce user impact and help identify the problem
+ * areas.
+ */
ast_log(LOG_WARNING, "Codec mismatch on channel %s setting write format to %s from %s native formats %s\n",
ast_channel_name(chan), ast_getformatname(&fr->subclass.format), ast_getformatname(ast_channel_writeformat(chan)),
ast_getformatname_multiple(nf, sizeof(nf), ast_channel_nativeformats(chan)));