Janus SIPre plugin (libre) More...
#include "plugin.h"
#include <arpa/inet.h>
#include <net/if.h>
#include <sys/socket.h>
#include <netdb.h>
#include <poll.h>
#include <jansson.h>
#include <re_types.h>
#include <re_fmt.h>
#include <re_mbuf.h>
#include <re_msg.h>
#include <re_list.h>
#include <re_sa.h>
#include <re_main.h>
#include <re_mem.h>
#include <re_mqueue.h>
#include <re_sdp.h>
#include <re_uri.h>
#include <re_sip.h>
#include <re_sipreg.h>
#include <re_sipsess.h>
#include <re_srtp.h>
#include <re_tmr.h>
#include <re_tls.h>
#include <re_dns.h>
#include "../debug.h"
#include "../apierror.h"
#include "../config.h"
#include "../mutex.h"
#include "../record.h"
#include "../rtp.h"
#include "../rtpsrtp.h"
#include "../rtcp.h"
#include "../sdp-utils.h"
#include "../utils.h"
#include "../ip-utils.h"
Data Structures | |
struct | janus_sipre_message |
struct | janus_sipre_mqueue_payload |
struct | janus_sipre_account |
struct | janus_sipre_stack |
struct | janus_sipre_media |
struct | janus_sipre_session |
Typedefs | |
typedef struct janus_sipre_message | janus_sipre_message |
typedef enum janus_sipre_mqueue_event | janus_sipre_mqueue_event |
typedef struct janus_sipre_session | janus_sipre_session |
typedef struct janus_sipre_mqueue_payload | janus_sipre_mqueue_payload |
typedef struct janus_sipre_account | janus_sipre_account |
typedef struct janus_sipre_stack | janus_sipre_stack |
typedef struct janus_sipre_media | janus_sipre_media |
Functions | |
janus_plugin * | create (void) |
int | janus_sipre_init (janus_callbacks *callback, const char *config_path) |
void | janus_sipre_destroy (void) |
int | janus_sipre_get_api_compatibility (void) |
int | janus_sipre_get_version (void) |
const char * | janus_sipre_get_version_string (void) |
const char * | janus_sipre_get_description (void) |
const char * | janus_sipre_get_name (void) |
const char * | janus_sipre_get_author (void) |
const char * | janus_sipre_get_package (void) |
void | janus_sipre_create_session (janus_plugin_session *handle, int *error) |
struct janus_plugin_result * | janus_sipre_handle_message (janus_plugin_session *handle, char *transaction, json_t *message, json_t *jsep) |
void | janus_sipre_setup_media (janus_plugin_session *handle) |
void | janus_sipre_incoming_rtp (janus_plugin_session *handle, int mindex, gboolean video, char *buf, int len) |
void | janus_sipre_incoming_rtcp (janus_plugin_session *handle, int mindex, gboolean video, char *buf, int len) |
void | janus_sipre_hangup_media (janus_plugin_session *handle) |
void | janus_sipre_destroy_session (janus_plugin_session *handle, int *error) |
json_t * | janus_sipre_query_session (janus_plugin_session *handle) |
void | janus_sipre_mqueue_handler (int id, void *data, void *arg) |
gpointer | janus_sipre_stack_thread (gpointer user_data) |
int | janus_sipre_cb_auth (char **user, char **pass, const char *realm, void *arg) |
void | janus_sipre_cb_register (int err, const struct sip_msg *msg, void *arg) |
void | janus_sipre_cb_progress (const struct sip_msg *msg, void *arg) |
void | janus_sipre_cb_incoming (const struct sip_msg *msg, void *arg) |
int | janus_sipre_cb_offer (struct mbuf **mbp, const struct sip_msg *msg, void *arg) |
int | janus_sipre_cb_answer (const struct sip_msg *msg, void *arg) |
void | janus_sipre_cb_established (const struct sip_msg *msg, void *arg) |
void | janus_sipre_cb_info (struct sip *sip, const struct sip_msg *msg, void *arg) |
void | janus_sipre_cb_closed (int err, const struct sip_msg *msg, void *arg) |
void | janus_sipre_cb_exit (void *arg) |
void | janus_sipre_sdp_process (janus_sipre_session *session, janus_sdp *sdp, gboolean answer, gboolean update, gboolean *changed) |
char * | janus_sipre_sdp_manipulate (janus_sipre_session *session, janus_sdp *sdp, gboolean answer) |
Variables | |
GThread * | sipstack_thread = NULL |
Janus SIPre plugin (libre)
Check the SIPre plugin documentation for more details.
#define JANUS_DEFAULT_REGISTER_TTL 3600 |
#define JANUS_SIPRE_AUTHOR "Meetecho s.r.l." |
#define JANUS_SIPRE_DESCRIPTION "This is a simple SIP plugin for Janus (based on libre instead of Sofia), allowing WebRTC peers to register at a SIP server and call SIP user agents through a Janus instance." |
#define JANUS_SIPRE_ERROR_ALREADY_REGISTERED 445 |
#define JANUS_SIPRE_ERROR_INVALID_ADDRESS 446 |
#define JANUS_SIPRE_ERROR_INVALID_ELEMENT 444 |
#define JANUS_SIPRE_ERROR_INVALID_JSON 441 |
#define JANUS_SIPRE_ERROR_INVALID_REQUEST 442 |
#define JANUS_SIPRE_ERROR_IO_ERROR 450 |
#define JANUS_SIPRE_ERROR_LIBRE_ERROR 449 |
#define JANUS_SIPRE_ERROR_MISSING_ELEMENT 443 |
#define JANUS_SIPRE_ERROR_MISSING_SDP 448 |
#define JANUS_SIPRE_ERROR_NO_MESSAGE 440 |
#define JANUS_SIPRE_ERROR_RECORDING_ERROR 451 |
#define JANUS_SIPRE_ERROR_TOO_STRICT 452 |
#define JANUS_SIPRE_ERROR_UNKNOWN_ERROR 499 |
#define JANUS_SIPRE_ERROR_WRONG_STATE 447 |
#define JANUS_SIPRE_NAME "JANUS SIPre plugin" |
#define JANUS_SIPRE_PACKAGE "janus.plugin.sipre" |
#define JANUS_SIPRE_VERSION 2 |
#define JANUS_SIPRE_VERSION_STRING "0.0.2" |
typedef struct janus_sipre_account janus_sipre_account |
typedef struct janus_sipre_media janus_sipre_media |
typedef struct janus_sipre_message janus_sipre_message |
typedef enum janus_sipre_mqueue_event janus_sipre_mqueue_event |
typedef struct janus_sipre_mqueue_payload janus_sipre_mqueue_payload |
typedef struct janus_sipre_session janus_sipre_session |
typedef struct janus_sipre_stack janus_sipre_stack |
janus_plugin* create | ( | void | ) |
int janus_sipre_cb_answer | ( | const struct sip_msg * | msg, |
void * | arg | ||
) |
int janus_sipre_cb_auth | ( | char ** | user, |
char ** | pass, | ||
const char * | realm, | ||
void * | arg | ||
) |
void janus_sipre_cb_closed | ( | int | err, |
const struct sip_msg * | msg, | ||
void * | arg | ||
) |
void janus_sipre_cb_established | ( | const struct sip_msg * | msg, |
void * | arg | ||
) |
void janus_sipre_cb_exit | ( | void * | arg | ) |
void janus_sipre_cb_incoming | ( | const struct sip_msg * | msg, |
void * | arg | ||
) |
void janus_sipre_cb_info | ( | struct sip * | sip, |
const struct sip_msg * | msg, | ||
void * | arg | ||
) |
int janus_sipre_cb_offer | ( | struct mbuf ** | mbp, |
const struct sip_msg * | msg, | ||
void * | arg | ||
) |
void janus_sipre_cb_progress | ( | const struct sip_msg * | msg, |
void * | arg | ||
) |
void janus_sipre_cb_register | ( | int | err, |
const struct sip_msg * | msg, | ||
void * | arg | ||
) |
void janus_sipre_create_session | ( | janus_plugin_session * | handle, |
int * | error | ||
) |
void janus_sipre_destroy | ( | void | ) |
void janus_sipre_destroy_session | ( | janus_plugin_session * | handle, |
int * | error | ||
) |
int janus_sipre_get_api_compatibility | ( | void | ) |
const char * janus_sipre_get_author | ( | void | ) |
const char * janus_sipre_get_description | ( | void | ) |
const char * janus_sipre_get_name | ( | void | ) |
const char * janus_sipre_get_package | ( | void | ) |
int janus_sipre_get_version | ( | void | ) |
const char * janus_sipre_get_version_string | ( | void | ) |
struct janus_plugin_result * janus_sipre_handle_message | ( | janus_plugin_session * | handle, |
char * | transaction, | ||
json_t * | message, | ||
json_t * | jsep | ||
) |
void janus_sipre_hangup_media | ( | janus_plugin_session * | handle | ) |
void janus_sipre_incoming_rtcp | ( | janus_plugin_session * | handle, |
int | mindex, | ||
gboolean | video, | ||
char * | buf, | ||
int | len | ||
) |
void janus_sipre_incoming_rtp | ( | janus_plugin_session * | handle, |
int | mindex, | ||
gboolean | video, | ||
char * | buf, | ||
int | len | ||
) |
int janus_sipre_init | ( | janus_callbacks * | callback, |
const char * | config_path | ||
) |
void janus_sipre_mqueue_handler | ( | int | id, |
void * | data, | ||
void * | arg | ||
) |
json_t * janus_sipre_query_session | ( | janus_plugin_session * | handle | ) |
char * janus_sipre_sdp_manipulate | ( | janus_sipre_session * | session, |
janus_sdp * | sdp, | ||
gboolean | answer | ||
) |
void janus_sipre_sdp_process | ( | janus_sipre_session * | session, |
janus_sdp * | sdp, | ||
gboolean | answer, | ||
gboolean | update, | ||
gboolean * | changed | ||
) |
void janus_sipre_setup_media | ( | janus_plugin_session * | handle | ) |
gpointer janus_sipre_stack_thread | ( | gpointer | user_data | ) |
GThread* sipstack_thread = NULL |