Asterisk - The Open Source Telephony Project GIT-master-57e2743
Loading...
Searching...
No Matches
channel_info.h
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2026, Sangoma Technologies Corporation
5 *
6 * Michael Bradeen <mbradeen@sangoma.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*!
20 * \file
21 * \brief Channel-locked PJSIP information interface
22 */
23
24#ifndef _CHAN_PJSIP_CHANNEL_INFO_H
25#define _CHAN_PJSIP_CHANNEL_INFO_H
26
27#include <pjsip.h>
28
29#include "asterisk/channel.h"
31
33 char value[PJSIP_MAX_URL_SIZE];
34 /*! Printed length, or -1 if the URI did not fit. */
35 int length;
36};
37
38/*! All members are protected by the owning channel's lock. */
44 /*! Unescaped received tag; NULL if unavailable or allocation failed. */
46 /*! Signaling security, or -1 if unavailable. */
47 int secure;
48 /* Retained because active/pending media objects may be shared and changed
49 * outside the channel lock. RTP APIs provide live addresses/statistics.
50 */
53 unsigned int audio_secure;
54 unsigned int video_secure;
55 unsigned int audio_held;
56 unsigned int video_held;
57};
58
59/*!
60 * \brief Create channel-owned PJSIP information before channel publication
61 * \pre The caller holds the channel lock and executes in the session serializer.
62 * \retval 0 on success
63 * \retval -1 on failure
64 */
66
67/*!
68 * \brief Refresh channel information under the channel lock
69 * \pre The caller executes in the session serializer.
70 */
72
73/*!
74 * \brief Schedule a refresh from any thread without waiting for the serializer
75 */
77
78/*!
79 * \brief Find the channel's information, or NULL if it has none
80 * \pre The caller holds the channel lock.
81 * \note The result is borrowed and may only be used while the channel is locked.
82 * Do not release it with ao2_cleanup(). The channel datastore owns its lifetime.
83 */
85
86/*! \brief Register the channel information session supplement. */
88
89/*! \brief Unregister the channel information session supplement. */
91
92#endif /* _CHAN_PJSIP_CHANNEL_INFO_H */
static struct ast_mansession session
General Asterisk PBX channel definitions.
void pjsip_channel_info_schedule_update(struct ast_sip_session *session)
Schedule a refresh from any thread without waiting for the serializer.
void pjsip_channel_info_register(void)
Register the channel information session supplement.
struct pjsip_channel_info * pjsip_channel_info_get(struct ast_channel *chan)
Find the channel's information, or NULL if it has none.
void pjsip_channel_info_unregister(void)
Unregister the channel information session supplement.
void pjsip_channel_info_update(struct ast_sip_session *session)
Refresh channel information under the channel lock.
int pjsip_channel_info_create(struct ast_channel *chan, struct ast_sip_session *session)
Create channel-owned PJSIP information before channel publication.
Main Channel structure associated with a channel.
Structure for a data store object.
Definition datastore.h:64
A structure describing a SIP session.
struct ast_rtp_instance * audio_rtp
unsigned int audio_held
struct pjsip_channel_uri target_uri
unsigned int video_held
struct ast_datastore * datastore
struct pjsip_channel_uri local_uri
struct pjsip_channel_uri remote_uri
struct ast_rtp_instance * video_rtp
unsigned int video_secure
unsigned int audio_secure
char value[PJSIP_MAX_URL_SIZE]