]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no 22/4522/1
authorAlexei Gradinari <alex2grad@gmail.com>
Tue, 15 Nov 2016 21:01:27 +0000 (16:01 -0500)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 30 Nov 2016 12:55:08 +0000 (07:55 -0500)
commitd49fbc5f4e045a625cb6b6fb91eef5b00a490bf2
tree2470133f7f9d8a7a19b20c64ff91cf86c73a3e2a
parenta15258146476fb26e3fc7ca8340ccb3aa3692e4c
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