res_pjsip_messaging: Allow application/* for in-dialog MESSAGEs

In addition to text/* content types, incoming_in_dialog_request now
accepts application/* content types.

Also fixed a length issue when copying the body text.  It was one
character short.

ASTERISK-27942

Change-Id: I4e54d8cc6158dc47eb8fdd6ba0108c6fd53f2818
This commit is contained in:
George Joseph
2018-06-25 06:37:37 -06:00
parent f248345a89
commit e3585353f6
2 changed files with 13 additions and 10 deletions

View File

@@ -4703,8 +4703,8 @@ int ast_sendtext_data(struct ast_channel *chan, struct ast_msg_data *msg)
ast_debug(1, "Sending TEXT to %s: %s\n", ast_channel_name(chan), body);
res = ast_channel_tech(chan)->send_text(chan, body);
} else {
ast_debug(1, "Channel technology does not support sending text on channel '%s'\n",
ast_channel_name(chan));
ast_debug(1, "Channel technology does not support sending content type '%s' on channel '%s'\n",
S_OR(content_type, "text/plain"), ast_channel_name(chan));
res = -1;
}
ast_clear_flag(ast_channel_flags(chan), AST_FLAG_BLOCKING);