]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no 71/5071/1
authorAlexei Gradinari <alex2grad@gmail.com>
Tue, 15 Nov 2016 21:01:27 +0000 (16:01 -0500)
committerKevin Harwell <kharwell@digium.com>
Wed, 22 Feb 2017 23:11:51 +0000 (17:11 -0600)
commit44cac456103bad9c428623fc3f9cca1e4f9ddf3f
treefc62fb8c321f7ec1cd05a25ab1be90320907dfd1
parent0d7f99a087fe03b0e04a63f1c3d3ed5fdfc59353
chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no

The sending codec is switched to the receiving codec and then
is switched back to the best native codec on EVERY receiving RTP packets.
This is because after call of ast_channel_set_rawwriteformat there is call
of ast_set_write_format which calls set_format which sets rawwriteformat
to the best native format.

This patch adds a new function ast_set_write_format_path which set
specific write path on channel and uses this function to switch
the sending codec.

ASTERISK-26603 #close

Change-Id: I5b7d098f8b254ce8f45546e6c36e5d324737f71d
(cherry picked from commit cf6d13180effc92a2483dccc68f2f188689a40fa)
channels/chan_pjsip.c
include/asterisk/channel.h
main/channel.c