Sorry, never mind.  codec_string and absolute_codec_string worked.  I just has pre_answer earlier in my dialplan, so I was calling them too late.

On Thu, Mar 2, 2017 at 10:58 AM, Oleg Stolyar <olegstolyar@gmail.com> wrote:
Hi guys,

is there a way to set the codec string on the fly in the dialplan for an incoming leg?

I tried setting codec_string and absolute_codec_string but it didn't seem to work on incoming calls.