547static const char app[] =
"ConfBridge";
548static const char app2[] =
"ConfKick";
551#define CONFERENCE_BRIDGE_BUCKETS 53
554#define RECORD_FILENAME_INITIAL_SPACE 128
571 const char *
name = obj;
596 const char *right_name = arg;
602 right_name = right->
name;
605 cmp = strcasecmp(left->
name, right_name);
608 cmp = strncasecmp(left->
name, right_name, strlen(right_name));
618 return S_OR(custom_sounds->
hasjoin,
"conf-hasjoin");
620 return S_OR(custom_sounds->
hasleft,
"conf-hasleft");
622 return S_OR(custom_sounds->
kicked,
"conf-kicked");
624 return S_OR(custom_sounds->
muted,
"conf-muted");
626 return S_OR(custom_sounds->
unmuted,
"conf-unmuted");
632 return S_OR(custom_sounds->
onlyone,
"conf-onlyone");
644 return S_OR(custom_sounds->
getpin,
"conf-getpin");
650 return S_OR(custom_sounds->
locked,
"conf-locked");
658 return S_OR(custom_sounds->
join,
"confbridge-join");
660 return S_OR(custom_sounds->
leave,
"confbridge-leave");
666 return S_OR(custom_sounds->
begin,
"confbridge-conf-begin");
680 "conference", conference->
name);
719 "conference", conference->
name);
731 if (!bridge_snapshot) {
763 "muted",
user->muted);
843 ext = strrchr(rec_file,
'.');
848 ast_str_set(filename, 0,
"%s-%u", rec_file, (
unsigned int) now);
862 if (!*orig_rec_file) {
1019 const char *filename)
1022 const char *stop_digits;
1268 ast_debug(1,
"Destroying conference bridge '%s'\n", conference->
name);
1317 handler =
user->conference->state->join_waitmarked;
1346 handler =
user->conference->state->leave_waitmarked;
1348 handler =
user->conference->state->leave_unmarked;
1373 mute_user =
user->muted;
1376 mute_system =
user->playing_moh
1381 || (!
user->conference->markedusers
1384 mute_effective = mute_user || mute_system;
1386 ast_debug(1,
"User %s is %s: user:%d system:%d.\n",
1388 mute_user, mute_system);
1389 user->features.mute = mute_effective;
1392 "Conference: %s\r\n"
1394 mute_effective ?
"muted" :
"unmuted",
1395 user->conference->b_profile.name,
1406 user->muted = mute ? 1 : 0;
1410 "Message: participant %s %s\r\n"
1411 "Conference: %s\r\n"
1414 mute ?
"muted" :
"unmuted",
1426 user->playing_moh = 0;
1427 if (!
user->suspended_moh) {
1453 user->playing_moh = 1;
1454 if (!
user->suspended_moh) {
1487 if (--
user->suspended_moh == 0 &&
user->playing_moh) {
1502 if (
user->suspended_moh++ == 0 &&
user->playing_moh) {
1535 if (!(action =
ast_calloc(1,
sizeof(*action)))) {
1605 ast_debug(1,
"Created announcer channel '%s' to conference bridge '%s'\n",
1609 "Confbridge/%s", conference->
name);
1653 char *confbr_name =
NULL;
1665 new_snapshot = msg->
target;
1692 comma = strchr(confbr_name,
',');
1720 if (!found_user && conference->waitingusers) {
1730 ast_log(
LOG_ERROR,
"Unable to find user profile for channel '%s' in bridge '%s'\n",
1731 old_snapshot->
base->
name, confbr_name);
1750 "muted",
user->muted);
1770 int max_members_reached = 0;
1775 ast_debug(1,
"Trying to find conference bridge '%s'\n", conference_name);
1786 ast_debug(1,
"Conference '%s' is locked and caller is not an admin\n", conference_name);
1799 ast_log(
LOG_ERROR,
"Conference '%s' could not be created.\n", conference_name);
1819 if (!conference->
bridge) {
1822 ast_log(
LOG_ERROR,
"Conference '%s' mixing bridge could not be created.\n", conference_name);
1869 "Conference '%s' could not be added to the conferences list.\n", conference_name);
1880 ast_log(
LOG_ERROR,
"Could not allocate announcer channel for conference '%s'\n", conference_name);
1888 ast_log(
LOG_ERROR,
"Could not add announcer channel for conference '%s' bridge\n", conference_name);
1906 ast_debug(1,
"Created conference '%s' and linked to container.\n", conference_name);
1912 user->conference = conference;
1928 user->suspended_moh = 1;
1949 user->u_profile.announcement)) {
1964 (conference->
activeusers >
user->u_profile.announce_user_count_all_after)) {
1974 if (user_count_res) {
2024 }
else if (say_number >= 0) {
2170 .
type =
"Confbridge async playback",
2206 if (async_datastore) {
2209 add = async_datastore->
data;
2216 if (!async_datastore) {
2221 if (!async_datastore->
data) {
2299 if (!async_datastore) {
2303 add = async_datastore->
data;
2385 if (!async_datastore) {
2389 add = async_datastore->
data;
2424 user->talking = talking;
2428 "talking_status", talking ?
"on" :
"off",
2430 if (!talking_extras) {
2441 char pin_guess[
MAX_PIN+1] = { 0, };
2442 const char *pin =
user->u_profile.pin;
2443 char *
tmp = pin_guess;
2453 for (i = 0; i < 3; i++) {
2457 if (!strcasecmp(pin, pin_guess)) {
2469 pin_guess[1] =
'\0';
2470 tmp = pin_guess + 1;
2500 snprintf(
user->name_rec_location,
sizeof(
user->name_rec_location),
2501 "%s/confbridge-name-%s-%s", destdir,
2507 user->name_rec_location,
2518 user->name_rec_location,
2527 user->name_rec_location[0] =
'\0';
2635 int res = 0, volume_adjustments[2];
2637 int async_delete_task_pushed = 0;
2639 const char *b_profile_name =
NULL;
2640 const char *u_profile_name =
NULL;
2641 const char *menu_profile_name =
NULL;
2647 .tech_args.drop_silence = 0,
2662 goto confbridge_cleanup;
2674 goto confbridge_cleanup;
2681 goto confbridge_cleanup;
2686 b_profile_name =
args.b_profile_name;
2690 ast_log(
LOG_WARNING,
"Conference bridge profile %s does not exist\n", b_profile_name ?
2693 goto confbridge_cleanup;
2698 u_profile_name =
args.u_profile_name;
2705 goto confbridge_cleanup;
2721 goto confbridge_cleanup;
2732 goto confbridge_cleanup;
2738 menu_profile_name =
args.menu_profile_name;
2743 ast_log(
LOG_WARNING,
"Conference menu profile %s does not exist\n", menu_profile_name ?
2746 goto confbridge_cleanup;
2751 user.features.dtmf_passthrough = 1;
2753 user.features.dtmf_passthrough = 0;
2758 user.features.text_messaging = 1;
2760 user.features.text_messaging = 0;
2764 if (
user.u_profile.talking_threshold) {
2765 user.tech_args.talking_threshold =
user.u_profile.talking_threshold;
2767 if (
user.u_profile.silence_threshold) {
2768 user.tech_args.silence_threshold =
user.u_profile.silence_threshold;
2777 goto confbridge_cleanup;
2785 goto confbridge_cleanup;
2793 user.tech_args.drop_silence = 1;
2834 if (
user.u_profile.timeout) {
2837 user.u_profile.timeout * 1000,
2849 join_hook_data =
ast_malloc(
sizeof(*join_hook_data));
2850 if (!join_hook_data) {
2852 goto confbridge_cleanup;
2862 goto confbridge_cleanup;
2865 leave_hook_data =
ast_malloc(
sizeof(*leave_hook_data));
2866 if (!leave_hook_data) {
2869 goto confbridge_cleanup;
2880 goto confbridge_cleanup;
2913 goto confbridge_cleanup;
2925 async_delete_task_pushed = 1;
2946 if (volume_adjustments[0]) {
2949 if (volume_adjustments[1]) {
2969 mute = !
user->muted;
2981 unsigned int binaural;
2994 const char *sound_to_play;
3006 cur_user->
muted = mute;
3051 const char *playback_file,
3052 const char *cur_dtmf,
3072 }
else if (
digit == -1) {
3094 dtmf[i] = cur_dtmf[i];
3112 &new_menu_entry, menu);
3128 ast_log(
LOG_WARNING,
"Only admin users can use the kick_last menu action. Channel %s of conf %s is not an admin.\n",
3145 }
else if (!last_user->
kicked) {
3165 args.no_hangup_chan = 1;
3207 int stop_prompts = 0;
3211 switch (menu_action->
id) {
3228 if (!stop_prompts) {
3231 "Message: %s\r\nChannel: %s",
3258 if (!(stop_prompts)) {
3330 const char *channel)
3335 int all = !strcasecmp(
"all", channel);
3336 int participants = !strcasecmp(
"participants", channel);
3381 int wordlen = strlen(
word);
3386 if (!strncasecmp(conference->
name,
word, wordlen) && ++which >
state) {
3404 int wordlen = strlen(
word);
3411 if (!strncasecmp(
"all",
word, wordlen) && ++which >
state) {
3415 if (!strncasecmp(
"participants",
word, wordlen) && ++which >
state) {
3445 e->
command =
"confbridge kick";
3447 "Usage: confbridge kick <conference> <channel>\n"
3448 " Kicks a channel out of the conference bridge.\n"
3449 " (all to kick everyone, participants to kick non-admins).\n";
3467 ast_cli(
a->fd,
"No conference bridge named '%s' found!\n",
a->argv[2]);
3473 if (!strcasecmp(
"all",
a->argv[3]) || !strcasecmp(
"participants",
a->argv[3])) {
3474 ast_cli(
a->fd,
"No participants found!\n");
3476 ast_cli(
a->fd,
"No participant named '%s' found!\n",
a->argv[3]);
3480 ast_cli(
a->fd,
"Kicked '%s' out of conference '%s'\n",
a->argv[3],
a->argv[2]);
3486 char flag_str[6 + 1];
3491 flag_str[pos++] =
'A';
3494 flag_str[pos++] =
'M';
3497 flag_str[pos++] =
'W';
3500 flag_str[pos++] =
'E';
3503 flag_str[pos++] =
'm';
3506 flag_str[pos++] =
'w';
3508 flag_str[pos] =
'\0';
3510 ast_cli(
a->fd,
"%-30s %-6s %-16s %-16s %-16s %s\n",
3513 user->u_profile.name,
3514 user->conference->b_profile.name,
3526 e->
command =
"confbridge list";
3528 "Usage: confbridge list [<name>]\n"
3529 " Lists all currently active conference bridges or a specific conference bridge.\n"
3531 " When a conference bridge name is provided, flags may be shown for users. Below\n"
3532 " are the flags and what they represent.\n"
3535 " A - The user is an admin\n"
3536 " M - The user is a marked user\n"
3537 " W - The user must wait for a marked user to join\n"
3538 " E - The user will be kicked after the last marked user leaves the conference\n"
3539 " m - The user is muted\n"
3540 " w - The user is waiting for a marked user to join\n";
3552 ast_cli(
a->fd,
"Conference Bridge Name Users Marked Locked Muted\n");
3553 ast_cli(
a->fd,
"================================ ====== ====== ====== =====\n");
3556 ast_cli(
a->fd,
"%-32s %6u %6u %-6s %s\n",
3573 ast_cli(
a->fd,
"No conference bridge named '%s' found!\n",
a->argv[2]);
3576 ast_cli(
a->fd,
"Channel Flags User Profile Bridge Profile Menu CallerID\n");
3577 ast_cli(
a->fd,
"============================== ====== ================ ================ ================ ================\n");
3625 const char *chan_name)
3629 int all = !strcasecmp(
"all", chan_name);
3630 int participants = !strcasecmp(
"participants", chan_name);
3675 ast_cli(
a->fd,
"No conference bridge named '%s' found!\n",
a->argv[2]);
3677 }
else if (res == -2) {
3678 if (!strcasecmp(
"all",
a->argv[3]) || !strcasecmp(
"participants",
a->argv[3])) {
3679 ast_cli(
a->fd,
"No participants found in conference %s\n",
a->argv[2]);
3681 ast_cli(
a->fd,
"No channel named '%s' found in conference %s\n",
a->argv[3],
a->argv[2]);
3685 ast_cli(
a->fd,
"%s %s from confbridge %s\n", mute ?
"Muting" :
"Unmuting",
a->argv[3],
a->argv[2]);
3693 e->
command =
"confbridge mute";
3695 "Usage: confbridge mute <conference> <channel>\n"
3696 " Mute a channel in a conference.\n"
3697 " (all to mute everyone, participants to mute non-admins)\n"
3698 " If the specified channel is a prefix,\n"
3699 " the action will be taken on the first\n"
3700 " matching channel.\n";
3724 e->
command =
"confbridge unmute";
3726 "Usage: confbridge unmute <conference> <channel>\n"
3727 " Unmute a channel in a conference.\n"
3728 " (all to unmute everyone, participants to unmute non-admins)\n"
3729 " If the specified channel is a prefix,\n"
3730 " the action will be taken on the first\n"
3731 " matching channel.\n";
3755 e->
command =
"confbridge lock";
3757 "Usage: confbridge lock <conference>\n"
3758 " Lock a conference. While locked, no new non-admins\n"
3759 " may join the conference.\n";
3771 ast_cli(
a->fd,
"Conference %s is not found\n",
a->argv[2]);
3773 ast_cli(
a->fd,
"Conference %s is locked.\n",
a->argv[2]);
3782 e->
command =
"confbridge unlock";
3784 "Usage: confbridge unlock <conference>\n"
3785 " Unlock a previously locked conference.\n";
3797 ast_cli(
a->fd,
"Conference %s is not found\n",
a->argv[2]);
3799 ast_cli(
a->fd,
"Conference %s is unlocked.\n",
a->argv[2]);
3806 const char *rec_file =
NULL;
3811 e->
command =
"confbridge record start";
3813 "Usage: confbridge record start <conference> <file>\n"
3814 " <file> is optional, Otherwise the bridge profile\n"
3815 " record file will be used. If the bridge profile\n"
3816 " has no record file specified, a file will automatically\n"
3817 " be generated in the monitor directory\n";
3829 rec_file =
a->argv[4];
3834 ast_cli(
a->fd,
"Conference not found.\n");
3839 ast_cli(
a->fd,
"Conference is already being recorded.\n");
3849 ast_cli(
a->fd,
"Could not start recording due to internal error.\n");
3856 ast_cli(
a->fd,
"Recording started\n");
3868 e->
command =
"confbridge record stop";
3870 "Usage: confbridge record stop <conference>\n"
3871 " Stop a previously started recording.\n";
3885 ast_cli(
a->fd,
"Conference not found.\n");
3891 ast_cli(
a->fd,
"Recording %sstopped.\n", ret ?
"could not be " :
"");
3907 .
name =
"CONFBRIDGE",
3913 .
name =
"CONFBRIDGE_INFO",
3919 char *parse, *outbuf;
3922 int bytes, count = 0;
3949 if (!strcasecmp(
args.type,
"parties")) {
3960 }
else if (!strcasecmp(
args.type,
"active")) {
3966 }
else if (!strcasecmp(
args.type,
"waiting")) {
3972 }
else if (!strcasecmp(
args.type,
"admins")) {
3980 }
else if (!strcasecmp(
args.type,
"marked")) {
3997 .
name =
"CONFBRIDGE_CHANNELS",
4018 "Event: ConfbridgeList\r\n"
4020 "Conference: %s\r\n"
4022 "MarkedUser: %s\r\n"
4023 "WaitMarked: %s\r\n"
4025 "EndMarkedAny: %s\r\n"
4029 "AnsweredTime: %d\r\n"
4062 snprintf(id_text,
sizeof(id_text),
"ActionID: %s\r\n", actionid);
4101 char id_text[512] =
"";
4105 snprintf(id_text,
sizeof(id_text),
"ActionID: %s\r\n", actionid);
4122 "Event: ConfbridgeListRooms\r\n"
4124 "Conference: %s\r\n"
4172 }
else if (res == -2) {
4245 astman_send_ack(s, m, !strcmp(
"all", channel) ?
"All participants kicked" :
"User kicked");
4406 if (!strcasecmp(
args.type,
"parties")) {
4413 }
else if (!strcasecmp(
args.type,
"admins")) {
4419 }
else if (!strcasecmp(
args.type,
"marked")) {
4425 }
else if (!strcasecmp(
args.type,
"locked")) {
4427 }
else if (!strcasecmp(
args.type,
"muted")) {
4432 snprintf(
buf,
len,
"%d", count);
4480 ast_debug(1,
"Kicked '%s' out of conference '%s'\n",
args.channel,
args.confbridge);
4685 .optional_modules =
"codec_speex,func_jitterbuffer",
static void playback_common(struct confbridge_conference *conference, const char *filename, int say_number)
int conf_handle_only_person(struct confbridge_user *user)
Handle actions whenever an user joins an empty conference.
static void playback_task_data_init(struct playback_task_data *ptd, struct confbridge_conference *conference, const char *filename, int say_number)
static char * handle_cli_confbridge_kick(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static int action_confbridgemute(struct mansession *s, const struct message *m)
static int push_announcer(struct confbridge_conference *conference)
Push the announcer channel into the bridge.
void conf_moh_stop(struct confbridge_user *user)
Stop MOH for the conference user.
static void send_conf_start_event(struct confbridge_conference *conference)
static struct ast_datastore_info async_datastore_info
Datastore used for timing of async announcement playback.
static int send_event_hook_callback(struct ast_bridge_channel *bridge_channel, void *data)
static int generic_lock_unlock_helper(int lock, const char *conference_name)
static int action_confbridgeunlock(struct mansession *s, const struct message *m)
static int join_callback(struct ast_bridge_channel *bridge_channel, void *ignore)
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.
static int action_confbridgekick(struct mansession *s, const struct message *m)
static int action_dialplan_exec(struct ast_bridge_channel *bridge_channel, struct conf_menu_action *menu_action)
static void hangup_data_init(struct hangup_data *hangup, struct confbridge_conference *conference)
static int register_channel_tech(struct ast_channel_tech *tech)
static void unregister_channel_tech(struct ast_channel_tech *tech)
static void conf_moh_unsuspend(struct confbridge_user *user)
static char * handle_cli_confbridge_mute(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static int action_confbridgesetsinglevideosrc(struct mansession *s, const struct message *m)
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.
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)
int conf_handle_inactive_waitmarked(struct confbridge_user *user)
Handle actions every time a waitmarked user joins w/o a marked user present.
static int action_confbridgeunmute(struct mansession *s, const struct message *m)
static int action_confbridgestoprecord(struct mansession *s, const struct message *m)
void confbridge_handle_atxfer(struct ast_attended_transfer_message *msg)
Create join/leave events for attended transfers.
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.
static struct ast_custom_function confbridge_function
static int is_new_rec_file(const char *rec_file, struct ast_str **orig_rec_file)
static void playback_task_data_destroy(struct playback_task_data *ptd)
static int action_playback(struct ast_bridge_channel *bridge_channel, const char *playback_file)
static int cli_mute_unmute_helper(int mute, struct ast_cli_args *a)
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.
static int action_toggle_mute(struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel)
static void send_join_event(struct confbridge_user *user, struct confbridge_conference *conference)
static char * handle_cli_confbridge_start_record(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static void send_stop_record_event(struct confbridge_conference *conference)
static struct async_datastore_data * async_datastore_data_alloc(void)
static int func_confbridge_info(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static void send_mute_event(struct confbridge_user *user, struct confbridge_conference *conference)
#define CONFERENCE_BRIDGE_BUCKETS
static void leave_conference(struct confbridge_user *user)
Leave a conference.
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.
static int conf_stop_record(struct confbridge_conference *conference)
static int action_confbridgelist(struct mansession *s, const struct message *m)
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.
static char * complete_confbridge_participant(const char *conference_name, const char *line, const char *word, int pos, int state)
static int func_confbridge_channels(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int conf_get_pin(struct ast_channel *chan, struct confbridge_user *user)
static int conf_rec_name(struct confbridge_user *user, const char *conf_name)
static void handle_video_on_join(struct confbridge_conference *conference, struct ast_channel *chan, int marked)
static int kick_conference_participant(struct confbridge_conference *conference, const char *channel)
void conf_ended(struct confbridge_conference *conference)
Callback to be called when the conference has become empty.
static int conference_bridge_cmp_cb(void *obj, void *arg, int flags)
Comparison function used for conference bridges container.
static int action_toggle_mute_participants(struct confbridge_conference *conference, struct confbridge_user *user)
static struct ast_custom_function confbridge_info_function
static void async_delete_name_rec_task_data_destroy(struct async_delete_name_rec_task_data *atd)
static struct confbridge_conference * join_conference_bridge(const char *conference_name, struct confbridge_user *user)
Join a conference bridge.
static char * complete_confbridge_name(const char *line, const char *word, int pos, int state)
int async_play_sound_file(struct confbridge_conference *conference, const char *filename, struct ast_channel *initiator)
Play sound file into conference bridge asynchronously.
static int play_sound_number(struct confbridge_conference *conference, int say_number)
Play number into the conference bridge.
int play_sound_file(struct confbridge_conference *conference, const char *filename)
Play sound file into conference bridge.
static void async_datastore_data_destroy(void *data)
static int confbridge_exec(struct ast_channel *chan, const char *data)
The ConfBridge application.
static int conf_start_record(struct confbridge_conference *conference)
static char * handle_cli_confbridge_unlock(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static void send_leave_event(struct confbridge_user *user, struct confbridge_conference *conference)
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.
static void async_playback_task_data_destroy(struct async_playback_task_data *aptd)
static int play_sound_helper(struct confbridge_conference *conference, const char *filename, int say_number)
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...
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)
static void conf_moh_suspend(struct confbridge_user *user)
static int action_mute_unmute_helper(struct mansession *s, const struct message *m, int mute)
static int playback_task(void *data)
Play an announcement into a confbridge.
void conf_update_user_mute(struct confbridge_user *user)
Update the actual mute status of the user and set it on the 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.
static void destroy_conference_bridge(void *obj)
Destroy a conference bridge.
static int async_delete_name_rec(struct confbridge_conference *conference, const char *filename)
static int user_timeout(struct ast_bridge_channel *bridge_channel, void *ignore)
static int action_kick_last(struct confbridge_conference *conference, struct ast_bridge_channel *bridge_channel, struct confbridge_user *user)
static int action_toggle_binaural(struct confbridge_conference *conference, struct confbridge_user *user, struct ast_bridge_channel *bridge_channel)
static int async_delete_name_rec_task(void *data)
Delete user's name file asynchronously.
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.
static void send_unmute_event(struct confbridge_user *user, struct confbridge_conference *conference)
static int action_confbridgestartrecord(struct mansession *s, const struct message *m)
static int action_lock_unlock_helper(struct mansession *s, const struct message *m, int lock)
static int conference_bridge_hash_cb(const void *obj, const int flags)
Hashing function used for conference bridges container.
static int action_confbridgelistrooms(struct mansession *s, const struct message *m)
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.
struct ao2_container * conference_bridges
Container to hold all conference bridges in progress.
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...
static int async_play_sound_helper(struct confbridge_conference *conference, const char *filename, int say_number, struct ast_channel *initiator)
static void generic_mute_unmute_user(struct confbridge_conference *conference, struct confbridge_user *user, int mute)
struct confbridge_conference * conf_find_bridge(const char *conference_name)
Find a confbridge by name.
static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)
void conf_handle_first_join(struct confbridge_conference *conference)
Callback to execute any time we transition from zero to one active users.
static char * handle_cli_confbridge_unmute(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
void conf_moh_start(struct confbridge_user *user)
Start MOH for the conference user.
static int load_module(void)
Load the module.
static void handle_video_on_exit(struct confbridge_conference *conference, struct ast_channel *chan)
static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new)
static int play_file(struct ast_bridge_channel *bridge_channel, struct ast_channel *channel, const char *filename)
Playback the given filename and monitor for any dtmf interrupts.
static int generic_mute_unmute_helper(int mute, const char *conference_name, const char *chan_name)
static void hangup_data_destroy(struct hangup_data *hangup)
static int hangup_playback(void *data)
Hang up the announcer channel.
static int unload_module(void)
Called when module is being unloaded.
static int action_confbridgelock(struct mansession *s, const struct message *m)
static int conf_is_recording(struct confbridge_conference *conference)
static struct ast_custom_function confbridge_channels_function
static int play_prompt_to_user(struct confbridge_user *user, const char *filename)
Play back an audio file to a channel.
static int sound_file_exists(const char *filename)
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)
static int action_confbridgelist_item(struct mansession *s, const char *id_text, struct confbridge_conference *conference, struct confbridge_user *user, int waiting)
#define RECORD_FILENAME_INITIAL_SPACE
static int alloc_playback_chan(struct confbridge_conference *conference)
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.
void async_play_sound_ready(struct ast_channel *chan)
Indicate the initiator of an async sound file is ready for it to play.
static int setup_async_playback_datastore(struct ast_channel *initiator)
Prepare the async playback datastore.
static char * handle_cli_confbridge_lock(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static struct async_delete_name_rec_task_data * async_delete_name_rec_task_data_alloc(struct confbridge_conference *conference, const char *filename)
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)
static void send_start_record_event(struct confbridge_conference *conference)
static int async_playback_task(void *data)
Play an announcement into a confbridge asynchronously.
static void handle_cli_confbridge_list_item(struct ast_cli_args *a, struct confbridge_user *user, int waiting)
static struct ast_cli_entry cli_confbridge[]
void conf_handle_second_active(struct confbridge_conference *conference)
Handle when a conference moves to having more than one active participant.
static void confbridge_unlock_and_unref(void *obj)
static void send_conf_end_event(struct confbridge_conference *conference)
static void wait_for_initiator(struct ast_channel *initiator)
Wait for the initiator of an async playback to be ready.
static char * handle_cli_confbridge_list(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
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)
static int confkick_exec(struct ast_channel *chan, const char *data)
static char * handle_cli_confbridge_stop_record(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Asterisk main include file. File version handling, generic pbx functions.
int ast_shutting_down(void)
#define ast_strdup(str)
A wrapper for strdup()
#define ast_strdupa(s)
duplicate a string in memory from the stack
void ast_free_ptr(void *ptr)
free() wrapper
#define ast_calloc(num, len)
A wrapper for calloc()
#define ast_malloc(len)
A wrapper for malloc()
#define ao2_iterator_next(iter)
#define ao2_link(container, obj)
Add an object to a container.
@ AO2_ALLOC_OPT_LOCK_MUTEX
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
#define ao2_unlink(container, obj)
Remove an object from a container.
#define ao2_find(container, arg, flags)
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
@ OBJ_SEARCH_KEY
The arg parameter is a search key, but is not an object.
#define ao2_alloc(data_size, destructor_fn)
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
Allocate and initialize a hash container with the desired number of buckets.
@ AST_AUDIOHOOK_DIRECTION_READ
@ AST_AUDIOHOOK_DIRECTION_WRITE
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 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.
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.
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.
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 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.
#define ast_bridge_unlock(bridge)
Unlock the bridge.
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)
void ast_bridge_set_binaural_active(struct ast_bridge *bridge, unsigned int binaural_active)
Activates the use of binaural signals in a conference bridge.
@ AST_BRIDGE_VIDEO_SFU_REMB_LOWEST
@ AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST_ALL
@ AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE
@ AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST
@ AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE_ALL
@ AST_BRIDGE_VIDEO_SFU_REMB_FORCE
@ AST_BRIDGE_VIDEO_SFU_REMB_LOWEST_ALL
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
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.
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.
int ast_bridge_destroy(struct ast_bridge *bridge, int cause)
Destroy a bridge.
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.
int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan)
Remove a channel from a bridge.
@ AST_BRIDGE_CAPABILITY_MULTIMIX
int ast_bridge_suspend(struct ast_bridge *bridge, struct ast_channel *chan)
Suspend a channel temporarily from a bridge.
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.
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_bridge_remove_video_src(struct ast_bridge *bridge, struct ast_channel *chan)
remove a channel as a source of video for the bridge.
int ast_bridge_unsuspend(struct ast_bridge *bridge, struct ast_channel *chan)
Unsuspend a channel from a bridge.
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.
#define ast_bridge_lock(bridge)
Lock the bridge.
@ AST_BRIDGE_IMPART_CHAN_INDEPENDENT
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.
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.
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.
void ast_bridge_channel_feature_digit_add(struct ast_bridge_channel *bridge_channel, int digit)
Add a DTMF digit to the collected digits.
void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
Lock the bridge associated with the bridge channel.
@ BRIDGE_CHANNEL_STATE_END
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).
@ AST_BRIDGE_HOOK_TYPE_JOIN
@ AST_BRIDGE_HOOK_TYPE_LEAVE
int ast_bridge_features_init(struct ast_bridge_features *features)
Initialize bridge features structure.
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.
@ AST_BRIDGE_HOOK_REMOVE_ON_PULL
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.
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)
Attach a bridge channel join hook to a bridge features structure.
struct ast_bridge_features * ast_bridge_features_new(void)
Allocate a new bridge features struct.
@ AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY
@ AST_BRIDGE_FLAG_MASQUERADE_ONLY
#define MAXIMUM_DTMF_FEATURE_STRING
Maximum length of a DTMF feature string.
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.
void ast_bridge_features_cleanup(struct ast_bridge_features *features)
Clean up the contents of a bridge features structure.
void ast_bridge_features_destroy(struct ast_bridge_features *features)
Destroy an allocated bridge features struct.
@ AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE
static int match(struct ast_sockaddr *addr, unsigned short callno, unsigned short dcallno, const struct chan_iax2_pvt *cur, int check_dcallno)
static int hangup(void *data)
General Asterisk PBX channel definitions.
void ast_channel_exten_set(struct ast_channel *chan, const char *value)
const char * ast_channel_name(const struct ast_channel *chan)
int ast_autoservice_stop(struct ast_channel *chan)
Stop servicing a channel for us...
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
struct stasis_topic * ast_channel_topic(struct ast_channel *chan)
A topic which publishes the events for a particular channel.
#define ast_channel_lock(chan)
void ast_channel_unregister(const struct ast_channel_tech *tech)
Unregister a channel technology.
int ast_channel_priority(const struct ast_channel *chan)
#define ast_channel_ref(c)
Increase channel reference count.
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
const char * ast_channel_uniqueid(const struct ast_channel *chan)
const char * ast_channel_context(const struct ast_channel *chan)
int ast_autoservice_start(struct ast_channel *chan)
Automatically service a channel for us...
int ast_check_hangup(struct ast_channel *chan)
Check to see if a channel is needing hang up.
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 ...
#define ast_channel_unref(c)
Decrease channel reference count.
int ast_channel_get_up_time(struct ast_channel *chan)
Obtain how long it has been since the channel was answered.
const char * ast_channel_language(const struct ast_channel *chan)
void ast_channel_context_set(struct ast_channel *chan, const char *value)
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
void ast_channel_priority_set(struct ast_channel *chan, int value)
#define ast_channel_cleanup(c)
Cleanup a channel reference.
int ast_answer(struct ast_channel *chan)
Answer a channel.
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.
const char * ast_channel_exten(const struct ast_channel *chan)
#define ast_channel_unlock(chan)
void ast_channel_pbx_set(struct ast_channel *chan, struct ast_pbx *value)
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.
ast_channel_state
ast_channel states
Standard Command Line Interface.
#define AST_CLI_YESNO(x)
Return Yes or No depending on the argument.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define AST_CLI_DEFINE(fn, txt,...)
void ast_cli(int fd, const char *fmt,...)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
struct ast_channel_tech * conf_announce_get_tech(void)
Get ConfBridge announce channel technology struct.
int conf_announce_channel_push(struct ast_channel *ast)
Push the announcer channel into the conference.
struct ast_channel_tech * conf_record_get_tech(void)
Get ConfBridge record channel technology struct.
int func_confbridge_helper(struct ast_channel *chan, const char *cmd, char *data, const char *value)
int conf_reload_config(void)
reload confbridge.conf file
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_bridge_profile_destroy(struct bridge_profile *b_profile)
Destroy a bridge profile found by 'conf_find_bridge_profile'.
int conf_load_config(void)
load confbridge.conf file
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.
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.
void conf_bridge_profile_copy(struct bridge_profile *dst, struct bridge_profile *src)
copies a bridge profile
void conf_destroy_config(void)
destroy the information loaded from the confbridge.conf file
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.
void conf_menu_entry_destroy(struct conf_menu_entry *menu_entry)
Destroys and frees all the actions stored in a menu_entry structure.
void conf_invalid_event_fn(struct confbridge_user *user)
A handler for join/leave events that are invalid in a particular state.
void(* conference_event_fn)(struct confbridge_user *user)
struct confbridge_state * CONF_STATE_EMPTY
Conference state with no active or waiting users.
struct stasis_message_type * confbridge_mute_type(void)
get the confbridge mute stasis message type
#define DEFAULT_SILENCE_THRESHOLD
struct stasis_message_type * confbridge_talking_type(void)
get the confbridge talking stasis message type
struct stasis_message_type * confbridge_stop_record_type(void)
get the confbridge stop_record stasis message type
@ USER_OPT_ANNOUNCEUSERCOUNTALL
@ USER_OPT_HEAR_OWN_JOIN_SOUND
@ USER_OPT_TEXT_MESSAGING
@ USER_OPT_ANNOUNCEUSERCOUNT
@ USER_OPT_ANSWER_CHANNEL
@ USER_OPT_ANNOUNCE_JOIN_LEAVE
@ USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW
struct stasis_message_type * confbridge_end_type(void)
get the confbridge end stasis message type
@ CONF_SOUND_OTHER_IN_PARTY
@ CONF_SOUND_PARTICIPANTS_UNMUTED
@ CONF_SOUND_PARTICIPANTS_MUTED
@ CONF_SOUND_WAIT_FOR_LEADER
@ CONF_SOUND_BINAURAL_OFF
@ CONF_SOUND_LEADER_HAS_LEFT
@ CONF_SOUND_PLACE_IN_CONF
@ CONF_SOUND_UNLOCKED_NOW
struct stasis_message_type * confbridge_start_type(void)
get the confbridge start stasis message type
#define DEFAULT_TALKING_THRESHOLD
#define DEFAULT_MENU_PROFILE
struct stasis_message_type * confbridge_start_record_type(void)
get the confbridge start_record stasis message type
#define DEFAULT_BRIDGE_PROFILE
#define DEFAULT_USER_PROFILE
struct stasis_message_type * confbridge_unmute_type(void)
get the confbridge unmute stasis message type
struct stasis_message_type * confbridge_join_type(void)
get the confbridge join stasis message type
@ BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE
@ BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL
@ BRIDGE_OPT_REMB_BEHAVIOR_LOWEST
@ BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
@ BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
@ BRIDGE_OPT_VIDEO_SRC_SFU
@ BRIDGE_OPT_BINAURAL_ACTIVE
@ BRIDGE_OPT_RECORD_CONFERENCE
@ BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL
@ BRIDGE_OPT_RECORD_FILE_TIMESTAMP
@ BRIDGE_OPT_ENABLE_EVENTS
@ BRIDGE_OPT_REMB_BEHAVIOR_FORCE
@ BRIDGE_OPT_RECORD_FILE_APPEND
@ BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL
@ BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST
@ BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
struct stasis_message_type * confbridge_leave_type(void)
get the confbridge leave stasis message type
@ MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC
@ MENU_ACTION_SET_SINGLE_VIDEO_SRC
@ MENU_ACTION_ADMIN_KICK_LAST
@ MENU_ACTION_TOGGLE_BINAURAL
@ MENU_ACTION_RESET_LISTENING
@ MENU_ACTION_INCREASE_TALKING
@ MENU_ACTION_ADMIN_TOGGLE_MUTE_PARTICIPANTS
@ MENU_ACTION_INCREASE_LISTENING
@ MENU_ACTION_DIALPLAN_EXEC
@ MENU_ACTION_DECREASE_LISTENING
@ MENU_ACTION_PLAYBACK_AND_CONTINUE
@ MENU_ACTION_ADMIN_TOGGLE_LOCK
@ MENU_ACTION_DECREASE_TALKING
@ MENU_ACTION_PARTICIPANT_COUNT
@ MENU_ACTION_TOGGLE_MUTE
@ MENU_ACTION_RESET_TALKING
int manager_confbridge_init(void)
register stasis message routers to handle manager events for confbridge messages
void conf_send_event_to_participants(struct confbridge_conference *conference, struct ast_channel *chan, struct stasis_message *msg)
Send events to bridge participants.
void manager_confbridge_shutdown(void)
unregister stasis message routers to handle manager events for confbridge messages
#define ast_datastore_alloc(info, uid)
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
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.
int ast_dsp_get_threshold_from_settings(enum threshold which)
Get silence threshold from dsp.conf.
Generic File Format Support. Should be included by clients of the file handling routines....
int ast_stopstream(struct ast_channel *c)
Stops a stream.
int ast_streamfile(struct ast_channel *c, const char *filename, const char *preflang)
Streams a file.
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.
int ast_fileexists(const char *filename, const char *fmt, const char *preflang)
Checks for the existence of a given file.
int ast_filedelete(const char *filename, const char *fmt)
Deletes a file.
int ast_waitstream(struct ast_channel *c, const char *breakon)
Waits for a stream to stop or digit to be pressed.
static int set(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
Send ack in manager transaction to begin a list.
void astman_send_error(struct mansession *s, const struct message *m, char *error)
Send error in manager transaction.
void astman_send_list_complete_start(struct mansession *s, const struct message *m, const char *event_name, int count)
Start the list complete event.
void astman_send_ack(struct mansession *s, const struct message *m, char *msg)
Send ack in manager transaction.
const char * astman_get_header(const struct message *m, char *var)
Get header from manager transaction.
void astman_send_list_complete_end(struct mansession *s)
End the list complete event.
void astman_append(struct mansession *s, const char *fmt,...)
int ast_manager_unregister(const char *action)
Unregister a registered manager command.
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,...
#define AST_APP_ARG(name)
Define an application argument.
enum ast_getdata_result 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.
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...
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
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.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
#define ast_debug(level,...)
Log a DEBUG message.
Asterisk JSON abstraction layer.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
int ast_json_object_update(struct ast_json *object, struct ast_json *other)
Update object with all of the fields of other.
#define AST_LIST_LAST(head)
Returns the last entry contained in a list.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_LIST_REMOVE(head, elm, field)
Removes a specific entry from a list.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
Asterisk locking-related definitions:
#define ast_cond_destroy(cond)
#define SCOPED_AO2LOCK(varname, obj)
scoped lock specialization for ao2 mutexes.
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
#define ast_mutex_init(pmutex)
#define ast_mutex_unlock(a)
pthread_cond_t ast_cond_t
#define ast_mutex_destroy(a)
#define ast_mutex_lock(a)
#define ast_cond_signal(cond)
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
#define EVENT_FLAG_REPORTING
struct ast_str * ast_manager_build_channel_state_string(const struct ast_channel_snapshot *snapshot)
Generate the AMI message body from a channel snapshot.
#define EVENT_FLAG_SYSTEM
#define ast_manager_register_xml(action, authority, func)
Register a manager callback using XML documentation to describe the manager.
Out-of-call text message support.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODPRI_DEVSTATE_PROVIDER
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
int ast_unregister_application(const char *app)
Unregister an application.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass)
Turn on music on hold on a given channel.
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
def ignore(key=None, val=None, section=None, pjsip=None, nmapped=None, type='endpoint')
Asterisk file paths, configured in asterisk.conf.
const char * ast_config_AST_SPOOL_DIR
Core PBX routines and definitions.
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.
enum ast_pbx_result ast_pbx_run_args(struct ast_channel *c, struct ast_pbx_args *args)
Execute the PBX in the current thread.
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
int pbx_exec(struct ast_channel *c, struct ast_app *app, const char *data)
Execute an application.
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.
int ast_context_remove_extension(const char *context, const char *extension, int priority, const char *registrar)
Simply remove extension from context.
#define ast_custom_function_register_escalating(acf, escalation)
Register a custom function which requires escalated privileges.
#define ast_custom_function_register(acf)
Register a custom function.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
struct ast_app * pbx_findapp(const char *app)
Look up an application.
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)
int ast_func_write(struct ast_channel *chan, const char *function, const char *value)
executes a write operation on a function
Say numbers and dates (maybe words one day too)
int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says a number
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
void stasis_publish(struct stasis_topic *topic, struct stasis_message *message)
Publish a message to a topic's subscribers.
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 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.
struct stasis_topic * ast_bridge_topic(struct ast_bridge *bridge)
A topic which publishes the events for a particular bridge.
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_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one.
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
static force_inline int attribute_pure ast_strlen_zero(const char *s)
void ast_str_reset(struct ast_str *buf)
Reset the content of a dynamic string. Useful before a series of ast_str_append.
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
static force_inline int attribute_pure ast_str_case_hash(const char *str)
Compute a hash value on a case-insensitive string.
#define AST_YESNO(x)
return Yes or No depending on the argument.
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.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
char * ast_strsep(char **s, const char sep, uint32_t flags)
Act like strsep but ignore separators inside quotes.
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
ast_app: A registered application
Message representing attended transfer.
struct ast_bridge_channel_snapshot_pair to_transfer_target
struct ast_channel_snapshot * transferee
struct ast_bridge_channel_snapshot_pair to_transferee
struct ast_channel_snapshot * target
struct ast_channel_snapshot * channel_snapshot
Structure that contains information regarding a channel in a bridge.
struct ast_bridge * bridge
Bridge this channel is participating in.
unsigned int binaural_suspended
struct ast_channel * chan
Structure that contains features information.
struct ast_flags feature_flags
Structure that contains a snapshot of information about a bridge.
const ast_string_field name
const ast_string_field data
const ast_string_field appl
Structure representing a snapshot of channel state.
struct ast_channel_snapshot_dialplan * dialplan
struct ast_channel_snapshot_base * base
Structure to describe a channel "technology", ie a channel driver See for examples:
struct ast_format_cap * capabilities
const char *const description
Main Channel structure associated with a channel.
struct ast_bridge_channel * bridge_channel
descriptor for a cli entry.
Data structure associated with a custom dialplan function.
Structure for a data store type.
Structure for a data store object.
Data structure associated with a single frame of data.
Abstract JSON element (object, array, string, int, ...).
Structure for mutex and tracking information.
struct ast_party_id id
Caller party ID.
struct ast_party_number number
Subscriber phone number.
unsigned char valid
TRUE if the number information is valid/present.
char * str
Subscriber phone number (Malloced)
Options for ast_pbx_run()
Support for dynamic strings.
struct confbridge_conference * conference
struct confbridge_conference * conference
struct ast_channel * initiator
const ast_string_field waitforleader
const ast_string_field invalidpin
const ast_string_field placeintoconf
const ast_string_field onlyone
const ast_string_field otherinparty
const ast_string_field unlockednow
const ast_string_field binauralon
const ast_string_field getpin
const ast_string_field errormenu
const ast_string_field participantsunmuted
const ast_string_field participantsmuted
const ast_string_field leave
const ast_string_field locked
const ast_string_field join
const ast_string_field kicked
const ast_string_field hasleft
const ast_string_field unmuted
const ast_string_field leaderhasleft
const ast_string_field lockednow
const ast_string_field hasjoin
const ast_string_field binauraloff
const ast_string_field onlyperson
const ast_string_field thereare
const ast_string_field muted
const ast_string_field begin
unsigned int remb_send_interval
unsigned int maximum_sample_rate
unsigned int remb_estimated_bitrate
char regcontext[AST_MAX_CONTEXT]
unsigned int mix_interval
unsigned int video_update_discard
unsigned int internal_sample_rate
char language[MAX_LANGUAGE]
char name[MAX_PROFILE_NAME]
struct bridge_profile_sounds * sounds
The structure that represents a conference bridge.
struct confbridge_state * state
struct ast_str * orig_rec_file
struct ast_str * record_filename
struct ast_bridge * bridge
struct ast_channel * playback_chan
unsigned int waitingusers
struct ast_taskprocessor * playback_queue
struct bridge_profile b_profile
struct confbridge_conference::@94 active_list
struct ast_channel * record_chan
struct confbridge_conference::@95 waiting_list
struct confbridge_conference * conference
struct confbridge_user * user
enum ast_bridge_hook_type hook_type
The structure that represents a conference bridge user.
struct confbridge_conference * conference
struct confbridge_user::@98 list
struct ast_channel * chan
struct user_profile u_profile
struct confbridge_conference * conference
In case you didn't read that giant block of text above the mansession_session struct,...
struct confbridge_conference * conference
int(* func)(struct confbridge_user *user)
struct post_join_action::@96 list
structure to hold users read from users.conf
An API for managing task processing threads that can be shared across modules.
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.
void * ast_taskprocessor_unreference(struct ast_taskprocessor *tps)
Unreference the specified taskprocessor and its reference count will decrement.
@ TPS_REF_DEFAULT
return a reference to a taskprocessor, create one if it does not exist
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.
void ast_taskprocessor_build_name(char *buf, unsigned int size, const char *format,...)
Build a taskprocessor name with a sequence number on the end.
#define AST_TASKPROCESSOR_MAX_NAME
Suggested maximum taskprocessor name length (less null terminator).
#define ast_test_suite_event_notify(s, f,...)
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)
#define ast_test_flag(p, flag)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
int ast_mkdir(const char *path, int mode)
Recursively create directory path.
#define ast_set_flag(p, flag)