47 switch (snapshot->
state) {
62 if (!old_snapshot && new_snapshot) {
65 }
else if (old_snapshot && !new_snapshot) {
69 if (old_snapshot->
state != new_snapshot->
state) {
154 .requires =
"res_statsd" void ast_statsd_log_full_va(const char *metric_name, const char *metric_type, intmax_t value, double sample_rate,...)
Send a stat to the configured statsd server.
Asterisk main include file. File version handling, generic pbx functions.
struct stasis_message * old_snapshot
Old value from the cache.
static void update(int code_size, int y, int wi, int fi, int dq, int sr, int dqsez, struct g726_state *state_ptr)
int stasis_message_router_add(struct stasis_message_router *router, struct stasis_message_type *message_type, stasis_subscription_cb callback, void *data)
Add a route to a message router.
#define ao2_callback(c, flags, cb_fn, arg)
struct stasis_message_type * ast_endpoint_snapshot_type(void)
Message type for ast_endpoint_snapshot.
void stasis_message_router_unsubscribe_and_join(struct stasis_message_router *router)
Unsubscribe the router from the upstream topic, blocking until the final message has been processed...
Assume that the ao2_container is already locked.
static void update_endpoint_state(struct ast_endpoint_snapshot *snapshot, const char *delta)
static int load_module(void)
struct ao2_container * stasis_cache_dump(struct stasis_cache *cache, struct stasis_message_type *type)
Dump cached items to a subscription for the ast_eid_default entity.
static void cache_update_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message)
struct stasis_topic * ast_endpoint_topic_all_cached(void)
Cached topic for all endpoint related messages.
void ast_statsd_log_string(const char *metric_name, const char *metric_type, const char *value, double sample_rate)
Send a stat to the configured statsd server.
static struct ao2_container * endpoints
const ast_string_field resource
#define ao2_ref(o, delta)
struct stasis_message_type * stasis_cache_update_type(void)
Message type for cache update messages.
static int unload_module(void)
#define stasis_message_router_create(topic)
A snapshot of an endpoint's state.
struct stasis_message * new_snapshot
New value.
void * stasis_message_data(const struct stasis_message *msg)
Get the data contained in a message.
const ast_string_field tech
struct stasis_message_type * type
Convenience reference to snapshot type.
static struct stasis_message_router * router
Statsd Endpoint stats.
static int dump_cache_load(void *obj, void *arg, int flags)
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",)
#define AST_STATSD_GAUGE
Support for publishing to a statsd server.
static void handle_endpoint_update(struct ast_endpoint_snapshot *old_snapshot, struct ast_endpoint_snapshot *new_snapshot)
struct stasis_forward * sub
static int dump_cache_unload(void *obj, void *arg, int flags)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
enum ast_endpoint_state state
struct stasis_cache * ast_endpoint_cache(void)
Backend cache for ast_endpoint_topic_all_cached().