ari: Allow variables to be set on channel create.

This change adds the same variable functionality that
is available for originating a channel to the create
call. Now when creating a channel you can specify
dialplan variables to set instead of having to do another
API call.

ASTERISK-28896

Change-Id: If13997ba818136d7c070585504fc4164378aa992
This commit is contained in:
Joshua C. Colp
2020-05-12 20:15:41 -03:00
committed by Joshua Colp
parent c8dec423d2
commit 15cbff9d54
5 changed files with 33 additions and 4 deletions

View File

@@ -118,6 +118,8 @@ struct ast_ari_channels_create_args {
const char *originator;
/*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs". */
const char *formats;
/*! The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } } */
struct ast_json *variables;
};
/*!
* \brief Body parsing function for /channels/create.