diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-11-30 10:48:13 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-11-30 10:48:13 -0600 |
commit | eec82c6221935ebcc88da8c606481258d3322ad5 (patch) | |
tree | 18b3d9bad2a7ac06e313478345a9b5bf5c8d719d /channels | |
parent | 3d43e5ed3c95a2ea8ad8b66f79d664a3f294b1b2 (diff) | |
parent | cf6d13180effc92a2483dccc68f2f188689a40fa (diff) |
Merge "chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no" into 13
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_pjsip.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index cc4b2efa9..6e3d087a4 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -679,7 +679,11 @@ static struct ast_frame *chan_pjsip_cng_tone_detected(struct ast_sip_session *se return f; } -/*! \brief Function called by core to read any waiting frames */ +/*! + * \brief Function called by core to read any waiting frames + * + * \note The channel is already locked. + */ static struct ast_frame *chan_pjsip_read(struct ast_channel *ast) { struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast); @@ -737,8 +741,7 @@ static struct ast_frame *chan_pjsip_read(struct ast_channel *ast) ast_debug(1, "Oooh, got a frame with format of %s on channel '%s' when we're sending '%s', switching to match\n", ast_format_get_name(f->subclass.format), ast_channel_name(ast), ast_format_get_name(ast_channel_rawwriteformat(ast))); - ast_channel_set_rawwriteformat(ast, f->subclass.format); - ast_set_write_format(ast, ast_channel_writeformat(ast)); + ast_set_write_format_path(ast, ast_channel_writeformat(ast), f->subclass.format); if (ast_channel_is_bridged(ast)) { ast_channel_set_unbridged_nolock(ast, 1); |