mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-13 05:18:55 +00:00
Merge "dialplan_functions: wrong srtp use status report of a dialplan function" into 13
This commit is contained in:
@@ -530,7 +530,13 @@ static int channel_read_rtp(struct ast_channel *chan, const char *type, const ch
|
|||||||
} else if (!strcmp(type, "direct")) {
|
} else if (!strcmp(type, "direct")) {
|
||||||
ast_copy_string(buf, ast_sockaddr_stringify(&media->direct_media_addr), buflen);
|
ast_copy_string(buf, ast_sockaddr_stringify(&media->direct_media_addr), buflen);
|
||||||
} else if (!strcmp(type, "secure")) {
|
} else if (!strcmp(type, "secure")) {
|
||||||
snprintf(buf, buflen, "%d", media->srtp ? 1 : 0);
|
if (media->srtp) {
|
||||||
|
struct ast_sdp_srtp *srtp = media->srtp;
|
||||||
|
int flag = ast_test_flag(srtp, AST_SRTP_CRYPTO_OFFER_OK);
|
||||||
|
snprintf(buf, buflen, "%d", flag ? 1 : 0);
|
||||||
|
} else {
|
||||||
|
snprintf(buf, buflen, "%d", 0);
|
||||||
|
}
|
||||||
} else if (!strcmp(type, "hold")) {
|
} else if (!strcmp(type, "hold")) {
|
||||||
snprintf(buf, buflen, "%d", media->held ? 1 : 0);
|
snprintf(buf, buflen, "%d", media->held ? 1 : 0);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -350,7 +350,6 @@ int ast_sdp_crypto_process(struct ast_rtp_instance *rtp, struct ast_sdp_srtp *sr
|
|||||||
|
|
||||||
if (!memcmp(crypto->remote_key, remote_key, sizeof(crypto->remote_key))) {
|
if (!memcmp(crypto->remote_key, remote_key, sizeof(crypto->remote_key))) {
|
||||||
ast_debug(1, "SRTP remote key unchanged; maintaining current policy\n");
|
ast_debug(1, "SRTP remote key unchanged; maintaining current policy\n");
|
||||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OFFER_OK);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
memcpy(crypto->remote_key, remote_key, sizeof(crypto->remote_key));
|
memcpy(crypto->remote_key, remote_key, sizeof(crypto->remote_key));
|
||||||
|
|||||||
Reference in New Issue
Block a user