mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
core_local: Local calls are always secure.
In a Dialplan, the channel drivers 'chan_sip' and 'chan_iax2' support the channel items 'secure_bridge_media' and 'secure_bridge_signaling'. That way, a channel can be forced to use encryption even if not specified in its configuration. However, when the Local Proxy kicks in, for example, in case of a forwarding (SIP status 302), Local Proxy stated it does not know those items. Consequently, such a call could not be proxied how clever your Dialplan was. Because local calls within Asterisk are always secure, Local Proxy accepts such a request now. ASTERISK-22920 Change-Id: I4c143bb70f686790953cc04c5a4b810bbb03636c
This commit is contained in:
committed by
Joshua Colp
parent
35f7e24ebc
commit
18cc090761
@@ -144,6 +144,7 @@ static int local_devicestate(const char *data);
|
|||||||
static void local_optimization_started_cb(struct ast_unreal_pvt *base, struct ast_channel *source,
|
static void local_optimization_started_cb(struct ast_unreal_pvt *base, struct ast_channel *source,
|
||||||
enum ast_unreal_channel_indicator dest, unsigned int id);
|
enum ast_unreal_channel_indicator dest, unsigned int id);
|
||||||
static void local_optimization_finished_cb(struct ast_unreal_pvt *base, int success, unsigned int id);
|
static void local_optimization_finished_cb(struct ast_unreal_pvt *base, int success, unsigned int id);
|
||||||
|
static int local_setoption(struct ast_channel *chan, int option, void *data, int datalen);
|
||||||
|
|
||||||
static struct ast_manager_event_blob *local_message_to_ami(struct stasis_message *msg);
|
static struct ast_manager_event_blob *local_message_to_ami(struct stasis_message *msg);
|
||||||
|
|
||||||
@@ -187,7 +188,7 @@ static struct ast_channel_tech local_tech = {
|
|||||||
.send_text = ast_unreal_sendtext,
|
.send_text = ast_unreal_sendtext,
|
||||||
.devicestate = local_devicestate,
|
.devicestate = local_devicestate,
|
||||||
.queryoption = ast_unreal_queryoption,
|
.queryoption = ast_unreal_queryoption,
|
||||||
.setoption = ast_unreal_setoption,
|
.setoption = local_setoption,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! What to do with the ;2 channel when ast_call() happens. */
|
/*! What to do with the ;2 channel when ast_call() happens. */
|
||||||
@@ -1108,3 +1109,14 @@ int ast_local_init(void)
|
|||||||
ast_register_cleanup(local_shutdown);
|
ast_register_cleanup(local_shutdown);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int local_setoption(struct ast_channel *ast, int option, void *data, int datalen)
|
||||||
|
{
|
||||||
|
switch (option) {
|
||||||
|
case AST_OPTION_SECURE_SIGNALING:
|
||||||
|
case AST_OPTION_SECURE_MEDIA:
|
||||||
|
return 0; /* local calls (like forwardings) are secure always */
|
||||||
|
default:
|
||||||
|
return ast_unreal_setoption(ast, option, data, datalen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user