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 16:49:54 -05:00
committed by Friendly Automation
parent 43ba72dea0
commit d9b8f04cd4
7 changed files with 158 additions and 21 deletions

View File

@@ -3847,7 +3847,12 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio, int
break;
case AST_FRAME_READ_ACTION_SEND_TEXT:
ast_channel_unlock(chan);
ast_sendtext(chan, (const char *) read_action_payload->payload);
ast_sendtext(chan, (const char *)read_action_payload->payload);
ast_channel_lock(chan);
break;
case AST_FRAME_READ_ACTION_SEND_TEXT_DATA:
ast_channel_unlock(chan);
ast_sendtext_data(chan, (struct ast_msg_data *)read_action_payload->payload);
ast_channel_lock(chan);
break;
}