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
This commit is contained in:
George Joseph
2016-05-27 13:49:42 -06:00
parent de29888904
commit a2f820e8dc
9 changed files with 162 additions and 8 deletions

12
CHANGES
View File

@@ -362,6 +362,18 @@ app_confbridge
server installations via alternate means (DUNDI for example). By default
this feature is not used.
Codecs
------------------
* Added the associated format name to 'core show codecs'.
res_ari_channels
------------------
* Added 'formats' to channel create/originate to allow setting the allowed
formats for a channel when no originator channel is available. Especially
useful for Local channel creation where no other format information is
available. 'core show codecs' can now be used to look up suitable format
names.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 13.8.0 to Asterisk 13.9.0 ------------
------------------------------------------------------------------------------