manager - Add Content-Type parameter to the SendText action

This patch allows a user of AMI to now specify the type of message
content contained within by setting the 'Content-Type' parameter.

Note, the AMI version has been bumped for this change.

ASTERISK-28945 #close

Change-Id: Ibb5315702532c6b954e1498beddc8855fabdf4bb
This commit is contained in:
Kevin Harwell
2020-06-10 17:02:33 -05:00
committed by Friendly Automation
parent 8d1064eaaf
commit cfed0ea033
6 changed files with 157 additions and 20 deletions

View File

@@ -335,9 +335,16 @@ enum ast_control_frame_type {
AST_CONTROL_RECORD_MUTE = 1103, /*!< Indicated to a channel in record to mute/unmute (i.e. write silence) recording */
};
/*!
* \brief Actions to indicate to, and be handled on channel read
*
* The subtype to specify for an AST_CONTROL_READ_ACTION frame. These
* frames are then to be enacted on within a channel's read thread.
*/
enum ast_frame_read_action {
AST_FRAME_READ_ACTION_CONNECTED_LINE_MACRO,
AST_FRAME_READ_ACTION_SEND_TEXT,
AST_FRAME_READ_ACTION_SEND_TEXT_DATA,
};
struct ast_control_read_action_payload {

View File

@@ -479,6 +479,24 @@ struct ast_msg_data_attribute {
struct ast_msg_data *ast_msg_data_alloc(enum ast_msg_data_source_type source,
struct ast_msg_data_attribute attributes[], size_t count);
/*!
* \brief Allocates an ast_msg_data structure.
* \since 13.35.0
* \since 16.12.0
* \since 17.6.0
*
* \param source The source type of the message
* \param to Where the message is sent to
* \param from Where the message is sent from
* \param content_type Content type of the body
* \param body The message body
*
* \return Pointer to msg structure or NULL on allocation failure.
* Caller must call ast_free when done.
*/
struct ast_msg_data *ast_msg_data_alloc2(enum ast_msg_data_source_type source_type,
const char *to, const char *from, const char *content_type, const char *body);
/*!
* \brief Clone an ast_msg_data structure
* \since 13.22.0