Asterisk - The Open Source Telephony Project GIT-master-a63eec2
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions | Variables
bridge_holding.c File Reference

Bridging technology for storing channels in a bridge for the purpose of holding, parking, queues, and other such states where a channel may need to be in a bridge but not actually communicating with anything. More...

#include "asterisk.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_technology.h"
#include "asterisk/frame.h"
#include "asterisk/musiconhold.h"
#include "asterisk/format_cache.h"
Include dependency graph for bridge_holding.c:

Go to the source code of this file.

Data Structures

struct  deferred_data
 
struct  holding_channel
 Structure which contains per-channel role information. More...
 

Typedefs

typedef void(* deferred_cb) (struct ast_bridge_channel *bridge_channel)
 

Enumerations

enum  holding_roles { HOLDING_ROLE_PARTICIPANT , HOLDING_ROLE_ANNOUNCER }
 
enum  idle_modes {
  IDLE_MODE_NONE , IDLE_MODE_MOH , IDLE_MODE_RINGING , IDLE_MODE_SILENCE ,
  IDLE_MODE_HOLD
}
 

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int defer_action (struct ast_bridge_channel *bridge_channel, deferred_cb callback)
 
static void deferred_action (struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
 
static void handle_participant_join (struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *announcer_channel)
 
static int holding_bridge_join (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 
static void holding_bridge_leave (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 
static void holding_bridge_suspend (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 
static void holding_bridge_unsuspend (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 
static int holding_bridge_write (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
 
static int load_module (void)
 
static void participant_entertainment_start (struct ast_bridge_channel *bridge_channel)
 
static void participant_entertainment_stop (struct ast_bridge_channel *bridge_channel)
 
static void participant_idle_mode_setup (struct ast_bridge_channel *bridge_channel)
 
static void participant_reaction_announcer_join (struct ast_bridge_channel *bridge_channel)
 
static void participant_reaction_announcer_leave (struct ast_bridge_channel *bridge_channel)
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Holding bridge module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, }
 
static const struct ast_module_infoast_module_info = &__mod_info
 
static struct ast_bridge_technology holding_bridge
 

Detailed Description

Bridging technology for storing channels in a bridge for the purpose of holding, parking, queues, and other such states where a channel may need to be in a bridge but not actually communicating with anything.

Author
Jonathan Rose jrose.nosp@m.@dig.nosp@m.ium.c.nosp@m.om

Definition in file bridge_holding.c.

Typedef Documentation

◆ deferred_cb

typedef void(* deferred_cb) (struct ast_bridge_channel *bridge_channel)

Definition at line 73 of file bridge_holding.c.

Enumeration Type Documentation

◆ holding_roles

Enumerator
HOLDING_ROLE_PARTICIPANT 
HOLDING_ROLE_ANNOUNCER 

Definition at line 51 of file bridge_holding.c.

51 {
54};
@ HOLDING_ROLE_PARTICIPANT
@ HOLDING_ROLE_ANNOUNCER

◆ idle_modes

enum idle_modes
Enumerator
IDLE_MODE_NONE 
IDLE_MODE_MOH 
IDLE_MODE_RINGING 
IDLE_MODE_SILENCE 
IDLE_MODE_HOLD 

Definition at line 56 of file bridge_holding.c.

56 {
62};
@ IDLE_MODE_MOH
@ IDLE_MODE_RINGING
@ IDLE_MODE_SILENCE
@ IDLE_MODE_HOLD
@ IDLE_MODE_NONE

Function Documentation

◆ __reg_module()

static void __reg_module ( void  )
static

Definition at line 442 of file bridge_holding.c.

◆ __unreg_module()

static void __unreg_module ( void  )
static

Definition at line 442 of file bridge_holding.c.

◆ AST_MODULE_SELF_SYM()

struct ast_module * AST_MODULE_SELF_SYM ( void  )

Definition at line 442 of file bridge_holding.c.

◆ defer_action()

static int defer_action ( struct ast_bridge_channel bridge_channel,
deferred_cb  callback 
)
static

Definition at line 93 of file bridge_holding.c.

94{
95 struct deferred_data data = { .callback = callback };
96 int res;
97
99 &data, sizeof(data));
100 if (res) {
101 ast_log(LOG_WARNING, "Bridge %s: Could not defer action on %s.\n",
102 bridge_channel->bridge->uniqueid, ast_channel_name(bridge_channel->chan));
103 }
104 return res;
105}
#define ast_log
Definition astobj2.c:42
int ast_bridge_channel_queue_callback(struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_custom_callback_option flags, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size)
Queue a bridge action custom callback frame onto the bridge channel.
static void deferred_action(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
const char * ast_channel_name(const struct ast_channel *chan)
static struct ast_channel * callback(struct ast_channelstorage_instance *driver, ao2_callback_data_fn *cb_fn, void *arg, void *data, int ao2_flags)
#define LOG_WARNING
struct ast_bridge * bridge
Bridge this channel is participating in.
struct ast_channel * chan
const ast_string_field uniqueid
Definition bridge.h:405
deferred_cb callback

References ast_bridge_channel_queue_callback(), ast_channel_name(), ast_log, ast_bridge_channel::bridge, deferred_data::callback, callback(), ast_bridge_channel::chan, deferred_action(), LOG_WARNING, and ast_bridge::uniqueid.

Referenced by handle_participant_join(), holding_bridge_join(), and holding_bridge_leave().

◆ deferred_action()

static void deferred_action ( struct ast_bridge_channel bridge_channel,
const void *  payload,
size_t  payload_size 
)
static

Definition at line 412 of file bridge_holding.c.

413{
414 const struct deferred_data *data = payload;
415
416 ast_bridge_channel_lock_bridge(bridge_channel);
417 if (bridge_channel->bridge->technology != &holding_bridge
418 || !bridge_channel->tech_pvt) {
419 /* Not valid anymore. */
420 ast_bridge_unlock(bridge_channel->bridge);
421 return;
422 }
423 data->callback(bridge_channel);
424 ast_bridge_unlock(bridge_channel->bridge);
425}
#define ast_bridge_unlock(bridge)
Unlock the bridge.
Definition bridge.h:485
void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
Lock the bridge associated with the bridge channel.
static struct ast_bridge_technology holding_bridge
void * tech_pvt
Private information unique to the bridge technology.
struct ast_bridge_technology * technology
Definition bridge.h:359

References ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_bridge_channel::bridge, deferred_data::callback, holding_bridge, ast_bridge_channel::tech_pvt, and ast_bridge::technology.

Referenced by defer_action(), and smart_bridge_operation().

◆ handle_participant_join()

static void handle_participant_join ( struct ast_bridge_channel bridge_channel,
struct ast_bridge_channel announcer_channel 
)
static

Definition at line 226 of file bridge_holding.c.

227{
228 struct ast_channel *us = bridge_channel->chan;
229
230 /* If the announcer channel isn't present, we need to set up ringing, music on hold, or whatever. */
231 if (!announcer_channel) {
233 return;
234 }
235
236 /* We need to get compatible with the announcer. */
238 ast_log(LOG_WARNING, "Could not make participant %s compatible.\n", ast_channel_name(us));
239 }
240}
static int defer_action(struct ast_bridge_channel *bridge_channel, deferred_cb callback)
static void participant_entertainment_start(struct ast_bridge_channel *bridge_channel)
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
Definition channel.c:5771
struct ast_format * ast_format_slin
Built-in cached signed linear 8kHz format.
Main Channel structure associated with a channel.
struct ast_bridge_channel * bridge_channel

References ast_channel_name(), ast_format_slin, ast_log, ast_set_write_format(), ast_channel::bridge_channel, ast_bridge_channel::chan, defer_action(), LOG_WARNING, and participant_entertainment_start().

Referenced by holding_bridge_join().

◆ holding_bridge_join()

static int holding_bridge_join ( struct ast_bridge bridge,
struct ast_bridge_channel bridge_channel 
)
static

Definition at line 242 of file bridge_holding.c.

243{
244 struct ast_bridge_channel *other_channel;
245 struct ast_bridge_channel *announcer_channel;
246 struct holding_channel *hc;
247 struct ast_channel *us = bridge_channel->chan; /* The joining channel */
248
250
251 if (!(hc = ast_calloc(1, sizeof(*hc)))) {
252 return -1;
253 }
254
256
257 /* The bridge pvt holds the announcer channel if we have one. */
258 announcer_channel = bridge->tech_pvt;
259
261 if (announcer_channel) {
262 /* Another announcer already exists. */
264 ast_free(hc);
265 ast_log(LOG_WARNING, "Bridge %s: Channel %s tried to be an announcer. Bridge already has one.\n",
267 return -1;
268 }
269
272
273 /* The announcer should always be made compatible with signed linear */
275 ast_log(LOG_ERROR, "Could not make announcer %s compatible.\n", ast_channel_name(us));
276 }
277
278 /* Make everyone listen to the announcer. */
279 AST_LIST_TRAVERSE(&bridge->channels, other_channel, entry) {
280 /* Skip the reaction if we are the channel in question */
281 if (bridge_channel == other_channel) {
282 continue;
283 }
285 }
286
287 return 0;
288 }
289
291 handle_participant_join(bridge_channel, announcer_channel);
292 return 0;
293}
#define ast_free(a)
Definition astmm.h:180
#define ast_calloc(num, len)
A wrapper for calloc()
Definition astmm.h:202
static void participant_reaction_announcer_join(struct ast_bridge_channel *bridge_channel)
static void handle_participant_join(struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *announcer_channel)
int ast_bridge_channel_has_role(struct ast_bridge_channel *bridge_channel, const char *role_name)
Check to see if a bridge channel inherited a specific role from its channel.
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
Definition channel.c:5730
#define LOG_ERROR
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define NULL
Definition resample.c:96
Structure that contains information regarding a channel in a bridge.
void * tech_pvt
Definition bridge.h:361
struct ast_bridge_channels_list channels
Definition bridge.h:367
struct ast_bridge * bridge
Structure which contains per-channel role information.
enum holding_roles role
#define ast_assert(a)
Definition utils.h:776

References ast_assert, ast_bridge_channel_has_role(), ast_calloc, ast_channel_name(), ast_format_slin, ast_free, AST_LIST_TRAVERSE, ast_log, ast_set_read_format(), ast_channel::bridge, ast_channel::bridge_channel, ast_bridge_channel::chan, ast_bridge::channels, defer_action(), handle_participant_join(), HOLDING_ROLE_ANNOUNCER, HOLDING_ROLE_PARTICIPANT, LOG_ERROR, LOG_WARNING, NULL, participant_reaction_announcer_join(), holding_channel::role, ast_bridge::tech_pvt, ast_bridge_channel::tech_pvt, and ast_bridge::uniqueid.

◆ holding_bridge_leave()

static void holding_bridge_leave ( struct ast_bridge bridge,
struct ast_bridge_channel bridge_channel 
)
static

Definition at line 301 of file bridge_holding.c.

302{
303 struct ast_bridge_channel *other_channel;
304 struct holding_channel *hc = bridge_channel->tech_pvt;
305
306 if (!hc) {
307 return;
308 }
309
310 switch (hc->role) {
312 /* The announcer is leaving */
313 bridge->tech_pvt = NULL;
314
315 /* Reset the other channels back to moh/ringing. */
316 AST_LIST_TRAVERSE(&bridge->channels, other_channel, entry) {
318 }
319 break;
320 default:
321 /* Nothing needs to react to its departure. */
322 participant_entertainment_stop(bridge_channel);
323 break;
324 }
325 bridge_channel->tech_pvt = NULL;
326 ast_free(hc);
327}
static void participant_entertainment_stop(struct ast_bridge_channel *bridge_channel)
static void participant_reaction_announcer_leave(struct ast_bridge_channel *bridge_channel)

References ast_free, AST_LIST_TRAVERSE, ast_bridge::channels, defer_action(), HOLDING_ROLE_ANNOUNCER, NULL, participant_entertainment_stop(), participant_reaction_announcer_leave(), holding_channel::role, ast_bridge::tech_pvt, and ast_bridge_channel::tech_pvt.

◆ holding_bridge_suspend()

static void holding_bridge_suspend ( struct ast_bridge bridge,
struct ast_bridge_channel bridge_channel 
)
static

Definition at line 352 of file bridge_holding.c.

353{
354 struct holding_channel *hc = bridge_channel->tech_pvt;
355
356 if (!hc) {
357 return;
358 }
359
360 switch (hc->role) {
362 participant_entertainment_stop(bridge_channel);
363 break;
364 default:
365 break;
366 }
367}

References HOLDING_ROLE_PARTICIPANT, participant_entertainment_stop(), holding_channel::role, and ast_bridge_channel::tech_pvt.

◆ holding_bridge_unsuspend()

static void holding_bridge_unsuspend ( struct ast_bridge bridge,
struct ast_bridge_channel bridge_channel 
)
static

Definition at line 369 of file bridge_holding.c.

370{
371 struct holding_channel *hc = bridge_channel->tech_pvt;
372 struct ast_bridge_channel *announcer_channel = bridge->tech_pvt;
373
374 if (!hc) {
375 return;
376 }
377
378 switch (hc->role) {
380 if (announcer_channel) {
381 /* There is an announcer channel in the bridge. */
382 break;
383 }
384 /* We need to restart the entertainment. */
385 participant_entertainment_start(bridge_channel);
386 break;
387 default:
388 break;
389 }
390}

References ast_bridge_channel::bridge, HOLDING_ROLE_PARTICIPANT, participant_entertainment_start(), holding_channel::role, ast_bridge::tech_pvt, and ast_bridge_channel::tech_pvt.

◆ holding_bridge_write()

static int holding_bridge_write ( struct ast_bridge bridge,
struct ast_bridge_channel bridge_channel,
struct ast_frame frame 
)
static

Definition at line 329 of file bridge_holding.c.

330{
331 struct holding_channel *hc = bridge_channel ? bridge_channel->tech_pvt : NULL;
332
333 /* If there is no tech_pvt, then the channel failed to allocate one when it joined and is borked. Don't listen to him. */
334 if (!hc) {
335 /* "Accept" the frame and discard it. */
336 return 0;
337 }
338
339 switch (hc->role) {
341 /* Write the frame to all other channels if any. */
342 ast_bridge_queue_everyone_else(bridge, bridge_channel, frame);
343 break;
344 default:
345 /* "Accept" the frame and discard it. */
346 break;
347 }
348
349 return 0;
350}
int ast_bridge_queue_everyone_else(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
Queue the given frame to everyone else.

References ast_bridge_queue_everyone_else(), HOLDING_ROLE_ANNOUNCER, NULL, holding_channel::role, and ast_bridge_channel::tech_pvt.

◆ load_module()

static int load_module ( void  )
static

Definition at line 433 of file bridge_holding.c.

434{
438 }
440}
static int unload_module(void)
#define ast_bridge_technology_register(technology)
See __ast_bridge_technology_register()
@ AST_MODULE_LOAD_SUCCESS
Definition module.h:70
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Definition module.h:78

References ast_bridge_technology_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, holding_bridge, and unload_module().

◆ participant_entertainment_start()

static void participant_entertainment_start ( struct ast_bridge_channel bridge_channel)
static

Definition at line 186 of file bridge_holding.c.

187{
188 struct holding_channel *hc = bridge_channel->tech_pvt;
189 const char *moh_class;
190 size_t moh_length;
191
192 ast_assert(hc != NULL);
193
194 if (hc->entertainment_active) {
195 /* Already started */
196 return;
197 }
198 hc->entertainment_active = 1;
199
200 participant_idle_mode_setup(bridge_channel);
201 switch(hc->idle_mode) {
202 case IDLE_MODE_MOH:
203 moh_class = ast_bridge_channel_get_role_option(bridge_channel, "holding_participant", "moh_class");
204 if (ast_moh_start(bridge_channel->chan, moh_class, NULL)) {
205 ast_log(LOG_WARNING, "Failed to start moh, starting silence generator instead\n");
208 }
209 break;
211 ast_indicate(bridge_channel->chan, AST_CONTROL_RINGING);
212 break;
213 case IDLE_MODE_NONE:
214 break;
217 break;
218 case IDLE_MODE_HOLD:
219 moh_class = ast_bridge_channel_get_role_option(bridge_channel, "holding_participant", "moh_class");
220 moh_length = moh_class ? strlen(moh_class + 1) : 0;
221 ast_indicate_data(bridge_channel->chan, AST_CONTROL_HOLD, moh_class, moh_length);
222 break;
223 }
224}
static void participant_idle_mode_setup(struct ast_bridge_channel *bridge_channel)
const char * ast_bridge_channel_get_role_option(struct ast_bridge_channel *bridge_channel, const char *role_name, const char *option)
Retrieve the value of a requested role option from a bridge channel.
struct ast_silence_generator * ast_channel_start_silence_generator(struct ast_channel *chan)
Starts a silence generator on the given channel.
Definition channel.c:8178
int ast_indicate_data(struct ast_channel *chan, int condition, const void *data, size_t datalen)
Indicates condition of channel, with payload.
Definition channel.c:4621
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
Definition channel.c:4243
@ AST_CONTROL_RINGING
int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass)
Turn on music on hold on a given channel.
Definition channel.c:7748
struct ast_silence_generator * silence_generator
unsigned int entertainment_active
enum idle_modes idle_mode

References ast_assert, ast_bridge_channel_get_role_option(), ast_channel_start_silence_generator(), AST_CONTROL_HOLD, AST_CONTROL_RINGING, ast_indicate(), ast_indicate_data(), ast_log, ast_moh_start(), ast_bridge_channel::chan, holding_channel::entertainment_active, holding_channel::idle_mode, IDLE_MODE_HOLD, IDLE_MODE_MOH, IDLE_MODE_NONE, IDLE_MODE_RINGING, IDLE_MODE_SILENCE, LOG_WARNING, NULL, participant_idle_mode_setup(), holding_channel::silence_generator, and ast_bridge_channel::tech_pvt.

Referenced by handle_participant_join(), holding_bridge_unsuspend(), and participant_reaction_announcer_leave().

◆ participant_entertainment_stop()

static void participant_entertainment_stop ( struct ast_bridge_channel bridge_channel)
static

Definition at line 141 of file bridge_holding.c.

142{
143 struct holding_channel *hc = bridge_channel->tech_pvt;
144
145 ast_assert(hc != NULL);
146
147 if (!hc->entertainment_active) {
148 /* Already stopped */
149 return;
150 }
151 hc->entertainment_active = 0;
152
153 switch (hc->idle_mode) {
154 case IDLE_MODE_MOH:
155 ast_moh_stop(bridge_channel->chan);
156 break;
158 ast_indicate(bridge_channel->chan, -1);
159 break;
160 case IDLE_MODE_NONE:
161 break;
163 if (hc->silence_generator) {
166 }
167 break;
168 case IDLE_MODE_HOLD:
169 ast_indicate(bridge_channel->chan, AST_CONTROL_UNHOLD);
170 break;
171 }
172}
void ast_channel_stop_silence_generator(struct ast_channel *chan, struct ast_silence_generator *state)
Stops a previously-started silence generator on the given channel.
Definition channel.c:8224
@ AST_CONTROL_UNHOLD
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
Definition channel.c:7758

References ast_assert, ast_channel_stop_silence_generator(), AST_CONTROL_UNHOLD, ast_indicate(), ast_moh_stop(), ast_bridge_channel::chan, holding_channel::entertainment_active, holding_channel::idle_mode, IDLE_MODE_HOLD, IDLE_MODE_MOH, IDLE_MODE_NONE, IDLE_MODE_RINGING, IDLE_MODE_SILENCE, NULL, holding_channel::silence_generator, and ast_bridge_channel::tech_pvt.

Referenced by holding_bridge_leave(), holding_bridge_suspend(), and participant_reaction_announcer_join().

◆ participant_idle_mode_setup()

static void participant_idle_mode_setup ( struct ast_bridge_channel bridge_channel)
static

Definition at line 114 of file bridge_holding.c.

115{
116 const char *idle_mode = ast_bridge_channel_get_role_option(bridge_channel, "holding_participant", "idle_mode");
117 struct holding_channel *hc = bridge_channel->tech_pvt;
118
119 ast_assert(hc != NULL);
120
123 } else if (!strcmp(idle_mode, "musiconhold")) {
125 } else if (!strcmp(idle_mode, "ringing")) {
127 } else if (!strcmp(idle_mode, "none")) {
129 } else if (!strcmp(idle_mode, "silence")) {
131 } else if (!strcmp(idle_mode, "hold")) {
133 } else {
134 /* Invalid idle mode requested. */
135 ast_debug(1, "channel %s idle mode '%s' doesn't match any defined idle mode\n",
136 ast_channel_name(bridge_channel->chan), idle_mode);
137 ast_assert(0);
138 }
139}
#define ast_debug(level,...)
Log a DEBUG message.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Definition strings.h:65

References ast_assert, ast_bridge_channel_get_role_option(), ast_channel_name(), ast_debug, ast_strlen_zero(), ast_bridge_channel::chan, holding_channel::idle_mode, IDLE_MODE_HOLD, IDLE_MODE_MOH, IDLE_MODE_NONE, IDLE_MODE_RINGING, IDLE_MODE_SILENCE, NULL, and ast_bridge_channel::tech_pvt.

Referenced by participant_entertainment_start().

◆ participant_reaction_announcer_join()

static void participant_reaction_announcer_join ( struct ast_bridge_channel bridge_channel)
static

◆ participant_reaction_announcer_leave()

static void participant_reaction_announcer_leave ( struct ast_bridge_channel bridge_channel)
static

Definition at line 295 of file bridge_holding.c.

296{
298 participant_entertainment_start(bridge_channel);
299}
void ast_bridge_channel_restore_formats(struct ast_bridge_channel *bridge_channel)
Restore the formats of a bridge channel's channel to how they were before bridge_channel_internal_joi...

References ast_bridge_channel_restore_formats(), ast_channel::bridge_channel, and participant_entertainment_start().

Referenced by holding_bridge_leave().

◆ unload_module()

static int unload_module ( void  )
static

Definition at line 427 of file bridge_holding.c.

428{
430 return 0;
431}
int ast_bridge_technology_unregister(struct ast_bridge_technology *technology)
Unregister a bridge technology from use.
Definition bridge.c:274

References ast_bridge_technology_unregister(), and holding_bridge.

Referenced by load_module().

Variable Documentation

◆ __mod_info

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Holding bridge module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, }
static

Definition at line 442 of file bridge_holding.c.

◆ ast_module_info

const struct ast_module_info* ast_module_info = &__mod_info
static

Definition at line 442 of file bridge_holding.c.

◆ holding_bridge

struct ast_bridge_technology holding_bridge
static

Definition at line 392 of file bridge_holding.c.

392 {
393 .name = "holding_bridge",
394 .capabilities = AST_BRIDGE_CAPABILITY_HOLDING,
396 .write = holding_bridge_write,
397 .join = holding_bridge_join,
398 .leave = holding_bridge_leave,
399 .suspend = holding_bridge_suspend,
400 .unsuspend = holding_bridge_unsuspend,
401};
@ AST_BRIDGE_CAPABILITY_HOLDING
Definition bridge.h:90
static int holding_bridge_join(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
static void holding_bridge_suspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
static void holding_bridge_leave(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
static int holding_bridge_write(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
static void holding_bridge_unsuspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
@ AST_BRIDGE_PREFERENCE_BASE_HOLDING

Referenced by deferred_action(), load_module(), and unload_module().