mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-08 22:27:07 +00:00
Add SRTP support for Asterisk
After 5 years in mantis and over a year on reviewboard, SRTP support is finally being comitted. This includes generic CHANNEL dialplan functions that work for getting the status of whether a call has secure media or signaling as defined by the underlying channel technology and for setting whether or not a new channel being bridged to a calling channel should have secure signaling or media. See doc/tex/secure-calls.tex for examples. Original patch by mikma, updated for trunk and revised by me. (closes issue #5413) Reported by: mikma Tested by: twilson, notthematrix, hemanshurpatel Review: https://reviewboard.asterisk.org/r/191/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -71,6 +71,9 @@ extern "C" {
|
||||
|
||||
#include "asterisk/astobj2.h"
|
||||
#include "asterisk/frame.h"
|
||||
#include "asterisk/netsock.h"
|
||||
#include "asterisk/sched.h"
|
||||
#include "asterisk/res_srtp.h"
|
||||
|
||||
/* Maximum number of payloads supported */
|
||||
#define AST_RTP_MAX_PT 256
|
||||
@@ -458,6 +461,11 @@ int ast_rtp_engine_register2(struct ast_rtp_engine *engine, struct ast_module *m
|
||||
*/
|
||||
int ast_rtp_engine_unregister(struct ast_rtp_engine *engine);
|
||||
|
||||
int ast_rtp_engine_register_srtp(struct ast_srtp_res *srtp_res, struct ast_srtp_policy_res *policy_res);
|
||||
|
||||
void ast_rtp_engine_unregister_srtp(void);
|
||||
int ast_rtp_engine_srtp_is_registered(void);
|
||||
|
||||
#define ast_rtp_glue_register(glue) ast_rtp_glue_register2(glue, ast_module_info->self)
|
||||
|
||||
/*!
|
||||
@@ -1724,6 +1732,9 @@ struct ast_rtp_glue *ast_rtp_instance_get_active_glue(struct ast_rtp_instance *i
|
||||
*/
|
||||
struct ast_channel *ast_rtp_instance_get_chan(struct ast_rtp_instance *instance);
|
||||
|
||||
int ast_rtp_instance_add_srtp_policy(struct ast_rtp_instance *instance, struct ast_srtp_policy *policy);
|
||||
struct ast_srtp *ast_rtp_instance_get_srtp(struct ast_rtp_instance *instance);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user