459 static const char app[] =
"ConfBridge";
460 static const char app2[] =
"ConfKick";
463 #define CONFERENCE_BRIDGE_BUCKETS 53 466 #define RECORD_FILENAME_INITIAL_SPACE 128 483 const char *
name = obj;
489 name = conference->
name;
508 const char *right_name = arg;
514 right_name = right->
name;
517 cmp = strcasecmp(left->
name, right_name);
520 cmp = strncasecmp(left->
name, right_name, strlen(right_name));
530 return S_OR(custom_sounds->
hasjoin,
"conf-hasjoin");
532 return S_OR(custom_sounds->
hasleft,
"conf-hasleft");
534 return S_OR(custom_sounds->
kicked,
"conf-kicked");
536 return S_OR(custom_sounds->
muted,
"conf-muted");
538 return S_OR(custom_sounds->
unmuted,
"conf-unmuted");
544 return S_OR(custom_sounds->
onlyone,
"conf-onlyone");
556 return S_OR(custom_sounds->
getpin,
"conf-getpin");
562 return S_OR(custom_sounds->
locked,
"conf-locked");
570 return S_OR(custom_sounds->
join,
"confbridge-join");
572 return S_OR(custom_sounds->
leave,
"confbridge-leave");
578 return S_OR(custom_sounds->
begin,
"confbridge-conf-begin");
592 "conference", conference->
name);
631 "conference", conference->
name);
643 if (!bridge_snapshot) {
675 "muted", user->
muted);
755 ext = strrchr(rec_file,
'.');
760 ast_str_set(filename, 0,
"%s-%u", rec_file, (
unsigned int) now);
774 if (!*orig_rec_file) {
929 const char *filename)
932 const char *stop_digits;
935 if (bridge_channel) {
936 chan = bridge_channel->
chan;
1015 if (
play_file(bridge_channel, user->
chan, other_in_party) < 0) {
1057 if (user->
chan == chan) {
1102 if (user->
chan == chan) {
1177 ast_debug(1,
"Destroying conference bridge '%s'\n", conference->
name);
1201 if (conference->
bridge) {
1282 mute_user = user->
muted;
1293 mute_effective = mute_user || mute_system;
1295 ast_debug(1,
"User %s is %s: user:%d system:%d.\n",
1297 mute_user, mute_system);
1301 "Conference: %s\r\n" 1303 mute_effective ?
"muted" :
"unmuted",
1315 user->
muted = mute ? 1 : 0;
1319 "Message: participant %s %s\r\n" 1320 "Conference: %s\r\n" 1323 mute ?
"muted" :
"unmuted",
1448 if (!(action =
ast_calloc(1,
sizeof(*action)))) {
1518 ast_debug(1,
"Created announcer channel '%s' to conference bridge '%s'\n",
1522 "Confbridge/%s", conference->
name);
1566 char *confbr_name =
NULL;
1578 new_snapshot = msg->
target;
1605 comma = strchr(confbr_name,
',');
1643 ast_log(
LOG_ERROR,
"Unable to find user profile for channel '%s' in bridge '%s'\n",
1644 old_snapshot->
base->
name, confbr_name);
1663 "muted", user->
muted);
1683 int max_members_reached = 0;
1688 ast_debug(1,
"Trying to find conference bridge '%s'\n", conference_name);
1699 ast_debug(1,
"Conference '%s' is locked and caller is not an admin\n", conference_name);
1712 ast_log(
LOG_ERROR,
"Conference '%s' could not be created.\n", conference_name);
1732 if (!conference->
bridge) {
1735 ast_log(
LOG_ERROR,
"Conference '%s' mixing bridge could not be created.\n", conference_name);
1776 if (!
ao2_link(conference_bridges, conference)) {
1780 "Conference '%s' could not be added to the conferences list.\n", conference_name);
1791 ast_log(
LOG_ERROR,
"Could not allocate announcer channel for conference '%s'\n", conference_name);
1799 ast_log(
LOG_ERROR,
"Could not add announcer channel for conference '%s' bridge\n", conference_name);
1817 ast_debug(1,
"Created conference '%s' and linked to container.\n", conference_name);
1885 if (user_count_res) {
1935 }
else if (say_number >= 0) {
2003 if (say_number < 0) {
2014 filename, conference->
name);
2017 say_number, conference->
name);
2081 .
type =
"Confbridge async playback",
2117 if (async_datastore) {
2120 add = async_datastore->
data;
2127 if (!async_datastore) {
2132 if (!async_datastore->
data) {
2147 aptd =
ast_malloc(
sizeof(*aptd) + strlen(filename) + 1);
2210 if (!async_datastore) {
2214 add = async_datastore->
data;
2255 if (say_number < 0) {
2270 filename, conference->
name);
2273 say_number, conference->
name);
2296 if (!async_datastore) {
2300 add = async_datastore->
data;
2339 "talking_status", talking ?
"on" :
"off",
2341 if (!talking_extras) {
2352 char pin_guess[
MAX_PIN+1] = { 0, };
2354 char *
tmp = pin_guess;
2364 for (i = 0; i < 3; i++) {
2367 tmp, len, 0) >= 0) {
2368 if (!strcasecmp(pin, pin_guess)) {
2380 pin_guess[1] =
'\0';
2381 tmp = pin_guess + 1;
2412 "%s/confbridge-name-%s-%s", destdir,
2454 atd =
ast_malloc(
sizeof(*atd) + strlen(filename) + 1);
2510 conference->
name, filename);
2546 int res = 0, volume_adjustments[2];
2548 int async_delete_task_pushed = 0;
2550 const char *b_profile_name =
NULL;
2551 const char *u_profile_name =
NULL;
2552 const char *menu_profile_name =
NULL;
2558 .tech_args.drop_silence = 0,
2573 goto confbridge_cleanup;
2585 goto confbridge_cleanup;
2592 goto confbridge_cleanup;
2597 b_profile_name =
args.b_profile_name;
2601 ast_log(
LOG_WARNING,
"Conference bridge profile %s does not exist\n", b_profile_name ?
2604 goto confbridge_cleanup;
2609 u_profile_name =
args.u_profile_name;
2616 goto confbridge_cleanup;
2632 goto confbridge_cleanup;
2643 goto confbridge_cleanup;
2649 menu_profile_name =
args.menu_profile_name;
2654 ast_log(
LOG_WARNING,
"Conference menu profile %s does not exist\n", menu_profile_name ?
2657 goto confbridge_cleanup;
2688 goto confbridge_cleanup;
2696 goto confbridge_cleanup;
2753 join_hook_data =
ast_malloc(
sizeof(*join_hook_data));
2754 if (!join_hook_data) {
2756 goto confbridge_cleanup;
2766 goto confbridge_cleanup;
2769 leave_hook_data =
ast_malloc(
sizeof(*leave_hook_data));
2770 if (!leave_hook_data) {
2773 goto confbridge_cleanup;
2784 goto confbridge_cleanup;
2817 goto confbridge_cleanup;
2829 async_delete_task_pushed = 1;
2839 if (!quiet && user.
kicked) {
2850 if (volume_adjustments[0]) {
2853 if (volume_adjustments[1]) {
2873 mute = !user->
muted;
2885 unsigned int binaural;
2898 const char *sound_to_play;
2904 mute = !conference->
muted;
2942 while ((file =
strsep(&file_copy,
"&"))) {
2955 const char *playback_file,
2956 const char *cur_dtmf,
2966 while ((file =
strsep(&file_copy,
"&"))) {
2976 }
else if (digit == -1) {
2998 dtmf[i] = cur_dtmf[i];
3000 dtmf[i] = (char) digit;
3016 &new_menu_entry, menu);
3032 ast_log(
LOG_WARNING,
"Only admin users can use the kick_last menu action. Channel %s of conf %s is not an admin.\n",
3049 }
else if (!last_user->
kicked) {
3068 memset(&args, 0,
sizeof(args));
3111 int stop_prompts = 0;
3115 switch (menu_action->
id) {
3132 if (!stop_prompts) {
3135 "Message: %s\r\nChannel: %s",
3162 if (!(stop_prompts)) {
3239 int all = !strcasecmp(
"all", channel);
3240 int participants = !strcasecmp(
"participants", channel);
3285 int wordlen = strlen(word);
3290 if (!strncasecmp(conference->
name, word, wordlen) && ++which > state) {
3308 int wordlen = strlen(word);
3315 if (!strncasecmp(
"all", word, wordlen) && ++which > state) {
3319 if (!strncasecmp(
"participants", word, wordlen) && ++which > state) {
3349 e->
command =
"confbridge kick";
3351 "Usage: confbridge kick <conference> <channel>\n" 3352 " Kicks a channel out of the conference bridge.\n" 3353 " (all to kick everyone, participants to kick non-admins).\n";
3371 ast_cli(a->
fd,
"No conference bridge named '%s' found!\n", a->
argv[2]);
3377 if (!strcasecmp(
"all", a->
argv[3]) || !strcasecmp(
"participants", a->
argv[3])) {
3378 ast_cli(a->
fd,
"No participants found!\n");
3380 ast_cli(a->
fd,
"No participant named '%s' found!\n", a->
argv[3]);
3390 char flag_str[6 + 1];
3395 flag_str[pos++] =
'A';
3398 flag_str[pos++] =
'M';
3401 flag_str[pos++] =
'W';
3404 flag_str[pos++] =
'E';
3407 flag_str[pos++] =
'm';
3410 flag_str[pos++] =
'w';
3412 flag_str[pos] =
'\0';
3414 ast_cli(a->
fd,
"%-30s %-6s %-16s %-16s %-16s %s\n",
3430 e->
command =
"confbridge list";
3432 "Usage: confbridge list [<name>]\n" 3433 " Lists all currently active conference bridges or a specific conference bridge.\n" 3435 " When a conference bridge name is provided, flags may be shown for users. Below\n" 3436 " are the flags and what they represent.\n" 3439 " A - The user is an admin\n" 3440 " M - The user is a marked user\n" 3441 " W - The user must wait for a marked user to join\n" 3442 " E - The user will be kicked after the last marked user leaves the conference\n" 3443 " m - The user is muted\n" 3444 " w - The user is waiting for a marked user to join\n";
3456 ast_cli(a->
fd,
"Conference Bridge Name Users Marked Locked Muted\n");
3457 ast_cli(a->
fd,
"================================ ====== ====== ====== =====\n");
3460 ast_cli(a->
fd,
"%-32s %6u %6u %-6s %s\n",
3477 ast_cli(a->
fd,
"No conference bridge named '%s' found!\n", a->
argv[2]);
3480 ast_cli(a->
fd,
"Channel Flags User Profile Bridge Profile Menu CallerID\n");
3481 ast_cli(a->
fd,
"============================== ====== ================ ================ ================ ================\n");
3529 const char *chan_name)
3533 int all = !strcasecmp(
"all", chan_name);
3534 int participants = !strcasecmp(
"participants", chan_name);
3579 ast_cli(a->
fd,
"No conference bridge named '%s' found!\n", a->
argv[2]);
3581 }
else if (res == -2) {
3582 if (!strcasecmp(
"all", a->
argv[3]) || !strcasecmp(
"participants", a->
argv[3])) {
3583 ast_cli(a->
fd,
"No participants found in conference %s\n", a->
argv[2]);
3585 ast_cli(a->
fd,
"No channel named '%s' found in conference %s\n", a->
argv[3], a->
argv[2]);
3589 ast_cli(a->
fd,
"%s %s from confbridge %s\n", mute ?
"Muting" :
"Unmuting", a->
argv[3], a->
argv[2]);
3597 e->
command =
"confbridge mute";
3599 "Usage: confbridge mute <conference> <channel>\n" 3600 " Mute a channel in a conference.\n" 3601 " (all to mute everyone, participants to mute non-admins)\n" 3602 " If the specified channel is a prefix,\n" 3603 " the action will be taken on the first\n" 3604 " matching channel.\n";
3628 e->
command =
"confbridge unmute";
3630 "Usage: confbridge unmute <conference> <channel>\n" 3631 " Unmute a channel in a conference.\n" 3632 " (all to unmute everyone, participants to unmute non-admins)\n" 3633 " If the specified channel is a prefix,\n" 3634 " the action will be taken on the first\n" 3635 " matching channel.\n";
3659 e->
command =
"confbridge lock";
3661 "Usage: confbridge lock <conference>\n" 3662 " Lock a conference. While locked, no new non-admins\n" 3663 " may join the conference.\n";
3686 e->
command =
"confbridge unlock";
3688 "Usage: confbridge unlock <conference>\n" 3689 " Unlock a previously locked conference.\n";
3710 const char *rec_file =
NULL;
3715 e->
command =
"confbridge record start";
3717 "Usage: confbridge record start <conference> <file>\n" 3718 " <file> is optional, Otherwise the bridge profile\n" 3719 " record file will be used. If the bridge profile\n" 3720 " has no record file specified, a file will automatically\n" 3721 " be generated in the monitor directory\n";
3733 rec_file = a->
argv[4];
3738 ast_cli(a->
fd,
"Conference not found.\n");
3743 ast_cli(a->
fd,
"Conference is already being recorded.\n");
3753 ast_cli(a->
fd,
"Could not start recording due to internal error.\n");
3772 e->
command =
"confbridge record stop";
3774 "Usage: confbridge record stop <conference>\n" 3775 " Stop a previously started recording.\n";
3789 ast_cli(a->
fd,
"Conference not found.\n");
3795 ast_cli(a->
fd,
"Recording %sstopped.\n", ret ?
"could not be " :
"");
3811 .
name =
"CONFBRIDGE",
3817 .
name =
"CONFBRIDGE_INFO",
3838 "Event: ConfbridgeList\r\n" 3840 "Conference: %s\r\n" 3842 "MarkedUser: %s\r\n" 3843 "WaitMarked: %s\r\n" 3848 "AnsweredTime: %d\r\n" 3880 snprintf(id_text,
sizeof(id_text),
"ActionID: %s\r\n", actionid);
3919 char id_text[512] =
"";
3923 snprintf(id_text,
sizeof(id_text),
"ActionID: %s\r\n", actionid);
3940 "Event: ConfbridgeListRooms\r\n" 3942 "Conference: %s\r\n" 3990 }
else if (res == -2) {
4025 astman_send_ack(s, m, lock ?
"Conference locked" :
"Conference unlocked");
4063 astman_send_ack(s, m, !strcmp(
"all", channel) ?
"All participants kicked" :
"User kicked");
4218 snprintf(buf, len,
"0");
4224 if (!strcasecmp(
args.type,
"parties")) {
4231 }
else if (!strcasecmp(
args.type,
"admins")) {
4237 }
else if (!strcasecmp(
args.type,
"marked")) {
4243 }
else if (!strcasecmp(
args.type,
"locked")) {
4244 count = conference->
locked;
4245 }
else if (!strcasecmp(
args.type,
"muted")) {
4246 count = conference->
muted;
4250 snprintf(buf, len,
"%d", count);
4298 ast_debug(1,
"Kicked '%s' out of conference '%s'\n",
args.channel,
args.confbridge);
4419 conference_bridges =
NULL;
4458 if (!conference_bridges) {
4503 .optional_modules =
"codec_speex,func_jitterbuffer",
struct stasis_message_type * confbridge_start_record_type(void)
get the confbridge start_record stasis message type
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
static void conf_moh_unsuspend(struct confbridge_user *user)
void conf_remove_user_marked(struct confbridge_conference *conference, struct confbridge_user *user)
Remove a conference bridge user from the marked active conference users in the conference.
int ast_audiohook_volume_set(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume)
Adjust the volume on frames read from or written to a channel.
const ast_string_field unlockednow
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
const ast_string_field data
void conf_add_user_active(struct confbridge_conference *conference, struct confbridge_user *user)
Add a conference bridge user as an unmarked active user of the conference.
const ast_string_field thereare
Options for ast_pbx_run()
static int action_confbridgekick(struct mansession *s, const struct message *m)
static void send_leave_event(struct confbridge_user *user, struct confbridge_conference *conference)
#define ast_channel_lock(chan)
static char * handle_cli_confbridge_mute(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan)
Remove a channel from a bridge.
static int announce_user_count(struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel)
Announce number of users in the conference bridge to the caller.
void ast_bridge_features_cleanup(struct ast_bridge_features *features)
Clean up the contents of a bridge features structure.
conference_event_fn join_unmarked
#define AST_CLI_DEFINE(fn, txt,...)
int conf_add_post_join_action(struct confbridge_user *user, int(*func)(struct confbridge_user *user))
Queue a function to run with the given conference bridge user as an argument once the state transitio...
char * str
Subscriber phone number (Malloced)
void ast_bridge_set_mixing_interval(struct ast_bridge *bridge, unsigned int mixing_interval)
Adjust the internal mixing interval of a bridge used during multimix mode.
void ast_taskprocessor_build_name(char *buf, unsigned int size, const char *format,...)
Build a taskprocessor name with a sequence number on the end.
int ast_streamfile(struct ast_channel *c, const char *filename, const char *preflang)
Streams a file.
struct ast_channel_snapshot_base * base
Asterisk locking-related definitions:
void astman_append(struct mansession *s, const char *fmt,...)
Asterisk main include file. File version handling, generic pbx functions.
int ast_shutting_down(void)
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
const ast_string_field join
static void conf_moh_suspend(struct confbridge_user *user)
void conf_remove_user_active(struct confbridge_conference *conference, struct confbridge_user *user)
Remove a conference bridge user from the unmarked active conference users in the conference.
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
int manager_confbridge_init(void)
register stasis message routers to handle manager events for confbridge messages
struct stasis_message_type * confbridge_join_type(void)
get the confbridge join stasis message type
static void send_conf_end_event(struct confbridge_conference *conference)
static int join_callback(struct ast_bridge_channel *bridge_channel, void *ignore)
void ast_bridge_set_binaural_active(struct ast_bridge *bridge, unsigned int binaural_active)
Activates the use of binaural signals in a conference bridge.
int ast_autoservice_start(struct ast_channel *chan)
Automatically service a channel for us...
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
static char * handle_cli_confbridge_list(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
struct ast_channel * chan
static int user_timeout(struct ast_bridge_channel *bridge_channel, void *ignore)
int ast_audiohook_volume_get(struct ast_channel *chan, enum ast_audiohook_direction direction)
Retrieve the volume adjustment value on frames read from or written to a channel. ...
int pbx_exec(struct ast_channel *c, struct ast_app *app, const char *data)
Execute an application.
void ast_bridge_set_maximum_sample_rate(struct ast_bridge *bridge, unsigned int sample_rate)
Adjust the maximum mixing sample rate of a bridge used during multimix mode.
Message representing attended transfer.
const ast_string_field otherinparty
int ast_bridge_leave_hook(struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags)
Attach a bridge channel leave hook to a bridge features structure.
Structure that contains features information.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
static void send_join_event(struct confbridge_user *user, struct confbridge_conference *conference)
#define ast_channel_unref(c)
Decrease channel reference count.
struct confbridge_conference * conference
The arg parameter is a search key, but is not an object.
const char * conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds *custom_sounds)
Looks to see if sound file is stored in bridge profile sounds, if not default sound is provided...
#define ast_test_flag(p, flag)
static void wait_for_initiator(struct ast_channel *initiator)
Wait for the initiator of an async playback to be ready.
static int action_confbridgesetsinglevideosrc(struct mansession *s, const struct message *m)
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
void ast_channel_unregister(const struct ast_channel_tech *tech)
Unregister a channel technology.
static int play_sound_number(struct confbridge_conference *conference, int say_number)
Play number into the conference bridge.
char name[MAX_PROFILE_NAME]
static int action_toggle_mute_participants(struct confbridge_conference *conference, struct confbridge_user *user)
int ast_bridge_join_hook(struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags)
Unregisters a handler for a built in interval feature.
static int playback_task(void *data)
Play an announcement into a confbridge.
unsigned int talking_threshold
#define ast_set_flag(p, flag)
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
int ast_json_object_update(struct ast_json *object, struct ast_json *other)
Update object with all of the fields of other.
void astman_send_list_complete_start(struct mansession *s, const struct message *m, const char *event_name, int count)
Start the list complete event.
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
descriptor for a cli entry.
void conf_remove_user_waiting(struct confbridge_conference *conference, struct confbridge_user *user)
Remove a conference bridge user from the waiting conference users in the conference.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
int ast_bridge_unsuspend(struct ast_bridge *bridge, struct ast_channel *chan)
Unsuspend a channel from a bridge.
int ast_bridge_features_init(struct ast_bridge_features *features)
Initialize bridge features structure.
struct ast_taskprocessor * ast_taskprocessor_get(const char *name, enum ast_tps_options create)
Get a reference to a taskprocessor with the specified name and create the taskprocessor if necessary...
int ast_bridge_talk_detector_hook(struct ast_bridge_features *features, ast_bridge_talking_indicate_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags)
Attach a bridge channel talk detection hook to a bridge features structure.
struct confbridge_user::@93 post_join_list
Structure that contains a snapshot of information about a bridge.
const struct user_profile * conf_find_user_profile(struct ast_channel *chan, const char *user_profile_name, struct user_profile *result)
find a user profile given a user profile's name and store that profile in result structure.
static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)
struct post_join_action::@92 list
static int load_module(void)
Load the module.
static struct confbridge_conference * join_conference_bridge(const char *conference_name, struct confbridge_user *user)
Join a conference bridge.
static char * handle_cli_confbridge_start_record(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Structure representing a snapshot of channel state.
struct bridge_profile_sounds * sounds
return a reference to a taskprocessor, create one if it does not exist
static void handle_video_on_exit(struct confbridge_conference *conference, struct ast_channel *chan)
static int conf_get_pin(struct ast_channel *chan, struct confbridge_user *user)
const ast_string_field onlyone
unsigned int suspended_moh
static int conf_stop_record(struct confbridge_conference *conference)
void ast_bridge_channel_feature_digit_add(struct ast_bridge_channel *bridge_channel, int digit)
Add a DTMF digit to the collected digits.
void conf_menu_entry_destroy(struct conf_menu_entry *menu_entry)
Destroys and frees all the actions stored in a menu_entry structure.
static int action_toggle_mute(struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel)
Structure for a data store type.
ast_channel_state
ast_channel states
struct ast_channel_snapshot * target
void conf_mute_only_active(struct confbridge_conference *conference)
Attempt to mute/play MOH to the only user in the conference if they require it.
int ast_bridge_destroy(struct ast_bridge *bridge, int cause)
Destroy a bridge.
static void generic_mute_unmute_user(struct confbridge_conference *conference, struct confbridge_user *user, int mute)
#define ast_cond_wait(cond, mutex)
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
#define ast_cond_init(cond, attr)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
void conf_update_user_mute(struct confbridge_user *user)
Update the actual mute status of the user and set it on the bridge.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
int ast_channel_get_up_time(struct ast_channel *chan)
Obtain how long it has been since the channel was answered.
struct confbridge_state * CONF_STATE_EMPTY
Conference state with no active or waiting users.
unsigned int silence_threshold
void astman_send_ack(struct mansession *s, const struct message *m, char *msg)
Send ack in manager transaction.
#define ast_mutex_lock(a)
static struct ast_custom_function confbridge_info_function
unsigned int binaural_suspended
int ast_channel_register(const struct ast_channel_tech *tech)
Register a channel technology (a new channel driver) Called by a channel module to register the kind ...
static int match(struct ast_sockaddr *addr, unsigned short callno, unsigned short dcallno, const struct chan_iax2_pvt *cur, int check_dcallno)
static int kick_conference_participant(struct confbridge_conference *conference, const char *channel)
static char * complete_confbridge_name(const char *line, const char *word, int pos, int state)
#define ast_strdup(str)
A wrapper for strdup()
Structure for a data store object.
struct confbridge_conference * conference
struct confbridge_conference * conference
struct confbridge_user::@94 list
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
static int hangup(void *data)
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
void confbridge_handle_atxfer(struct ast_attended_transfer_message *msg)
Create join/leave events for attended transfers.
conference_event_fn leave_unmarked
static int action_confbridgeunlock(struct mansession *s, const struct message *m)
void conf_add_user_marked(struct confbridge_conference *conference, struct confbridge_user *user)
Add a conference bridge user as a marked active user of the conference.
struct ast_channel * record_chan
struct stasis_message_type * confbridge_start_type(void)
get the confbridge start stasis message type
#define CONFERENCE_BRIDGE_BUCKETS
Out-of-call text message support.
int ast_filedelete(const char *filename, const char *fmt)
Deletes a file.
static void send_mute_event(struct confbridge_user *user, struct confbridge_conference *conference)
void ast_cli(int fd, const char *fmt,...)
#define AST_LIST_REMOVE(head, elm, field)
Removes a specific entry from a list.
#define AST_TASKPROCESSOR_MAX_NAME
Suggested maximum taskprocessor name length (less null terminator).
struct ast_str * orig_rec_file
int ast_unregister_application(const char *app)
Unregister an application.
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
void ast_free_ptr(void *ptr)
free() wrapper
struct ast_channel * initiator
#define ast_cond_signal(cond)
int ast_channel_priority(const struct ast_channel *chan)
struct ast_channel_snapshot_dialplan * dialplan
unsigned int announce_user_count_all_after
struct ast_bridge_channel_snapshot_pair to_transferee
void ast_bridge_features_destroy(struct ast_bridge_features *features)
Destroy an allocated bridge features struct.
const ast_string_field hasjoin
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
static int hangup_playback(void *data)
Hang up the announcer channel.
conference_event_fn join_marked
struct ast_bridge * bridge
Bridge this channel is participating in.
void async_play_sound_ready(struct ast_channel *chan)
Indicate the initiator of an async sound file is ready for it to play.
struct confbridge_conference::@90 active_list
struct ast_taskprocessor * playback_queue
int ast_context_remove_extension(const char *context, const char *extension, int priority, const char *registrar)
Simply remove extension from context.
static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new)
void ast_bridge_set_remb_estimated_bitrate(struct ast_bridge *bridge, float estimated_bitrate)
Force the REMB report estimated bitrate to a specific max value.
unsigned int silence_threshold
static int action_kick_last(struct confbridge_conference *conference, struct ast_bridge_channel *bridge_channel, struct confbridge_user *user)
struct bridge_profile b_profile
const char * astman_get_header(const struct message *m, char *var)
Get header from mananger transaction.
pthread_cond_t ast_cond_t
#define ast_strlen_zero(foo)
static void destroy_conference_bridge(void *obj)
Destroy a conference bridge.
static int handle_conf_user_leave(struct confbridge_user *user)
Call the proper leave event handler for the user for the conference bridge's current state...
struct ast_channel_tech * conf_record_get_tech(void)
Get ConfBridge record channel technology struct.
struct ast_channel * ast_request(const char *type, struct ast_format_cap *request_cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause)
Requests a channel.
void conf_handle_second_active(struct confbridge_conference *conference)
Handle when a conference moves to having more than one active participant.
unsigned int waitingusers
static int setup_async_playback_datastore(struct ast_channel *initiator)
Prepare the async playback datastore.
int ast_record_review(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, const char *path)
Allow to record message and have a review option.
void conf_bridge_profile_copy(struct bridge_profile *dst, struct bridge_profile *src)
copies a bridge profile
struct stasis_message_type * confbridge_leave_type(void)
get the confbridge leave stasis message type
static char * complete_confbridge_participant(const char *conference_name, const char *line, const char *word, int pos, int state)
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
struct ast_party_id id
Caller party ID.
static struct async_playback_task_data * async_playback_task_data_alloc(struct confbridge_conference *conference, const char *filename, int say_number, struct ast_channel *initiator)
struct ast_bridge_channel_snapshot_pair to_transfer_target
#define ast_custom_function_register_escalating(acf, escalation)
Register a custom function which requires escalated privileges.
struct ast_flags feature_flags
unsigned int text_messaging
void ast_bridge_remove_video_src(struct ast_bridge *bridge, struct ast_channel *chan)
remove a channel as a source of video for the bridge.
#define EVENT_FLAG_SYSTEM
const ast_string_field begin
static void async_playback_task_data_destroy(struct async_playback_task_data *aptd)
#define ast_debug(level,...)
Log a DEBUG message.
void ast_bridge_set_send_sdp_label(struct ast_bridge *bridge, unsigned int send_sdp_label)
Controls whether to send a "label" attribute in each stream in an SDP.
conference_event_fn leave_marked
static struct ast_datastore_info async_datastore_info
Datastore used for timing of async announcement playback.
int conf_announce_channel_push(struct ast_channel *ast)
Push the announcer channel into the conference.
int async_play_sound_file(struct confbridge_conference *conference, const char *filename, struct ast_channel *initiator)
Play sound file into conference bridge asynchronously.
#define DEFAULT_TALKING_THRESHOLD
int ast_devstate_changed(enum ast_device_state state, enum ast_devstate_cache cachable, const char *fmt,...)
Tells Asterisk the State for Device is changed.
static int action_lock_unlock_helper(struct mansession *s, const struct message *m, int lock)
int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags) attribute_warn_unused_result
Impart a channel to a bridge (non-blocking)
void ast_brige_set_remb_behavior(struct ast_bridge *bridge, enum ast_bridge_video_sfu_remb_behavior behavior)
Set the REMB report generation behavior on a bridge.
General Asterisk PBX channel definitions.
Asterisk JSON abstraction layer.
static void send_conf_start_event(struct confbridge_conference *conference)
static char * handle_cli_confbridge_lock(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static void handle_cli_confbridge_list_item(struct ast_cli_args *a, struct confbridge_user *user, int waiting)
Asterisk file paths, configured in asterisk.conf.
struct confbridge_conference * conference
void astman_send_list_complete_end(struct mansession *s)
End the list complete event.
const ast_string_field appl
const ast_string_field errormenu
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
static struct ast_custom_function confbridge_function
static struct async_datastore_data * async_datastore_data_alloc(void)
int conf_handle_dtmf(struct ast_bridge_channel *bridge_channel, struct confbridge_user *user, struct conf_menu_entry *menu_entry, struct conf_menu *menu)
Once a DTMF sequence matches a sequence in the user's DTMF menu, this function will get called to per...
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
Data structure associated with a custom dialplan function.
struct ast_channel_snapshot * transferee
enum ast_pbx_result ast_pbx_run_args(struct ast_channel *c, struct ast_pbx_args *args)
Execute the PBX in the current thread.
void conf_bridge_profile_destroy(struct bridge_profile *b_profile)
Destroy a bridge profile found by 'conf_find_bridge_profile'.
void conf_handle_first_join(struct confbridge_conference *conference)
Callback to execute any time we transition from zero to one active users.
#define ast_channel_cleanup(c)
Cleanup a channel reference.
#define ao2_ref(o, delta)
static void send_stop_record_event(struct confbridge_conference *conference)
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
int conf_reload_config(void)
reload confbridge.conf file
static int async_delete_name_rec(struct confbridge_conference *conference, const char *filename)
const ast_string_field binauraloff
In case you didn't read that giant block of text above the mansession_session struct, the struct mansession is named this solely to keep the API the same in Asterisk. This structure really represents data that is different from Manager action to Manager action. The mansession_session pointer contained within points to session-specific data.
static struct async_delete_name_rec_task_data * async_delete_name_rec_task_data_alloc(struct confbridge_conference *conference, const char *filename)
struct ast_channel_tech * conf_announce_get_tech(void)
Get ConfBridge announce channel technology struct.
#define ast_strdupa(s)
duplicate a string in memory from the stack
int ast_bridge_interval_hook(struct ast_bridge_features *features, enum ast_bridge_hook_timer_option flags, unsigned int interval, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags)
Attach an interval hook to a bridge features structure.
#define ast_malloc(len)
A wrapper for malloc()
#define MAXIMUM_DTMF_FEATURE_STRING
Maximum length of a DTMF feature string.
struct ao2_container * conference_bridges
Container to hold all conference bridges in progress.
static int action_mute_unmute_helper(struct mansession *s, const struct message *m, int mute)
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
char language[MAX_LANGUAGE]
const ast_string_field waitforleader
struct ast_bridge * ast_bridge_base_new(uint32_t capabilities, unsigned int flags, const char *creator, const char *name, const char *id)
Create a new base class bridge.
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
unsigned int maximum_sample_rate
struct ast_str * ast_manager_build_channel_state_string(const struct ast_channel_snapshot *snapshot)
Generate the AMI message body from a channel snapshot.
int(* func)(struct confbridge_user *user)
static int cli_mute_unmute_helper(int mute, struct ast_cli_args *a)
Structure to describe a channel "technology", ie a channel driver See for examples: ...
const char * ast_channel_exten(const struct ast_channel *chan)
Core PBX routines and definitions.
static int action_confbridgestoprecord(struct mansession *s, const struct message *m)
unsigned int internal_sample_rate
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
int ast_autoservice_stop(struct ast_channel *chan)
Stop servicing a channel for us...
struct stasis_message_type * confbridge_stop_record_type(void)
get the confbridge stop_record stasis message type
int ast_check_hangup(struct ast_channel *chan)
Check to see if a channel is needing hang up.
void ast_bridge_set_video_update_discard(struct ast_bridge *bridge, unsigned int video_update_discard)
Set the amount of time to discard subsequent video updates after a video update has been sent...
struct confbridge_state * state
static int action_confbridgelock(struct mansession *s, const struct message *m)
#define ast_test_suite_event_notify(s, f,...)
const char * ast_channel_uniqueid(const struct ast_channel *chan)
struct stasis_topic * ast_channel_topic(struct ast_channel *chan)
A topic which publishes the events for a particular channel.
static int conf_start_record(struct confbridge_conference *conference)
unsigned int dtmf_passthrough
int ast_manager_unregister(const char *action)
Unregister a registered manager command.
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
struct confbridge_user * user
static int action_toggle_binaural(struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel)
void conf_moh_start(struct confbridge_user *user)
Start MOH for the conference user.
static void send_conf_stasis(struct confbridge_conference *conference, struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *extras, int channel_topic)
unsigned int video_update_discard
struct ast_channel_snapshot * channel_snapshot
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
struct ast_channel * chan
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
#define RECORD_FILENAME_INITIAL_SPACE
void conf_destroy_config(void)
destroy the information loaded from the confbridge.conf file
#define ao2_unlink(container, obj)
int conf_handle_only_person(struct confbridge_user *user)
Handle actions whenever an user joins an empty conference.
static void confbridge_unlock_and_unref(void *obj)
const ast_string_field getpin
static int async_playback_task(void *data)
Play an announcement into a confbridge asynchronously.
static int generic_mute_unmute_helper(int mute, const char *conference_name, const char *chan_name)
int ast_bridge_is_video_src(struct ast_bridge *bridge, struct ast_channel *chan)
Determine if a channel is a video src for the bridge.
const ast_string_field participantsmuted
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
static void send_conf_stasis_snapshots(struct confbridge_conference *conference, struct ast_channel_snapshot *chan_snapshot, struct stasis_message_type *type, struct ast_json *extras)
int ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime_sec, const char *fmt, int *duration, int *sound_duration, int silencethreshold, int maxsilence_ms, const char *path)
Record a file based on input from a channel. Use default accept and cancel DTMF. This function will p...
def ignore(key=None, val=None, section=None, pjsip=None, nmapped=None, type='endpoint')
int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass)
Turn on music on hold on a given channel.
static void handle_video_on_join(struct confbridge_conference *conference, struct ast_channel *chan, int marked)
#define ao2_iterator_next(iter)
#define ast_cond_destroy(cond)
struct ast_bridge_snapshot * ast_bridge_snapshot_create(struct ast_bridge *bridge)
Generate a snapshot of the bridge state. This is an ao2 object, so ao2_cleanup() to deallocate...
#define ao2_alloc(data_size, destructor_fn)
void ast_bridge_set_remb_send_interval(struct ast_bridge *bridge, unsigned int remb_send_interval)
Set the interval at which a combined REMB frame will be sent to video sources.
static void async_datastore_data_destroy(void *data)
#define AST_LIST_LAST(head)
Returns the last entry contained in a list.
void ast_bridge_channel_leave_bridge(struct ast_bridge_channel *bridge_channel, enum bridge_channel_state new_state, int cause)
Set bridge channel state to leave bridge (if not leaving already).
void conf_moh_stop(struct confbridge_user *user)
Stop MOH for the conference user.
struct ast_format_cap * capabilities
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
void conf_add_user_waiting(struct confbridge_conference *conference, struct confbridge_user *user)
Add a conference bridge user as an waiting user of the conference.
const ast_string_field leave
unsigned int talking_threshold
const ast_string_field lockednow
void manager_confbridge_shutdown(void)
unregister stasis message routers to handle manager events for confbridge messages ...
#define ast_channel_unlock(chan)
static int conf_is_recording(struct confbridge_conference *conference)
#define ast_bridge_unlock(bridge)
Unlock the bridge.
static void parse(struct mgcp_request *req)
void stasis_publish(struct stasis_topic *topic, struct stasis_message *message)
Publish a message to a topic's subscribers.
int conf_set_menu_to_user(struct ast_channel *chan, struct confbridge_user *user, const char *menu_profile_name)
find a menu profile given a menu profile's name and apply the menu in DTMF hooks. ...
#define SCOPED_AO2LOCK(varname, obj)
scoped lock specialization for ao2 mutexes.
const ast_string_field binauralon
#define ast_calloc(num, len)
A wrapper for calloc()
conference_event_fn join_waitmarked
static int execute_menu_entry(struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel, struct conf_menu_entry *menu_entry, struct conf_menu *menu)
int ast_stream_and_wait(struct ast_channel *chan, const char *file, const char *digits)
stream file until digit If the file name is non-empty, try to play it.
const ast_string_field participantsunmuted
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
void ast_bridge_set_talker_src_video_mode(struct ast_bridge *bridge)
Set the bridge to pick the strongest talker supporting video as the single source video feed...
struct bridge_profile b_profile
static char * handle_cli_confbridge_unlock(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
struct ast_bridge_features features
static int push_announcer(struct confbridge_conference *conference)
Push the announcer channel into the bridge.
static int action_confbridgemute(struct mansession *s, const struct message *m)
void ast_channel_pbx_set(struct ast_channel *chan, struct ast_pbx *value)
The structure that represents a conference bridge.
static int func_confbridge_info(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
Module has failed to load, may be in an inconsistent state.
int ast_audiohook_volume_adjust(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume)
Adjust the volume on frames read from or written to a channel.
const char * ast_config_AST_SPOOL_DIR
char regcontext[AST_MAX_CONTEXT]
#define ao2_find(container, arg, flags)
static void playback_task_data_destroy(struct playback_task_data *ptd)
An API for managing task processing threads that can be shared across modules.
static char * handle_cli_confbridge_unmute(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
const ast_string_field unmuted
int ast_app_getdata(struct ast_channel *c, const char *prompt, char *s, int maxlen, int timeout)
Plays a stream and gets DTMF data from a channel.
static int send_event_hook_callback(struct ast_bridge_channel *bridge_channel, void *data)
static void unregister_channel_tech(struct ast_channel_tech *tech)
int conf_handle_inactive_waitmarked(struct confbridge_user *user)
Handle actions every time a waitmarked user joins w/o a marked user present.
int conf_find_menu_entry_by_sequence(const char *dtmf_sequence, struct conf_menu *menu, struct conf_menu_entry *result)
Finds a menu_entry in a menu structure matched by DTMF sequence.
void conf_send_event_to_participants(struct confbridge_conference *conference, struct ast_channel *chan, struct stasis_message *msg)
Send events to bridge participants.
static int action_playback(struct ast_bridge_channel *bridge_channel, const char *playback_file)
static int action_playback_and_continue(struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel, struct conf_menu *menu, const char *playback_file, const char *cur_dtmf, int *stop_prompts)
structure to hold users read from users.conf
const char *const description
int ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, struct ast_bridge_tech_optimizations *tech_args, enum ast_bridge_join_flags flags)
Join a channel to a bridge (blocking)
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",)
void conf_invalid_event_fn(struct confbridge_user *user)
A handler for join/leave events that are invalid in a particular state.
void ast_bridge_set_single_src_video_mode(struct ast_bridge *bridge, struct ast_channel *video_src_chan)
Set a bridge to feed a single video source to all participants.
static void hangup_data_init(struct hangup_data *hangup, struct confbridge_conference *conference)
char name_rec_location[PATH_MAX]
void ast_channel_exten_set(struct ast_channel *chan, const char *value)
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
struct stasis_message_type * confbridge_end_type(void)
get the confbridge end stasis message type
static void playback_task_data_init(struct playback_task_data *ptd, struct confbridge_conference *conference, const char *filename, int say_number)
struct ast_bridge_features * ast_bridge_features_new(void)
Allocate a new bridge features struct.
#define ast_bridge_lock(bridge)
Lock the bridge.
static int action_confbridgelist(struct mansession *s, const struct message *m)
void ast_str_reset(struct ast_str *buf)
Reset the content of a dynamic string. Useful before a series of ast_str_append.
#define EVENT_FLAG_REPORTING
#define AST_YESNO(x)
return Yes or No depending on the argument.
const ast_string_field invalidpin
static int action_confbridgestartrecord(struct mansession *s, const struct message *m)
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
static struct ast_cli_entry cli_confbridge[]
static int unload_module(void)
Called when module is being unloaded.
static int conference_bridge_hash_cb(const void *obj, const int flags)
Hashing function used for conference bridges container.
struct ast_channel * chan
Structure that contains information regarding a channel in a bridge.
char * strsep(char **str, const char *delims)
int ast_taskprocessor_push(struct ast_taskprocessor *tps, int(*task_exe)(void *datap), void *datap) attribute_warn_unused_result
Push a task into the specified taskprocessor queue and signal the taskprocessor thread.
static int is_new_rec_file(const char *rec_file, struct ast_str **orig_rec_file)
const ast_string_field onlyperson
char menu_name[MAX_PROFILE_NAME]
static void send_unmute_event(struct confbridge_user *user, struct confbridge_conference *conference)
#define ast_channel_ref(c)
Increase channel reference count.
conference_event_fn leave_waitmarked
int ast_add_extension(const char *context, int replace, const char *extension, int priority, const char *label, const char *callerid, const char *application, void *data, void(*datad)(void *), const char *registrar)
Add and extension to an extension context.
struct ast_channel_snapshot * ast_channel_snapshot_get_latest(const char *uniqueid)
Obtain the latest ast_channel_snapshot from the Stasis Message Bus API cache. This is an ao2 object...
static int alloc_playback_chan(struct confbridge_conference *conference)
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says a number
Standard Command Line Interface.
void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
Lock the bridge associated with the bridge channel.
enum ast_bridge_hook_type hook_type
int ast_bridge_suspend(struct ast_bridge *bridge, struct ast_channel *chan)
Suspend a channel temporarily from a bridge.
void ast_channel_context_set(struct ast_channel *chan, const char *value)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
static int async_play_sound_helper(struct confbridge_conference *conference, const char *filename, int say_number, struct ast_channel *initiator)
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
void * ast_taskprocessor_unreference(struct ast_taskprocessor *tps)
Unreference the specified taskprocessor and its reference count will decrement.
ast_app: A registered application
static int async_delete_name_rec_task(void *data)
Delete user's name file asynchronously.
const char * ast_channel_name(const struct ast_channel *chan)
char name[MAX_PROFILE_NAME]
int ast_waitstream(struct ast_channel *c, const char *breakon)
Waits for a stream to stop or digit to be pressed.
int ast_fileexists(const char *filename, const char *fmt, const char *preflang)
Checks for the existence of a given file.
#define DEFAULT_MENU_PROFILE
static void handler(const char *name, int response_code, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
int ast_answer(struct ast_channel *chan)
Answer a channel.
static int generic_lock_unlock_helper(int lock, const char *conference_name)
unsigned int remb_estimated_bitrate
struct confbridge_conference * conf_find_bridge(const char *conference_name)
Find a confbridge by name.
struct ast_channel * playback_chan
static void async_delete_name_rec_task_data_destroy(struct async_delete_name_rec_task_data *atd)
int func_confbridge_helper(struct ast_channel *chan, const char *cmd, char *data, const char *value)
Data structure associated with a single frame of data.
const char * ast_channel_language(const struct ast_channel *chan)
struct stasis_message * ast_bridge_blob_create(struct stasis_message_type *type, struct ast_bridge *bridge, struct ast_channel *chan, struct ast_json *blob)
Creates a ast_bridge_blob message.
struct stasis_message_type * confbridge_talking_type(void)
get the confbridge talking stasis message type
struct stasis_message_type * confbridge_unmute_type(void)
get the confbridge unmute stasis message type
Abstract JSON element (object, array, string, int, ...).
The structure that represents a conference bridge user.
struct confbridge_conference::@91 waiting_list
void conf_ended(struct confbridge_conference *conference)
Callback to be called when the conference has become empty.
static int confkick_exec(struct ast_channel *chan, const char *data)
void(* conference_event_fn)(struct confbridge_user *user)
#define DEFAULT_BRIDGE_PROFILE
struct ast_str * record_filename
char * ast_str_set_substr(struct ast_str **buf, ssize_t maxlen, const char *src, size_t maxsrc)
Set a dynamic string to a non-NULL terminated substring.
static int conference_bridge_cmp_cb(void *obj, void *arg, int flags)
Comparison function used for conference bridges container.
const char * ast_channel_context(const struct ast_channel *chan)
static int play_file(struct ast_bridge_channel *bridge_channel, struct ast_channel *channel, const char *filename)
unsigned int drop_silence
static int sound_file_exists(const char *filename)
#define ast_datastore_alloc(info, uid)
static int action_confbridgeunmute(struct mansession *s, const struct message *m)
static int action_confbridgelistrooms(struct mansession *s, const struct message *m)
int conf_load_config(void)
load confbridge.conf file
static void playback_common(struct confbridge_conference *conference, const char *filename, int say_number)
int play_sound_file(struct confbridge_conference *conference, const char *filename)
Play sound file into conference bridge.
struct stasis_message_type * confbridge_mute_type(void)
get the confbridge mute stasis message type
struct user_profile u_profile
#define ast_mutex_init(pmutex)
#define AST_CLI_YESNO(x)
Return Yes or No depending on the argument.
#define DEFAULT_USER_PROFILE
static char * handle_cli_confbridge_kick(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
struct stasis_topic * ast_bridge_topic(struct ast_bridge *bridge)
A topic which publishes the events for a particular bridge.
static char context[AST_MAX_CONTEXT]
#define ast_mutex_destroy(a)
static int play_prompt_to_user(struct confbridge_user *user, const char *filename)
Play back an audio file to a channel.
static int conf_rec_name(struct confbridge_user *user, const char *conf_name)
static char * handle_cli_confbridge_stop_record(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
const ast_string_field muted
static int handle_conf_user_join(struct confbridge_user *user)
Call the proper join event handler for the user for the conference bridge's current state...
struct ast_app * pbx_findapp(const char *app)
Look up an application.
#define ast_manager_register_xml(action, authority, func)
Register a manager callback using XML documentation to describe the manager.
Say numbers and dates (maybe words one day too)
#define ASTERISK_GPL_KEY
The text the key() function should return.
unsigned int remb_send_interval
void ast_channel_priority_set(struct ast_channel *chan, int value)
static int action_confbridgelist_item(struct mansession *s, const char *id_text, struct confbridge_conference *conference, struct confbridge_user *user, int waiting)
const ast_string_field leaderhasleft
int ast_dsp_get_threshold_from_settings(enum threshold which)
Get silence threshold from dsp.conf.
void astman_send_error(struct mansession *s, const struct message *m, char *error)
Send error in manager transaction.
Asterisk module definitions.
unsigned int no_hangup_chan
const ast_string_field kicked
struct ast_exten * pbx_find_extension(struct ast_channel *chan, struct ast_context *bypass, struct pbx_find_info *q, const char *context, const char *exten, int priority, const char *label, const char *callerid, enum ext_match_t action)
unsigned int mix_interval
int ast_func_write(struct ast_channel *chan, const char *function, const char *value)
executes a write operation on a function
static int play_sound_helper(struct confbridge_conference *conference, const char *filename, int say_number)
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
static int register_channel_tech(struct ast_channel_tech *tech)
static void send_start_record_event(struct confbridge_conference *conference)
unsigned char valid
TRUE if the number information is valid/present.
static void hangup_data_destroy(struct hangup_data *hangup)
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
static int action_dialplan_exec(struct ast_bridge_channel *bridge_channel, struct conf_menu_action *menu_action)
#define ast_custom_function_register(acf)
Register a custom function.
struct confbridge_conference * conference
struct stasis_message * ast_bridge_blob_create_from_snapshots(struct stasis_message_type *type, struct ast_bridge_snapshot *bridge_snapshot, struct ast_channel_snapshot *chan_snapshot, struct ast_json *blob)
Creates a ast_bridge_blob message from snapshots.
int ast_stopstream(struct ast_channel *c)
Stops a stream.
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
const ast_string_field locked
#define DEFAULT_SILENCE_THRESHOLD
Structure for mutex and tracking information.
static force_inline int attribute_pure ast_str_case_hash(const char *str)
Compute a hash value on a case-insensitive string.
static int confbridge_exec(struct ast_channel *chan, const char *data)
The ConfBridge application.
struct ast_bridge_tech_optimizations tech_args
char announcement[PATH_MAX]
void ast_bridge_set_internal_sample_rate(struct ast_bridge *bridge, unsigned int sample_rate)
Adjust the internal mixing sample rate of a bridge used during multimix mode.
const ast_string_field name
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
#define ast_mutex_unlock(a)
#define AST_APP_ARG(name)
Define an application argument.
static void leave_conference(struct confbridge_user *user)
Leave a conference.
struct ast_bridge * bridge
const ast_string_field placeintoconf
const ast_string_field hasleft
int ast_mkdir(const char *path, int mode)
Recursively create directory path.
const struct bridge_profile * conf_find_bridge_profile(struct ast_channel *chan, const char *bridge_profile_name, struct bridge_profile *result)
Find a bridge profile given a bridge profile's name and store that profile in result structure...
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
Send ack in manager transaction to begin a list.
struct ast_party_number number
Subscriber phone number.
#define ao2_link(container, obj)
struct confbridge_conference * conference