AMI SendText action: Fix to use correct thread to send the text.

The AMI action was directly sending the text to the channel driver.
However, this makes two threads attempt to handle media and runs afowl of
CHECK_BLOCKING.

* Queue a read action to make the channel's media handling thread actually
send the text message.  This changes the AMI actions success/fail response
to just mean the text was queued to be sent not that the text actually got
sent.  The channel driver may not even support sending text messages.

ASTERISK-27943

Change-Id: I9dce343d8fa634ba5a416a1326d8a6340f98c379
This commit is contained in:
Richard Mudgett
2018-06-28 12:07:01 -05:00
parent 6b6fa461d6
commit d0e4cbfc51
3 changed files with 30 additions and 5 deletions

View File

@@ -330,6 +330,7 @@ enum ast_control_frame_type {
enum ast_frame_read_action {
AST_FRAME_READ_ACTION_CONNECTED_LINE_MACRO,
AST_FRAME_READ_ACTION_SEND_TEXT,
};
struct ast_control_read_action_payload {