63 if (chan && !
ast_func_read(chan,
"CHANNEL(pjsip,call-id)", buf,
sizeof(buf))) {
69 if (chan && !
ast_func_read(chan,
"SIP_HEADER(call-id)", buf,
sizeof(buf))) {
96 struct timeval current_time =
ast_tvnow();
137 if (!capture_info->
uuid) {
167 if (!stasis_rtp_subscription) {
179 if (stasis_rtp_subscription) {
190 .requires =
"res_hep",
struct stasis_message_type * ast_rtp_rtcp_sent_type(void)
Message type for an RTCP message sent from this Asterisk instance.
struct ast_sockaddr src_addr
int ast_func_read(struct ast_channel *chan, const char *function, char *workspace, size_t len)
executes a read operation on a function
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
int ast_sockaddr_parse(struct ast_sockaddr *addr, const char *str, int flags)
Parse an IPv4 or IPv6 address string.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
enum hepv3_capture_type capture_type
void ast_json_free(void *p)
Asterisk's custom JSON allocator. Exposed for use by unit tests.
struct ast_sockaddr dst_addr
Routines for integration with Homer using HEPv3.
#define ast_json_dump_string(root)
Encode a JSON value to a compact string.
struct stasis_message_type * stasis_message_type(const struct stasis_message *msg)
Get the message type for a stasis_message.
int stasis_subscription_set_filter(struct stasis_subscription *subscription, enum stasis_subscription_message_filter filter)
Set the message type filtering level on a subscription.
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
#define ast_strdup(str)
A wrapper for strdup()
static struct stasis_subscription * stasis_rtp_subscription
struct stasis_message_type * ast_rtp_rtcp_received_type(void)
Message type for an RTCP message received from some external source.
struct ast_json * stasis_message_to_json(struct stasis_message *msg, struct stasis_message_sanitizer *sanitize)
Build the JSON representation of the message.
#define ast_strlen_zero(foo)
Configuration File Parser.
General Asterisk PBX channel definitions.
Asterisk JSON abstraction layer.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
#define ast_channel_cleanup(c)
Cleanup a channel reference.
#define ao2_ref(o, delta)
static char * assign_uuid(struct ast_json *json_channel)
const char * ast_json_string_get(const struct ast_json *string)
Get the value of a JSON string.
static void rtcp_message_handler(struct stasis_message *message)
Core PBX routines and definitions.
#define stasis_subscribe(topic, callback, data)
struct hepv3_capture_info * hepv3_create_capture_info(const void *payload, size_t len)
Create a hepv3_capture_info object.
enum hep_uuid_type hepv3_get_uuid_type(void)
Get the preferred UUID type.
static int unload_module(void)
struct stasis_subscription * stasis_unsubscribe_and_join(struct stasis_subscription *subscription)
Cancel a subscription, blocking until the last message is processed.
Module has failed to load, may be in an inconsistent state.
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
int hepv3_is_loaded(void)
Return whether or not we're currently loaded and active.
struct timeval capture_time
struct ast_json * ast_json_object_get(struct ast_json *object, const char *key)
Get a field from a JSON object.
static void rtp_topic_handler(void *data, struct stasis_subscription *sub, struct stasis_message *message)
struct stasis_topic * ast_rtp_topic(void)
Stasis Message Bus API topic for RTP and RTCP related messages
int stasis_subscription_accept_message_type(struct stasis_subscription *subscription, const struct stasis_message_type *type)
Indicate to a subscription that we are interested in a message type.
struct stasis_forward * sub
static int force_inline attribute_pure ast_begins_with(const char *str, const char *prefix)
Abstract JSON element (object, array, string, int, ...).
int hepv3_send_packet(struct hepv3_capture_info *capture_info)
Send a generic packet capture to HEPv3.
#define ASTERISK_GPL_KEY
The text the key() function should return.
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
Pluggable RTP Architecture.
Asterisk module definitions.
static int load_module(void)