ExternalMedia: Change return object from ExternalMedia to Channel

When we created the External Media addition to ARI we created an
ExternalMedia object to be returned from the channels/externalMedia
REST endpoint.  This object contained the channel object that was
created plus local_address and local_port attributes (which are
also in the Channel variables).  At the time, we thought that
creating an ExternalMedia object would give us more flexibility
in the future but as we created the sample speech to text
application, we discovered that it doesn't work so well with ARI
client libraries that a) don't have the ExternalMedia object
defined and/or b) can't promote the embedded channel structure
to a first-class Channel object.

This change causes the channels/externalMedia REST endpoint to
return a Channel object (like channels/create and channels/originate)
instead of the ExternalMedia object.

Change-Id: If280094debd35102cf21e0a31a5e0846fec14af9
This commit is contained in:
George Joseph
2019-10-18 05:36:12 -06:00
parent a339c3fdc5
commit bfd0e05e59
5 changed files with 3 additions and 136 deletions

View File

@@ -477,24 +477,6 @@ int ast_ari_validate_dialplan_cep(struct ast_json *json);
*/
ari_validator ast_ari_validate_dialplan_cep_fn(void);
/*!
* \brief Validator for ExternalMedia.
*
* ExternalMedia session.
*
* \param json JSON object to validate.
* \returns True (non-zero) if valid.
* \returns False (zero) if invalid.
*/
int ast_ari_validate_external_media(struct ast_json *json);
/*!
* \brief Function pointer to ast_ari_validate_external_media().
*
* See \ref ast_ari_model_validators.h for more details.
*/
ari_validator ast_ari_validate_external_media_fn(void);
/*!
* \brief Validator for RTPstat.
*
@@ -1540,10 +1522,6 @@ ari_validator ast_ari_validate_application_fn(void);
* - context: string (required)
* - exten: string (required)
* - priority: long (required)
* ExternalMedia
* - channel: Channel (required)
* - local_address: string
* - local_port: int
* RTPstat
* - channel_uniqueid: string (required)
* - local_maxjitter: double