summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-07-20 07:31:43 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-07-20 07:31:43 -0500
commit6741eedeceba083267a3d8223c911b0b5c6a98d0 (patch)
tree13ef49e7c220f3117ddc0deb8aa4e39a9bc1e56c
parent0047ca8c84e428fffd0164bdb22f68c565c29696 (diff)
parent649460aa4455ec2813300b100b8fdb897e064e40 (diff)
Merge "chan_pjsip: Don't change formats when frame of unsupported format is received."
-rw-r--r--channels/chan_pjsip.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index b44d3e03c..09cec5453 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -629,6 +629,15 @@ static struct ast_frame *chan_pjsip_read(struct ast_channel *ast)
return f;
}
+ if (ast_format_cap_iscompatible_format(channel->session->endpoint->media.codecs, f->subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {
+ ast_debug(1, "Oooh, got a frame with format of %s on channel '%s' when endpoint '%s' is not configured for it\n",
+ ast_format_get_name(f->subclass.format), ast_channel_name(ast),
+ ast_sorcery_object_get_id(channel->session->endpoint));
+
+ ast_frfree(f);
+ return &ast_null_frame;
+ }
+
if (channel->session->dsp) {
f = ast_dsp_process(ast, channel->session->dsp, f);