[asterisk-users] Why doesn't Asterisk try to prevent transcoding

Ryan Wagoner rswagoner at gmail.com
Sun Dec 15 10:36:53 CST 2013


On Sun, Dec 15, 2013 at 9:32 AM, jg <webaccounts at jgoettgens.de> wrote:

> Is it possible to let the Sangoma card work only on the most demanding
> codecs? This requires some analysis to estimate the benefits. Another
> question is whether the user phones are provisioned or not. If provisioned,
> then you are the maker of rules.
>
>
Most users have both a desk Polycom phone and a soft phone on their mobile
device or laptop. I don't have control over how the soft phones are
provisioned on mobile devices. I've found a workaround that prevents
transcoding for outbound calls.

remote phone
allow=g729

local phone
allow=ulaw&g729

trunk
allow=ulaw&g729

In FreePBX extensions_custom.conf I've added the following. This tries to
force the outbound channel to match the inbound channel's format.

[macro-dialout-trunk-predial-hook]
exten =>
s,1,Set(_SIP_CODEC_OUTBOUND=${CHANNEL(audionativeformat):1:$[${LEN(${CHANNEL(audionativeformat)})}-2]})

Remote to local g729 pass through
Local to remote g729 transcoding
Local to trunk ulaw pass through
Remote to trunk g729 pass through (addressed by the
dialout-trunk-predial-hook)
Trunk to local ulaw pass through
Trunk to remote g729 transcoding

Alternatively I could set trunk allow=g729,ulaw, which would prevent
transcoding for all inbound calls. Outbound from the local phone would use
the hook to change to ulaw.

I still don't have a way to enable the higher quality g722 codec for
internal use without making a transcoding mess. Maybe Asterisk 12 with
pjsip will have a better solution.

Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20131215/06bfa994/attachment-0001.html>


More information about the asterisk-users mailing list