AST_STRING_FIELD(exten); /*!< Dialplan: Current extension number */
AST_STRING_FIELD(caller_name); /*!< Caller ID Name */
AST_STRING_FIELD(caller_number); /*!< Caller ID Number */
+ AST_STRING_FIELD(caller_ani); /*!< Caller ID ANI Number */
+ AST_STRING_FIELD(caller_rdnis); /*!< Caller ID RDNIS Number */
+ AST_STRING_FIELD(caller_dnid); /*!< Caller ID DNID Number */
AST_STRING_FIELD(connected_name); /*!< Connected Line Name */
AST_STRING_FIELD(connected_number); /*!< Connected Line Number */
AST_STRING_FIELD(language); /*!< The default spoken language for the channel */
/*!
* \since 12
+ * \brief A caching topic which caches \ref ast_channel_snapshot messages from
+ * ast_channel_events_all(void) and indexes them by name.
+ *
+ * \retval Topic for all channel events.
+ */
+struct stasis_caching_topic *ast_channel_topic_all_cached_by_name(void);
+
+/*!
+ * \since 12
* \brief Message type for \ref ast_channel_snapshot.
*
* \retval Message type for \ref ast_channel_snapshot.
/*!
* \since 12
- * \brief Creates a \ref ast_channel_blob message.
- *
- * The given \a blob should be treated as immutable and not modified after it is
- * put into the message.
+ * \brief Obtain the latest \ref ast_channel_snapshot from the \ref stasis cache. This is
+ * an ao2 object, so use \ref ao2_cleanup() to deallocate.
*
- * \param chan Channel blob is associated with, or \c NULL for global/all channels.
- * \param type Message type for this blob.
- * \param blob JSON object representing the data, or \c NULL for no data. If
- * \c NULL, ast_json_null() is put into the object.
+ * \param name The channel's name
*
- * \return \ref ast_channel_blob message.
- * \return \c NULL on error
+ * \retval A \ref ast_channel_snapshot on success
+ * \retval NULL on error
*/
-struct stasis_message *ast_channel_blob_create(struct ast_channel *chan,
- struct stasis_message_type *type, struct ast_json *blob);
+struct ast_channel_snapshot *ast_channel_snapshot_get_latest_by_name(const char *name);
/*!
* \since 12
- * \brief Creates a \ref ast_channel_blob message using the current cached
- * \ref ast_channel_snapshot for the passed in \ref ast_channel
+ * \brief Creates a \ref ast_channel_blob message.
*
* The given \a blob should be treated as immutable and not modified after it is
* put into the message.
* \param blob JSON object representing the data, or \c NULL for no data. If
* \c NULL, ast_json_null() is put into the object.
*
- * \param chan Channel blob is associated with
- * \param blob JSON object representing the data.
* \return \ref ast_channel_blob message.
* \return \c NULL on error
*/
-struct stasis_message *ast_channel_cached_blob_create(struct ast_channel *chan,
+struct stasis_message *ast_channel_blob_create(struct ast_channel *chan,
struct stasis_message_type *type, struct ast_json *blob);
/*!
const char *role, struct ast_channel_snapshot *snapshot);
/*!
+ * \brief Publish a channel blob message.
+ * \since 12.0.0
+ *
+ * \param chan Channel publishing the blob.
+ * \param type Type of stasis message.
+ * \param blob The blob being published. (NULL if no blob)
+ *
+ * \return Nothing
+ */
+void ast_channel_publish_blob(struct ast_channel *chan, struct stasis_message_type *type,
+ struct ast_json *blob);
+
+/*!
* \since 12
* \brief Publish a \ref ast_channel_snapshot for a channel.
*
/*!
* \since 12
+ * \brief Message type for when a channel is placed on hold.
+ *
+ * \retval A stasis message type
+ */
+struct stasis_message_type *ast_channel_hold_type(void);
+
+/*!
+ * \since 12
+ * \brief Message type for when a channel is removed from hold.
+ *
+ * \retval A stasis message type
+ */
+struct stasis_message_type *ast_channel_unhold_type(void);
+
+/*!
+ * \since 12
* \brief Message type for when a channel starts spying on another channel
*
* \retval A stasis message type
const struct ast_channel_snapshot *new_snapshot);
/*!
- * \brief Dispose of the stasis channel topics and message types
- */
-void ast_stasis_channels_shutdown(void);
-
-/*!
* \brief Initialize the stasis channel topic and message types
*/
void ast_stasis_channels_init(void);