Asterisk - The Open Source Telephony Project
18.5.0
|
Mute Daemon. More...
#include "asterisk/autoconfig.h"
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Go to the source code of this file.
Data Structures | |
struct | channel |
struct | subchannel |
Macros | |
#define | ast_strlen_zero(a) (!(*(a))) |
Functions | |
static void | add_channel (char *tech, char *location) |
static void | append_sub (struct channel *chan, char *name) |
static void | check_mute (void) |
static int | connect_asterisk (void) |
static void | delete_sub (struct channel *chan, char *name) |
static struct channel * | find_channel (char *channel) |
static char * | get_line (void) |
static int | getvol (void) |
static void | hangup_chan (char *channel) |
static int | load_config (void) |
static int | login_asterisk (void) |
int | main (int argc, char *argv[]) |
static void | mute (void) |
static int | mutedlevel (int orig, int level) |
static void | offhook_chan (char *channel) |
static int | open_mixer (void) |
static int | setvol (int vol) |
static void | unmute (void) |
static void | usage (void) |
static int | wait_event (void) |
Variables | |
static FILE * | astf |
static struct channel * | channels |
static char * | config = "/etc/asterisk/muted.conf" |
static int | debug = 0 |
static char | host [256] = "" |
static int | mixchan = SOUND_MIXER_VOLUME |
static int | mixfd |
static int | muted = 0 |
static int | mutelevel = 20 |
static int | mutevol = 0 |
static int | needfork = 1 |
static int | oldvol = 0 |
static char | pass [256] = "" |
static int | smoothfade = 0 |
static int | stepsize = 3 |
static char | user [256] = "" |
Mute Daemon.
Updated for Mac OSX CoreAudio
Definition in file muted.c.
|
static |
Definition at line 102 of file muted.c.
References channels, free(), channel::location, malloc(), channel::next, strdup, and channel::tech.
Referenced by load_config().
|
static |
Definition at line 585 of file muted.c.
References free(), malloc(), subchannel::name, subchannel::next, strdup, sub, and channel::subs.
Referenced by offhook_chan().
|
static |
Definition at line 547 of file muted.c.
References channels, mute(), muted, channel::next, channel::subs, and unmute().
Referenced by hangup_chan(), and offhook_chan().
|
static |
|
static |
Definition at line 565 of file muted.c.
References free(), subchannel::name, subchannel::next, NULL, sub, and channel::subs.
Referenced by hangup_chan().
|
static |
Definition at line 326 of file muted.c.
References channels, debug, channel::location, channel::next, NULL, channel::tech, and tmp().
Referenced by hangup_chan(), and offhook_chan().
|
static |
Definition at line 269 of file muted.c.
References astf, buf, and NULL.
Referenced by login_asterisk(), and wait_event().
|
static |
Definition at line 357 of file muted.c.
References channels, errno, mixchan, mixfd, and NULL.
Referenced by mute(), and unmute().
|
static |
Definition at line 606 of file muted.c.
References check_mute(), debug, delete_sub(), and find_channel().
Referenced by wait_event().
|
static |
Definition at line 123 of file muted.c.
References add_channel(), buf, channels, config, errno, host, mutelevel, pass, and smoothfade.
Referenced by main().
|
static |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 687 of file muted.c.
References astf, connect_asterisk(), debug, errno, load_config(), login_asterisk(), mixfd, needfork, NULL, open_mixer(), usage(), and wait_event().
|
static |
Definition at line 468 of file muted.c.
References debug, getvol(), muted, mutedlevel(), mutelevel, setvol(), smoothfade, and stepsize.
Referenced by check_mute().
|
static |
|
static |
Definition at line 617 of file muted.c.
References append_sub(), check_mute(), debug, and find_channel().
Referenced by wait_event().
|
static |
Definition at line 400 of file muted.c.
References channels, errno, mixchan, mixfd, and NULL.
Referenced by mute(), and unmute().
|
static |
Definition at line 506 of file muted.c.
References debug, getvol(), muted, mutedlevel(), mutelevel, setvol(), smoothfade, and stepsize.
Referenced by check_mute().
|
static |
|
static |
Definition at line 628 of file muted.c.
References get_line(), hangup_chan(), and offhook_chan().
Referenced by main().
|
static |
Definition at line 209 of file muted.c.
Referenced by connect_asterisk(), get_line(), login_asterisk(), and main().
|
static |
Referenced by add_channel(), check_mute(), find_channel(), getvol(), load_config(), and setvol().
|
static |
Definition at line 75 of file muted.c.
Referenced by load_config().
|
static |
Definition at line 84 of file muted.c.
Referenced by find_channel(), hangup_chan(), main(), mute(), offhook_chan(), and unmute().
|
static |
Definition at line 77 of file muted.c.
Referenced by __find_callno(), app_exec(), apply_negotiated_sdp_stream(), ast_ari_channels_external_media(), ast_ari_get_docs(), ast_get_ip_or_srv(), ast_gethostbyname(), ast_sip_get_transport_name(), ast_sip_validate_uri_length(), ast_sockaddr_parse(), ast_sockaddr_resolve(), ast_sockaddr_stringify_fmt(), ast_sockaddr_stringify_port(), AST_TEST_DEFINE(), authenticate_verify(), build_callid_pvt(), build_callid_registry(), change_outgoing_sdp_stream_media_address(), connect_asterisk(), create_addr(), dns_srv_alloc(), extract_contact_addr(), festival_exec(), handle_cli_iax2_show_registry(), handle_identify(), iax2_request(), insert_user_in_contact_uri(), launch_ha_netscript(), launch_netscript(), load_config(), load_pktccops_config(), make_email_file(), manager_iax2_show_registry(), negotiate_incoming_sdp_stream(), osp_lookup(), parse_config(), parse_moved_contact(), peer_set_srcaddr(), pjsip_enable_logger_host(), process_sdp(), process_sdp_c(), reload_config(), security_event_populate(), sendmail(), sendpage(), session_outgoing_nat_hook(), set_config(), sip_devicestate(), sip_parse_register_line(), sip_request_call(), sip_resolve(), sip_sanitized_host(), sip_show_mwi(), sip_show_registry(), srv_datastore_setup(), srv_result_read(), unicast_rtp_request(), and wizard_apply_handler().
|
static |
|
static |
|
static |
Definition at line 82 of file muted.c.
Referenced by __ast_play_and_record(), bridge_template_handler(), check_mute(), dahdi_confmute(), mute(), my_wink(), set_sound(), and unmute().
|
static |
Definition at line 81 of file muted.c.
Referenced by load_config(), mute(), and unmute().
|
static |
Definition at line 79 of file muted.c.
Referenced by load_config(), and login_asterisk().
|
static |
Definition at line 80 of file muted.c.
Referenced by load_config(), mute(), and unmute().