348 #define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0 350 static const char *
const app =
"MixMonitor";
352 static const char *
const stop_app =
"StopMixMonitor";
443 struct mixmonitor_ds {
469 unsigned char quitting = 0;
471 if (mixmonitor_ds->
fs) {
475 ast_verb(2,
"MixMonitor close filestream (mixed)\n");
482 ast_verb(2,
"MixMonitor close filestream (read)\n");
489 ast_verb(2,
"MixMonitor close filestream (write)\n");
499 struct mixmonitor_ds *mixmonitor_ds = data;
511 .
type =
"mixmonitor",
551 int elements_processed = 0;
554 ast_debug(3,
"attempting to add next element %d from %s\n", elements_processed, cur_mailbox);
555 if ((next = strchr(cur_mailbox,
',')) || (next = strchr(cur_mailbox,
'&'))) {
559 if ((cur_folder = strchr(cur_mailbox,
'/'))) {
560 *(cur_folder++) =
'\0';
562 cur_folder =
"INBOX";
565 if ((cur_context = strchr(cur_mailbox,
'@'))) {
566 *(cur_context++) =
'\0';
568 cur_context =
"default";
573 if (!(recipient =
ast_malloc(
sizeof(*recipient)))) {
585 ast_log(
LOG_ERROR,
"Failed to properly parse extension and/or context from element %d of recipient string: %s\n", elements_processed, vm_recipients);
589 elements_processed++;
602 #define SAMPLES_PER_FRAME 160 640 ast_log(
LOG_ERROR,
"Failed to string_field_init, skipping copy_to_voicemail\n");
661 ast_verb(4,
"MixMonitor attempting to send voicemail copy to %s@%s\n", recording_data.
mailbox,
673 char *last_slash =
NULL;
676 *oflags = O_CREAT | O_WRONLY;
679 last_slash = strrchr(filename,
'/');
681 if ((*ext = strrchr(filename,
'.')) && (*ext > last_slash)) {
713 char *fs_read_ext =
"";
714 char *fs_write_ext =
"";
729 ast_verb(2,
"Begin MixMonitor Recording %s\n", mixmonitor->
name);
752 &fr_read, &fr_write))) {
770 if ((*fs_read) && (fr_read)) {
778 if ((*fs_write) && (fr_write)) {
839 ast_verb(2,
"End MixMonitor Recording %s\n", mixmonitor->
name);
844 ast_log(
LOG_ERROR,
"No file extension set for Mixmonitor %s. Skipping copy to voicemail.\n",
847 ast_verb(3,
"Copying recordings for Mixmonitor %s to voicemail recipients\n", mixmonitor->
name);
851 ast_verb(3,
"Copying read recording for Mixmonitor %s to voicemail recipients\n", mixmonitor->
name);
855 ast_verb(3,
"Copying write recording for Mixmonitor %s to voicemail recipients\n", mixmonitor->
name);
859 ast_debug(3,
"No recipients to forward monitor to, moving on.\n");
871 struct mixmonitor_ds *mixmonitor_ds;
873 if (!(mixmonitor_ds =
ast_calloc(1,
sizeof(*mixmonitor_ds)))) {
877 if (
ast_asprintf(datastore_id,
"%p", mixmonitor_ds) == -1) {
905 datastore->
data = mixmonitor_ds;
934 unsigned int flags,
int readvol,
int writevol,
935 const char *post_process,
const char *filename_write,
936 char *filename_read,
const char *uid_channel_var,
937 const char *recipients,
const char *beep_id)
941 char postprocess2[1024] =
"";
942 char *datastore_id =
NULL;
950 for (p2 = p1; *p2; p2++) {
951 if (*p2 ==
'^' && *(p2+1) ==
'{') {
961 if (!(mixmonitor =
ast_calloc(1,
sizeof(*mixmonitor)))) {
1089 if (*filename !=
'/') {
1100 ext = strrchr(buffer,
'.');
1101 if (ext && !strcmp(ext,
".wav49")) {
1104 memcpy(ext,
".WAV",
sizeof(
".WAV"));
1107 if ((slash = strrchr(filename,
'/'))) {
1117 int x, readvol = 0, writevol = 0;
1118 char *filename_read =
NULL;
1119 char *filename_write =
NULL;
1120 char filename_buffer[1024] =
"";
1121 char *uid_channel_var =
NULL;
1122 char beep_id[64] =
"";
1125 char *recipients =
NULL;
1135 ast_log(
LOG_WARNING,
"MixMonitor requires an argument (filename or ,t(filename) and/or r(filename)\n");
1149 ast_log(
LOG_NOTICE,
"The synchronization behavior enabled by the 'S' option is now the default" 1150 " and does not need to be specified.\n");
1155 ast_log(
LOG_WARNING,
"No volume level was provided for the heard volume ('v') option.\n");
1156 }
else if ((sscanf(opts[OPT_ARG_READVOLUME],
"%2d", &x) != 1) || (x < -4) || (x > 4)) {
1157 ast_log(
LOG_NOTICE,
"Heard volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_READVOLUME]);
1165 ast_log(
LOG_WARNING,
"No volume level was provided for the spoken volume ('V') option.\n");
1166 }
else if ((sscanf(opts[OPT_ARG_WRITEVOLUME],
"%2d", &x) != 1) || (x < -4) || (x > 4)) {
1167 ast_log(
LOG_NOTICE,
"Spoken volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_WRITEVOLUME]);
1175 ast_log(
LOG_WARNING,
"No volume level was provided for the combined volume ('W') option.\n");
1176 }
else if ((sscanf(opts[OPT_ARG_VOLUME],
"%2d", &x) != 1) || (x < -4) || (x > 4)) {
1177 ast_log(
LOG_NOTICE,
"Combined volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_VOLUME]);
1185 ast_log(
LOG_WARNING,
"No voicemail recipients were specified for the vm copy ('m') option.\n");
1187 recipients =
ast_strdupa(opts[OPT_ARG_VMRECIPIENTS]);
1205 unsigned int interval = 15;
1207 if (sscanf(interval_str,
"%30u", &interval) != 1) {
1208 ast_log(
LOG_WARNING,
"Invalid interval '%s' for periodic beep. Using default of %u\n",
1209 interval_str, interval);
1213 ast_log(
LOG_WARNING,
"Unable to enable periodic beep, please ensure func_periodic_hook is loaded.\n");
1261 struct mixmonitor_ds *mixmonitor_ds;
1283 mixmonitor_ds = datastore->
data;
1341 struct mixmonitor_ds *mixmonitor_ds =
NULL;
1345 e->
command =
"mixmonitor {start|stop|list}";
1347 "Usage: mixmonitor start <chan_name> [args]\n" 1348 " The optional arguments are passed to the MixMonitor application.\n" 1349 " mixmonitor stop <chan_name> [args]\n" 1350 " The optional arguments are passed to the StopMixMonitor application.\n" 1351 " mixmonitor list <chan_name>\n";
1362 ast_cli(a->
fd,
"No channel matching '%s' found.\n", a->
argv[2]);
1367 if (!strcasecmp(a->
argv[1],
"start")) {
1369 }
else if (!strcasecmp(a->
argv[1],
"stop")){
1371 }
else if (!strcasecmp(a->
argv[1],
"list")) {
1372 ast_cli(a->
fd,
"MixMonitor ID\tFile\tReceive File\tTransmit File\n");
1373 ast_cli(a->
fd,
"=========================================================================\n");
1376 if (datastore->
info == &mixmonitor_ds_info) {
1377 char *filename =
"";
1378 char *filename_read =
"";
1379 char *filename_write =
"";
1381 mixmonitor_ds = datastore->
data;
1382 if (mixmonitor_ds->
fs) {
1391 ast_cli(a->
fd,
"%p\t%s\t%s\t%s\n", mixmonitor_ds, filename, filename_read, filename_write);
1423 if (!strcasecmp(direction,
"read")) {
1425 }
else if (!strcasecmp(direction,
"write")) {
1427 }
else if (!strcasecmp(direction,
"both")) {
1430 astman_send_error(s, m,
"Invalid direction specified. Must be read, write or both");
1459 "direction", direction,
1487 snprintf(args,
sizeof(args),
"%s", filename);
1489 snprintf(args,
sizeof(args),
"%s,%s", filename, options);
1510 char *uid_channel_var =
NULL;
1511 const char *mixmonitor_id =
NULL;
1530 snprintf(args,
sizeof(args),
"%s,%s,%s", file, options, command);
1608 struct mixmonitor_ds *ds_data;
1618 "An ID and key must be provided\n", cmd);
1631 ds_data = datastore->
data;
1633 if (!strcasecmp(
args.key,
"filename")) {
1643 .
name =
"MIXMONITOR",
1702 .optional_modules =
"func_periodic_hook",
static int set_mixmonitor_methods(void)
static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_CLI_DEFINE(fn, txt,...)
char * str
Subscriber phone number (Malloced)
struct ast_filestream * fs_read
void astman_append(struct mansession *s, const char *fmt,...)
Asterisk main include file. File version handling, generic pbx functions.
static int func_mixmonitor_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
#define ast_autochan_channel_lock(autochan)
Lock the autochan's channel lock.
CallerID (and other GR30) management and generation Includes code and algorithms from the Zapata libr...
static void destroy_monitor_audiohook(struct mixmonitor *mixmonitor)
struct ast_party_id id
Connected party ID.
static int manager_stop_mixmonitor(struct mansession *s, const struct message *m)
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
struct ast_filestream * fs
#define ast_channel_unref(c)
Decrease channel reference count.
#define ast_test_flag(p, flag)
const ast_string_field recording_file
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
struct ast_party_name name
Subscriber name.
const ast_string_field mailbox
unsigned int destruction_ok
static void add_vm_recipients_from_string(struct mixmonitor *mixmonitor, const char *vm_recipients)
#define ast_set_flag(p, flag)
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
char mailbox[AST_MAX_CONTEXT]
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
descriptor for a cli entry.
void ast_audiohook_update_status(struct ast_audiohook *audiohook, enum ast_audiohook_status status)
Update audiohook's status.
static char * filename_parse(char *filename, char *buffer, size_t len)
static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
static void mixmonitor_ds_destroy(void *data)
int ast_audiohook_set_mute(struct ast_channel *chan, const char *source, enum ast_audiohook_flags flag, int clear)
Mute frames read from or written to a channel.
#define AST_LIST_NEXT(elm, field)
Returns the next entry in the list after the given entry.
Structure for a data store type.
char * str
Subscriber name (Malloced)
int ast_audiohook_attach(struct ast_channel *chan, struct ast_audiohook *audiohook)
Attach audiohook to channel.
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
int AST_OPTIONAL_API_NAME() ast_beep_stop(struct ast_channel *chan, const char *beep_id)
struct ast_channel * chan
static int launch_monitor_thread(struct ast_channel *chan, const char *filename, unsigned int flags, int readvol, int writevol, const char *post_process, const char *filename_write, char *filename_read, const char *uid_channel_var, const char *recipients, const char *beep_id)
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
static void mixmonitor_ds_remove_and_free(struct ast_channel *chan, const char *datastore_id)
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
#define ast_mutex_lock(a)
struct mixmonitor_ds * mixmonitor_ds
static int manager_mute_mixmonitor(struct mansession *s, const struct message *m)
Mute / unmute a MixMonitor channel.
#define ast_strdup(str)
A wrapper for strdup()
Structure for a data store object.
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.
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
void ast_frame_free(struct ast_frame *fr, int cache)
Requests a frame to be allocated.
static const struct ast_datastore_info mixmonitor_ds_info
void ast_cli(int fd, const char *fmt,...)
static int stop_mixmonitor_full(struct ast_channel *chan, const char *data)
const ast_string_field call_callerchan
int ast_set_mixmonitor_methods(struct ast_mixmonitor_methods *vmethod_table)
Setup MixMonitor virtual methods table. Use this to provide the MixMonitor functionality from a loada...
int ast_unregister_application(const char *app)
Unregister an application.
int ast_audiohook_destroy(struct ast_audiohook *audiohook)
Destroys an audiohook structure.
#define ast_cond_signal(cond)
int ast_channel_priority(const struct ast_channel *chan)
#define ast_pthread_create_detached_background(a, b, c, d)
#define ast_verb(level,...)
Periodic beeps into the audio of a call.
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.
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
ast_callid ast_read_threadstorage_callid(void)
extracts the callerid from the thread
const ast_string_field recording_ext
static int mixmonitor_exec(struct ast_channel *chan, const char *data)
static const struct ast_app_option mixmonitor_opts[128]
#define ast_asprintf(ret, fmt,...)
A wrapper for asprintf()
struct ast_channel * ast_channel_get_by_name_prefix(const char *name, size_t name_len)
Find a channel by a name prefix.
const char * astman_get_header(const struct message *m, char *var)
Get header from mananger transaction.
#define ast_module_unref(mod)
Release a reference to the module.
pthread_cond_t ast_cond_t
#define ast_strlen_zero(foo)
ast_cond_t destruction_condition
#define AST_APP_OPTIONS(holder, options...)
Declares an array of options for an application.
int ast_audiohook_init(struct ast_audiohook *audiohook, enum ast_audiohook_type type, const char *source, enum ast_audiohook_init_flags flags)
Initialize an audiohook structure.
int ast_callid_threadassoc_add(ast_callid callid)
Adds a known callid to thread storage of the calling thread.
MixMonitor virtual methods table definition.
#define ast_audiohook_unlock(ah)
Unlock an audiohook.
#define EVENT_FLAG_SYSTEM
#define ast_debug(level,...)
Log a DEBUG message.
static void mixmonitor_free(struct mixmonitor *mixmonitor)
static const char *const stop_app
char * ast_callerid_merge(char *buf, int bufsiz, const char *name, const char *num, const char *unknown)
const ast_string_field call_macrocontext
General Asterisk PBX channel definitions.
static const char *const mixmonitor_spy_type
Asterisk file paths, configured in asterisk.conf.
static void mixmonitor_save_prep(struct mixmonitor *mixmonitor, char *filename, struct ast_filestream **fs, unsigned int *oflags, int *errflag, char **ext)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
#define ast_string_field_init(x, size)
Initialize a field pool and fields.
static int start_mixmonitor_callback(struct ast_channel *chan, const char *filename, const char *options)
struct ast_party_connected_line * ast_channel_connected(struct ast_channel *chan)
Data structure associated with a custom dialplan function.
#define AST_MAX_EXTENSION
#define AST_STRING_FIELD(name)
Declare a string field.
struct ast_format_def * fmt
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
struct ast_datastore_list * ast_channel_datastores(struct ast_channel *chan)
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.
const struct ast_datastore_info * info
#define ast_strdupa(s)
duplicate a string in memory from the stack
A set of macros to manage forward-linked lists.
#define ast_malloc(len)
A wrapper for malloc()
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
AST_LIST_HEAD_NOLOCK(contactliststruct, contact)
int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags *flags, char **args, char *optstr)
Parses a string containing application options and sets flags/arguments.
const char * ast_channel_exten(const struct ast_channel *chan)
Core PBX routines and definitions.
int AST_OPTIONAL_API_NAME() ast_beep_start(struct ast_channel *chan, unsigned int interval, char *beep_id, size_t len)
const ast_string_field call_callerid
#define ast_test_suite_event_notify(s, f,...)
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
const char * ast_channel_uniqueid(const struct ast_channel *chan)
static int unload_module(void)
struct stasis_topic * ast_channel_topic(struct ast_channel *chan)
A topic which publishes the events for a particular channel.
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 ...
"smart" channels that update automatically if a channel is masqueraded
struct stasis_message_type * ast_channel_mixmonitor_start_type(void)
Message type for starting mixmonitor on a channel.
int ast_audiohook_detach(struct ast_audiohook *audiohook)
Detach audiohook from channel.
const ast_string_field call_callerid
static void mixmonitor_ds_close_fs(struct mixmonitor_ds *mixmonitor_ds)
const ast_string_field call_macrocontext
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
struct stasis_message_type * ast_channel_mixmonitor_stop_type(void)
Message type for stopping mixmonitor on a channel.
int ast_safe_system(const char *s)
Safely spawn an OS shell command while closing file descriptors.
#define AST_APP_OPTION_ARG(option, flagno, argno)
Declares an application option that accepts an argument.
const ast_string_field context
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Connected Line/Party information.
struct ast_filestream * ast_writefile(const char *filename, const char *type, const char *comment, int flags, int check, mode_t mode)
Starts writing a file.
struct ast_filestream * fs_write
#define ast_cond_destroy(cond)
static void copy_to_voicemail(struct mixmonitor *mixmonitor, const char *ext, const char *filename)
const ast_string_field call_callerchan
int ast_channel_is_bridged(const struct ast_channel *chan)
Determine if a channel is in a bridge.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define ast_channel_unlock(chan)
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.
static int clear_mixmonitor_methods(void)
const char * ast_config_AST_MONITOR_DIR
#define ast_calloc(num, len)
A wrapper for calloc()
static int stop_mixmonitor_callback(struct ast_channel *chan, const char *mixmonitor_id)
struct vm_recipient::@57 list
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_closestream(struct ast_filestream *f)
Closes a stream.
static char * handle_cli_mixmonitor(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
#define SAMPLES_PER_FRAME
static const char *const app
Structure used to handle boolean flags.
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",)
struct stasis_message * ast_channel_blob_create_from_cache(const char *uniqueid, struct stasis_message_type *type, struct ast_json *blob)
Create a ast_channel_blob message, pulling channel state from the cache.
void ast_autochan_destroy(struct ast_autochan *autochan)
destroy an ast_autochan structure
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_clear_mixmonitor_methods(void)
Clear the MixMonitor virtual methods table. Use this to cleanup function pointers provided by a modul...
struct vm_recipient * next
struct ast_autochan * ast_autochan_setup(struct ast_channel *chan)
set up a new ast_autochan structure
struct ast_audiohook_options options
Structure used for ast_copy_recording_to_vm in order to cleanly supply data needed for making the rec...
static int manager_mixmonitor(struct mansession *s, const struct message *m)
struct ast_frame * ast_audiohook_read_frame_all(struct ast_audiohook *audiohook, size_t samples, struct ast_format *format, struct ast_frame **read_frame, struct ast_frame **write_frame)
Reads a frame in from the audiohook structure in mixed audio mode and copies read and write frame dat...
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
static void * mixmonitor_thread(void *obj)
Standard Command Line Interface.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
const char * ast_channel_name(const struct ast_channel *chan)
int ast_writestream(struct ast_filestream *fs, struct ast_frame *f)
Writes a frame to a stream.
int attribute_pure ast_false(const char *val)
Make sure something is false. Determine if a string containing a boolean value is "false"...
static int setup_mixmonitor_ds(struct mixmonitor *mixmonitor, struct ast_channel *chan, char **datastore_id, const char *beep_id)
static struct ast_custom_function mixmonitor_function
void pbx_substitute_variables_helper(struct ast_channel *c, const char *cp1, char *cp2, int count)
struct ast_audiohook * audiohook
char * ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos)
Command completion for the list of active channels.
Data structure associated with a single frame of data.
Abstract JSON element (object, array, string, int, ...).
const ast_string_field call_context
loadable MixMonitor functionality
const char * ast_channel_context(const struct ast_channel *chan)
enum ast_audiohook_status status
static void clear_mixmonitor_recipient_list(struct mixmonitor *mixmonitor)
#define ast_datastore_alloc(info, uid)
#define ast_autochan_channel_unlock(autochan)
static struct ast_cli_entry cli_mixmonitor[]
const ast_string_field call_context
#define ast_mutex_init(pmutex)
unsigned char valid
TRUE if the name information is valid/present.
#define AST_APP_OPTION(option, flagno)
Declares an application option that does not accept an argument.
#define ast_mutex_destroy(a)
ast_mixmonitor_start_fn start
const char * ast_channel_macrocontext(const struct ast_channel *chan)
#define ast_manager_register_xml(action, authority, func)
Register a manager callback using XML documentation to describe the manager.
static int mixmonitor_autochan_is_bridged(struct ast_autochan *autochan)
#define ASTERISK_GPL_KEY
The text the key() function should return.
struct ast_audiohook audiohook
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
#define ast_audiohook_lock(ah)
Lock an audiohook.
void astman_send_error(struct mansession *s, const struct message *m, char *error)
Send error in manager transaction.
Asterisk module definitions.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
struct ast_autochan * autochan
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define ast_string_field_free_memory(x)
free all memory - to be called before destroying the object
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
char context[AST_MAX_EXTENSION]
void ast_audiohook_trigger_wait(struct ast_audiohook *audiohook)
Wait for audiohook trigger to be triggered.
int ast_app_copy_recording_to_vm(struct ast_vm_recording_data *vm_rec_data)
param[in] vm_rec_data Contains data needed to make the recording. retval 0 voicemail successfully cre...
unsigned char valid
TRUE if the number information is valid/present.
int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore *datastore)
Remove a datastore from a channel.
#define ast_custom_function_register(acf)
Register a custom function.
const ast_string_field call_extension
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
Structure for mutex and tracking information.
const ast_string_field call_extension
#define ast_mutex_unlock(a)
#define AST_APP_ARG(name)
Define an application argument.
struct stasis_message_type * ast_channel_mixmonitor_mute_type(void)
Message type for muting or unmuting mixmonitor on a channel.
int ast_mkdir(const char *path, int mode)
Recursively create directory path.
#define ast_string_field_set(x, field, data)
Set a field to a simple string value.
struct mixmonitor::@58 recipient_list
struct ast_party_number number
Subscriber phone number.
#define ast_module_ref(mod)
Hold a reference to the module.
static int load_module(void)