]> git.ipfire.org Git - thirdparty/asterisk.git/commit
ari/resource_channels: Add 'formats' to channel create/originate 17/2917/3
authorGeorge Joseph <gjoseph@digium.com>
Fri, 27 May 2016 19:49:42 +0000 (13:49 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Fri, 3 Jun 2016 22:31:39 +0000 (17:31 -0500)
commitc27c2320574902117b1c2e66f210640eb606a736
treef935a76ee1ca8ed7929406687082baa57cbbca96
parente3c9ad63828852aec248355d2d49206687fa87fd
ari/resource_channels:  Add 'formats' to channel create/originate

If you create a local channel and don't specify an originator channel
to take capabilities from, we automatically add all audio formats to
the new channel's capabilities. When we try to make the channel
compatible with another, the "best format" functions pick the best
format available, which in this case will be slin192.  While this is
great for preserving quality, it's the worst for performance and
overkill for the vast majority of applications.

In the absense of any other information, adding all formats is the
correct thing to do and it's not always possible to supply an
originator so a new parameter 'formats' has been added to the channel
create/originate functions. It's just a comma separated list of formats
to make availalble for the channel. Example: "ulaw,slin,slin16".
'formats' and 'originator' are mutually exclusive.

To facilitate determination of format names, the format name has been
added to "core show codecs".

ASTERISK-26070 #close

Change-Id: I091b23ecd41c1b4128d85028209772ee139f604b
CHANGES
include/asterisk/codec.h
main/codec.c
main/codec_builtin.c
res/ari/resource_channels.c
res/ari/resource_channels.h
res/res_ari_channels.c
rest-api/api-docs/channels.json