return 1;
}
+/*!
+ * \internal
+ * \brief Filter channel snapshots by technology
+ */
+static int filter_channel_snapshot(struct ast_channel_snapshot *snapshot)
+{
+ return snapshot->tech_properties & AST_CHAN_TP_INTERNAL;
+}
+
+/*!
+ * \internal
+ * \brief Filter a channel cache update
+ */
+static int filter_channel_cache_message(struct ast_channel_snapshot *old_snapshot,
+ struct ast_channel_snapshot *new_snapshot)
+{
+ int ret = 0;
+
+ /* Drop cache updates from certain channel technologies */
+ if (old_snapshot) {
+ ret |= filter_channel_snapshot(old_snapshot);
+ }
+ if (new_snapshot) {
+ ret |= filter_channel_snapshot(new_snapshot);
+ }
+
+ return ret;
+}
+
/* TOPIC ROUTER CALLBACKS */
/*!
(unsigned int)stasis_message_timestamp(message)->tv_sec,
(unsigned int)stasis_message_timestamp(message)->tv_usec);
+ if (filter_channel_snapshot(peer) || (caller && filter_channel_snapshot(caller))) {
+ return;
+ }
+
/* Figure out who is running this show */
if (caller) {
cdr = ao2_find(active_cdrs_by_channel, caller->uniqueid, OBJ_KEY);
return 0;
}
-/*!
- * \internal
- * \brief Filter channel snapshots by technology
- */
-static int filter_channel_snapshot(struct ast_channel_snapshot *snapshot)
-{
- return snapshot->tech_properties & AST_CHAN_TP_INTERNAL;
-}
-
-/*!
- * \internal
- * \brief Filter a channel cache update
- */
-static int filter_channel_cache_message(struct ast_channel_snapshot *old_snapshot,
- struct ast_channel_snapshot *new_snapshot)
-{
- int ret = 0;
-
- /* Drop cache updates from certain channel technologies */
- if (old_snapshot) {
- ret |= filter_channel_snapshot(old_snapshot);
- }
- if (new_snapshot) {
- ret |= filter_channel_snapshot(new_snapshot);
- }
-
- return ret;
-}
-
/*! \brief Determine if we need to add a new CDR based on snapshots */
static int check_new_cdr_needed(struct ast_channel_snapshot *old_snapshot,
struct ast_channel_snapshot *new_snapshot)