]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no 53/4453/3
authorAlexei Gradinari <alex2grad@gmail.com>
Tue, 15 Nov 2016 21:01:27 +0000 (16:01 -0500)
committerAlexei Gradinari <alex2grad@gmail.com>
Wed, 16 Nov 2016 15:14:52 +0000 (10:14 -0500)
commitcf6d13180effc92a2483dccc68f2f188689a40fa
tree0fbd75717564c5b87d935c49629dcd75a8405605
parenta58d3597019f8cc5a503f140671232ae3f8d9119
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
channels/chan_pjsip.c
include/asterisk/channel.h
main/channel.c