diff -aur asterisk-13.4.0.orig/res/res_rtp_asterisk.c asterisk-13.4.0.patched/res/res_rtp_asterisk.c --- asterisk-13.4.0.orig/res/res_rtp_asterisk.c 2015-06-04 19:20:51.000000000 +0600 +++ asterisk-13.4.0.patched/res/res_rtp_asterisk.c 2016-11-19 04:19:31.734853221 +0700 @@ -3415,7 +3415,7 @@ if (rtp->smoother) { struct ast_frame *f; - if (ast_smoother_test_flag(rtp->smoother, AST_SMOOTHER_FLAG_BE)) { + if (ast_smoother_test_flag(rtp->smoother, AST_SMOOTHER_FLAG_BE) || ast_format_cache_is_slinear(format)) { ast_smoother_feed_be(rtp->smoother, frame); } else { ast_smoother_feed(rtp->smoother, frame); @@ -3434,6 +3434,8 @@ f = frame; } if (f->data.ptr) { + if(ast_format_cache_is_slinear(format)) + ast_frame_byteswap_be(f); ast_rtp_raw_write(instance, f, codec); } if (f != frame) { diff -aur asterisk-13.4.0.orig/res/res_rtp_multicast.c asterisk-13.4.0.patched/res/res_rtp_multicast.c --- asterisk-13.4.0.orig/res/res_rtp_multicast.c 2015-06-04 19:20:51.000000000 +0600 +++ asterisk-13.4.0.patched/res/res_rtp_multicast.c 2016-11-19 04:23:58.582334094 +0700 @@ -251,6 +251,10 @@ return -1; } + if (ast_format_cache_is_slinear(frame->subclass.format)) { + ast_frame_byteswap_be(frame); + } + /* If we do not have space to construct an RTP header duplicate the frame so we get some */ if (frame->offset < hdrlen) { f = ast_frdup(frame);