Asterisk - The Open Source Telephony Project GIT-master-3dee037
|
Comedian Mail - Voicemail System. More...
#include "asterisk.h"
#include "asterisk/paths.h"
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <time.h>
#include <dirent.h>
#include "asterisk/logger.h"
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/config.h"
#include "asterisk/say.h"
#include "asterisk/module.h"
#include "asterisk/adsi.h"
#include "asterisk/app.h"
#include "asterisk/mwi.h"
#include "asterisk/manager.h"
#include "asterisk/dsp.h"
#include "asterisk/localtime.h"
#include "asterisk/cli.h"
#include "asterisk/utils.h"
#include "asterisk/stringfields.h"
#include "asterisk/strings.h"
#include "asterisk/smdi.h"
#include "asterisk/astobj2.h"
#include "asterisk/taskprocessor.h"
#include "asterisk/test.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | alias_mailbox_mapping |
struct | ast_vm_user |
struct | inprocess |
struct | leave_vm_options |
Options for leaving voicemail with the voicemail() application. More... | |
struct | mailbox_alias_mapping |
struct | users |
list of users found in the config file More... | |
struct | vm_state |
struct | vm_zone |
struct | zones |
Macros | |
#define | ALIASES_OUTPUT_FORMAT "%-32s %-32s\n" |
#define | ASTERISK_USERNAME "asterisk" |
#define | CHUNKSIZE 65536 |
#define | COMMAND_TIMEOUT 5000 |
#define | COPY(a, b, c, d, e, f, g, h) (copy_plain_file(g,h)); |
#define | COUNT(a, b) count_messages(a,b) |
#define | DEFAULT_LISTEN_CONTROL_FORWARD_KEY "#" |
#define | DEFAULT_LISTEN_CONTROL_PAUSE_KEY "0" |
#define | DEFAULT_LISTEN_CONTROL_RESTART_KEY "2" |
#define | DEFAULT_LISTEN_CONTROL_REVERSE_KEY "*" |
#define | DEFAULT_LISTEN_CONTROL_STOP_KEY "13456789" |
#define | DEFAULT_POLL_FREQ 30 |
#define | DELETE(a, b, c, d) (vm_delete(c)) |
#define | DISPOSE(a, b) |
#define | ENDL "\n" |
#define | ERROR_LOCK_PATH -100 |
#define | ERROR_MAX_MSGS -101 |
#define | EXISTS(a, b, c, d) (ast_fileexists(c,NULL,d) > 0) |
#define | force_reload_config() load_config_force(1, 1) |
Forcibly reload voicemail.conf, even if it has not changed. This is necessary after running unit tests. More... | |
#define | HVSU_OUTPUT_FORMAT "%-10s %-5s %-25s %-10s %6s\n" |
#define | HVSZ_OUTPUT_FORMAT "%-15s %-20s %-45s\n" |
#define | INTRO "vm-intro" |
#define | LAST_MSG_INDEX(a) last_message_index(a) |
#define | MAPPING_BUCKETS 511 |
#define | MAX_DATETIME_FORMAT 512 |
#define | MAX_MAIL_BODY_CONTENT_SIZE 134217728L |
#define | MAX_NUM_CID_CONTEXTS 10 |
#define | MAX_VM_CONTEXT_LEN (AST_MAX_CONTEXT) |
#define | MAX_VM_MAILBOX_LEN (MAX_VM_MBOX_ID_LEN + MAX_VM_CONTEXT_LEN) |
#define | MAX_VM_MBOX_ID_LEN (AST_MAX_EXTENSION) |
#define | MAXMSG 100 |
#define | MAXMSGLIMIT 9999 |
#define | MINPASSWORD 0 |
#define | MSG_ID_LEN 256 |
#define | MSGFILE_LEN (7) |
#define | OPERATOR_EXIT 300 |
#define | PWDCHANGE_EXTERNAL (1 << 2) |
#define | PWDCHANGE_INTERNAL (1 << 1) |
#define | RENAME(a, b, c, d, e, f, g, h) (rename_file(g,h)); |
#define | RETRIEVE(a, b, c, d) |
#define | SENDMAIL "/usr/sbin/sendmail -t" |
#define | SMDI_MWI_WAIT_TIMEOUT 1000 /* 1 second */ |
#define | STORE(a, b, c, d, e, f, g, h, i, j, k) |
#define | tdesc "Comedian Mail (Voicemail System)" |
#define | UPDATE_MSG_ID(a, b, c, d, e, f) |
#define | VALID_DTMF "1234567890*#" /* Yes ABCD are valid dtmf but what phones have those? */ |
#define | VM_ALLOCED (1 << 13) |
#define | VM_ATTACH (1 << 11) |
#define | VM_DELETE (1 << 12) |
#define | VM_DIRECTFORWARD (1 << 10) |
#define | VM_EMAIL_EXT_RECS (1 << 19) |
#define | VM_ENVELOPE (1 << 4) |
#define | VM_FORCEGREET (1 << 8) |
#define | VM_FORCENAME (1 << 7) |
#define | VM_FWDURGAUTO (1 << 18) |
#define | VM_MARK_URGENT (1 << 20) |
#define | VM_MESSAGEWRAP (1 << 17) |
#define | VM_MOVEHEARD (1 << 16) |
#define | VM_ODBC_AUDIO_ON_DISK (1 << 21) |
#define | VM_OPERATOR (1 << 1) |
#define | VM_PBXSKIP (1 << 9) |
#define | VM_REVIEW (1 << 0) |
#define | VM_SAYCID (1 << 2) |
#define | VM_SAYDURATION (1 << 5) |
#define | VM_SEARCH (1 << 14) |
#define | VM_SKIPAFTERCMD (1 << 6) |
#define | VM_STRING_HEADER_FORMAT "%-8.8s %-32.32s %-32.32s %-9.9s %-6.6s %-30.30s\n" |
#define | VM_SVMAIL (1 << 3) |
#define | VM_TEMPGREETWARN (1 << 15) |
#define | VMBOX_STRING_DATA_FORMAT "%-32.32s %-32.32s %-16.16s %-16.16s %-16.16s %-16.16s\n" |
#define | VMBOX_STRING_HEADER_FORMAT "%-32.32s %-32.32s %-16.16s %-16.16s %-16.16s %-16.16s\n" |
#define | VMSTATE_MAX_MSG_ARRAY 256 |
#define | VOICEMAIL_CONFIG "voicemail.conf" |
#define | VOICEMAIL_DIR_MODE 0777 |
#define | VOICEMAIL_FILE_MODE 0666 |
Functions | |
static int | __has_voicemail (const char *context, const char *mailbox, const char *folder, int shortcircuit) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | acf_vm_info (struct ast_channel *chan, const char *cmd, char *args, char *buf, size_t len) |
static int | actual_load_config (int reload, struct ast_config *cfg, struct ast_config *ucfg) |
static int | add_email_attachment (FILE *p, struct ast_vm_user *vmu, char *format, char *attach, char *greeting_attachment, char *mailbox, char *bound, char *filename, int last, int msgnum) |
static int | add_message_id (struct ast_config *msg_cfg, char *dir, int msg, char *filename, char *id, size_t id_size, struct ast_vm_user *vmu, int folder) |
static void | adsi_begin (struct ast_channel *chan, int *useadsi) |
static void | adsi_delete (struct ast_channel *chan, struct vm_state *vms) |
static void | adsi_folders (struct ast_channel *chan, int start, char *label) |
static void | adsi_goodbye (struct ast_channel *chan) |
static int | adsi_load_vmail (struct ast_channel *chan, int *useadsi) |
static void | adsi_login (struct ast_channel *chan) |
static int | adsi_logo (unsigned char *buf) |
static void | adsi_message (struct ast_channel *chan, struct vm_state *vms) |
static void | adsi_password (struct ast_channel *chan) |
static void | adsi_status (struct ast_channel *chan, struct vm_state *vms) |
static void | adsi_status2 (struct ast_channel *chan, struct vm_state *vms) |
static int | advanced_options (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int msg, int option, signed char record_gain) |
The advanced options within a message. More... | |
static struct alias_mailbox_mapping * | alias_mailbox_mapping_create (const char *alias, const char *mailbox) |
AO2_STRING_FIELD_CMP_FN (alias_mailbox_mapping, alias) | |
AO2_STRING_FIELD_CMP_FN (mailbox_alias_mapping, mailbox) | |
AO2_STRING_FIELD_HASH_FN (alias_mailbox_mapping, alias) | |
AO2_STRING_FIELD_HASH_FN (mailbox_alias_mapping, mailbox) | |
static int | append_mailbox (const char *context, const char *box, const char *data) |
static int | append_vmbox_info_astman (struct mansession *s, const struct message *m, struct ast_vm_user *vmu, const char *event_name, const char *actionid) |
Append vmbox info string into given astman with event_name. More... | |
static int | append_vmu_info_astman (struct mansession *s, struct ast_vm_user *vmu, const char *event_name, const char *actionid) |
Append vmu info string into given astman with event_name. More... | |
static void | apply_option (struct ast_vm_user *vmu, const char *var, const char *value) |
Sets a specific property value. More... | |
static void | apply_options (struct ast_vm_user *vmu, const char *options) |
Destructively Parse options and apply. More... | |
static void | apply_options_full (struct ast_vm_user *retval, struct ast_variable *var) |
Loads the options specific to a voicemail user. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static const char * | ast_str_encode_mime (struct ast_str **end, ssize_t maxlen, const char *start, size_t preamble, size_t postamble) |
Encode a string according to the MIME rules for encoding strings that are not 7-bit clean or contain control characters. More... | |
static const char * | ast_str_quote (struct ast_str **buf, ssize_t maxlen, const char *from) |
Wraps a character sequence in double quotes, escaping occurences of quotes within the string. More... | |
static int | change_password_realtime (struct ast_vm_user *vmu, const char *password) |
Performs a change of the voicemail passowrd in the realtime engine. More... | |
static int | check_mime (const char *str) |
Check if the string would need encoding within the MIME standard, to avoid confusing certain mail software that expects messages to be 7-bit clean. More... | |
static int | check_password (struct ast_vm_user *vmu, char *password) |
Check that password meets minimum required length. More... | |
static int | close_mailbox (struct vm_state *vms, struct ast_vm_user *vmu) |
static char * | complete_voicemail_move_message (struct ast_cli_args *a, int maxpos) |
static char * | complete_voicemail_show_mailbox (struct ast_cli_args *a) |
static char * | complete_voicemail_show_users (const char *line, const char *word, int pos, int state) |
static int | copy (char *infile, char *outfile) |
Utility function to copy a file. More... | |
static int | copy_message (struct ast_channel *chan, struct ast_vm_user *vmu, int imbox, int msgnum, long duration, struct ast_vm_user *recip, char *fmt, char *dir, const char *flag, const char *dest_folder) |
Copies a message from one mailbox to another. More... | |
static void | copy_plain_file (char *frompath, char *topath) |
Copies a voicemail information (envelope) file. More... | |
static int | count_messages (struct ast_vm_user *vmu, char *dir) |
Find all .txt files - even if they are not in sequence from 0000. More... | |
static int | create_dirpath (char *dest, int len, const char *context, const char *ext, const char *folder) |
basically mkdir -p $dest/$context/$ext/$folder More... | |
static int | dialout (struct ast_channel *chan, struct ast_vm_user *vmu, char *num, char *outgoing_context) |
static struct ast_vm_user * | find_or_create (const char *context, const char *box) |
static struct ast_vm_user * | find_user (struct ast_vm_user *ivm, const char *context, const char *mailbox) |
Finds a voicemail user from the users file or the realtime engine. More... | |
static struct ast_vm_user * | find_user_realtime (struct ast_vm_user *ivm, const char *context, const char *mailbox) |
Finds a voicemail user from the realtime engine. More... | |
static int | forward_message (struct ast_channel *chan, char *context, struct vm_state *vms, struct ast_vm_user *sender, char *fmt, int is_new_message, signed char record_gain, int urgent) |
Sends a voicemail message to a mailbox recipient. More... | |
static int | forward_message_from_mailbox (struct ast_cli_args *a) |
static void | free_user (struct ast_vm_user *vmu) |
static void | free_user_final (struct ast_vm_user *vmu) |
static void | free_vm_users (void) |
Free the users structure. More... | |
static void | free_vm_zones (void) |
Free the zones structure. More... | |
static void | free_zone (struct vm_zone *z) |
static void | generate_msg_id (char *dst) |
Sets the destination string to a uniquely identifying msg_id string. More... | |
static int | get_date (char *s, int len) |
Gets the current date and time, as formatted string. More... | |
static int | get_folder (struct ast_channel *chan, int start) |
get_folder: Folder menu Plays "press 1 for INBOX messages" etc. Should possibly be internationalized More... | |
static int | get_folder2 (struct ast_channel *chan, char *fn, int start) |
plays a prompt and waits for a keypress. More... | |
static int | get_folder_by_name (const char *name) |
static int | get_folder_ja (struct ast_channel *chan, int start) |
static char * | handle_voicemail_forward_message (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_voicemail_move_message (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_voicemail_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Reload voicemail configuration from the CLI. More... | |
static char * | handle_voicemail_remove_message (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_voicemail_show_aliases (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Show a list of voicemail zones in the CLI. More... | |
static char * | handle_voicemail_show_mailbox (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_voicemail_show_users (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Show a list of voicemail users in the CLI. More... | |
static char * | handle_voicemail_show_zones (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Show a list of voicemail zones in the CLI. More... | |
static int | has_voicemail (const char *mailbox, const char *folder) |
Determines if the given folder has messages. More... | |
static int | inboxcount (const char *mailbox, int *newmsgs, int *oldmsgs) |
static int | inboxcount2 (const char *mailbox, int *urgentmsgs, int *newmsgs, int *oldmsgs) |
Check the given mailbox's message count. More... | |
static int | inprocess_cmp_fn (void *obj, void *arg, int flags) |
static int | inprocess_count (const char *context, const char *mailbox, int delta) |
static int | inprocess_hash_fn (const void *obj, const int flags) |
static int | invent_message (struct ast_channel *chan, char *context, char *ext, int busy, char *ecodes) |
static int | is_valid_dtmf (const char *key) |
Determines if a DTMF key entered is valid. More... | |
static int | last_message_index (char *dir) |
Determines the highest message number in use for a given user and mailbox folder. More... | |
static int | leave_voicemail (struct ast_channel *chan, char *ext, struct leave_vm_options *options) |
Prompts the user and records a voicemail to a mailbox. More... | |
static void | load_aliases (struct ast_config *cfg) |
static int | load_config (int reload) |
static int | load_config_force (int reload, int force) |
Reload voicemail.conf. More... | |
static int | load_module (void) |
Load the module. More... | |
static void | load_users (struct ast_config *cfg) |
static void | load_zonemessages (struct ast_config *cfg) |
static int | make_dir (char *dest, int len, const char *context, const char *ext, const char *folder) |
Creates a file system path expression for a folder within the voicemail data folder and the appropriate context. More... | |
static void | make_email_file (FILE *p, char *srcemail, struct ast_vm_user *vmu, int msgnum, char *context, char *mailbox, const char *fromfolder, char *cidnum, char *cidname, char *attach, char *attach2, char *format, int duration, int attach_user_voicemail, struct ast_channel *chan, const char *category, int imap, const char *flag, const char *msg_id) |
Creates the email file to be sent to indicate a new voicemail exists for a user. More... | |
static int | make_file (char *dest, const int len, const char *dir, const int num) |
Creates a file system path expression for a folder within the voicemail data folder and the appropriate context. More... | |
static int | manager_get_mailbox_summary (struct mansession *s, const struct message *m) |
static int | manager_list_voicemail_users (struct mansession *s, const struct message *m) |
Manager list voicemail users command. More... | |
static int | manager_match_mailbox (struct ast_mwi_state *mwi_state, void *data) |
static int | manager_status_voicemail_user (struct mansession *s, const struct message *m) |
static int | manager_voicemail_forward (struct mansession *s, const struct message *m) |
static int | manager_voicemail_move (struct mansession *s, const struct message *m) |
static int | manager_voicemail_refresh (struct mansession *s, const struct message *m) |
static int | manager_voicemail_remove (struct mansession *s, const struct message *m) |
static void * | mb_poll_thread (void *data) |
static const char * | mbox (struct ast_vm_user *vmu, int id) |
static int | message_range_and_existence_check (struct vm_state *vms, const char *msg_ids[], size_t num_msgs, int *msg_nums, struct ast_vm_user *vmu) |
common bounds checking and existence check for Voicemail API functions. More... | |
static int | messagecount (const char *mailbox_id, const char *folder) |
static int | move_message_from_mailbox (struct ast_cli_args *a) |
static int | msg_create_from_file (struct ast_vm_recording_data *recdata) |
static void | mwi_handle_subscribe (const char *id, struct ast_mwi_subscriber *sub) |
static int | mwi_handle_subscribe2 (void *data) |
static void | mwi_handle_unsubscribe (const char *id, struct ast_mwi_subscriber *sub) |
static int | mwi_handle_unsubscribe2 (void *data) |
static int | notify_new_message (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int msgnum, long duration, char *fmt, char *cidnum, char *cidname, const char *flag) |
Sends email notification that a user has a new voicemail waiting for them. More... | |
static void | notify_new_state (struct ast_vm_user *vmu) |
static int | open_mailbox (struct vm_state *vms, struct ast_vm_user *vmu, int box) |
static int | play_message (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms) |
static int | play_message_by_id (struct ast_channel *chan, const char *mailbox, const char *context, const char *msg_id) |
Finds a message in a specific mailbox by msg_id and plays it to the channel. More... | |
static int | play_message_by_id_helper (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, const char *msg_id) |
static int | play_message_callerid (struct ast_channel *chan, struct vm_state *vms, char *cid, const char *context, int callback, int saycidnumber) |
static int | play_message_category (struct ast_channel *chan, const char *category) |
static int | play_message_datetime (struct ast_channel *chan, struct ast_vm_user *vmu, const char *origtime, const char *filename) |
static int | play_message_duration (struct ast_channel *chan, struct vm_state *vms, const char *duration, int minduration) |
static int | play_record_review (struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int outsidecaller, struct ast_vm_user *vmu, int *duration, int *sound_duration, const char *unlockdir, signed char record_gain, struct vm_state *vms, char *flag, const char *msg_id, int forwardintro) |
static int | poll_subscribed_mailbox (struct ast_mwi_state *mwi_state, void *data) |
static void | populate_defaults (struct ast_vm_user *vmu) |
Sets default voicemail system options to a voicemail user. More... | |
static void | prep_email_sub_vars (struct ast_channel *ast, struct ast_vm_user *vmu, int msgnum, char *context, char *mailbox, const char *fromfolder, char *cidnum, char *cidname, char *dur, char *date, const char *category, const char *flag) |
static void | print_mappings (void *v_obj, void *where, ao2_prnt_fn *prnt) |
static void | queue_mwi_event (const char *channel_id, const char *box, int urgent, int new, int old) |
static void | read_password_from_file (const char *secretfn, char *password, int passwordlen) |
static int | reload (void) |
static int | remove_message_from_mailbox (struct ast_cli_args *a) |
static void | rename_file (char *sfn, char *dfn) |
Renames a message in a mailbox folder. More... | |
static int | resequence_mailbox (struct ast_vm_user *vmu, char *dir, int stopcount) |
static int | reset_user_pw (const char *context, const char *mailbox, const char *newpass) |
Resets a user password to a specified password. More... | |
static void | run_externnotify (const char *context, const char *extension, const char *flag) |
static int | save_to_folder (struct ast_vm_user *vmu, struct vm_state *vms, int msg, int box, int *newmsg, int move) |
static int | say_and_wait (struct ast_channel *chan, int num, const char *language) |
static int | sayname (struct ast_channel *chan, const char *mailbox, const char *context) |
static int | sendmail (char *srcemail, struct ast_vm_user *vmu, int msgnum, char *context, char *mailbox, const char *fromfolder, char *cidnum, char *cidname, char *attach, char *attach2, char *format, int duration, int attach_user_voicemail, struct ast_channel *chan, const char *category, const char *flag, const char *msg_id) |
static int | sendpage (char *srcemail, char *pager, int msgnum, char *context, char *mailbox, const char *fromfolder, char *cidnum, char *cidname, int duration, struct ast_vm_user *vmu, const char *category, const char *flag) |
static int | separate_mailbox (char *mailbox_id, char **mailbox, char **context) |
static int | show_mailbox_details (struct ast_cli_args *a) |
static int | show_mailbox_snapshot (struct ast_cli_args *a) |
static int | show_messages_for_mailbox (struct ast_cli_args *a) |
static char * | show_users_realtime (int fd, const char *context) |
static void | start_poll_thread (void) |
static void | stop_poll_thread (void) |
static char * | strip_control_and_high (const char *input, char *buf, size_t buflen) |
Strips control and non 7-bit clean characters from input string. More... | |
static const char * | substitute_escapes (const char *value) |
static int | unload_module (void) |
static int | valid_config (const struct ast_config *cfg) |
Check if configuration file is valid. More... | |
static int | vm_allocate_dh (struct vm_state *vms, struct ast_vm_user *vmu, int count_msg) |
static int | vm_authenticate (struct ast_channel *chan, char *mailbox, int mailbox_size, struct ast_vm_user *res_vmu, const char *context, const char *prefix, int skipuser, int max_logins, int silent) |
static int | vm_browse_messages (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Top level method to invoke the language variant vm_browse_messages_XX function. More... | |
static int | vm_browse_messages_en (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Default English syntax for 'You have N messages' greeting. More... | |
static int | vm_browse_messages_es (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Spanish syntax for 'You have N messages' greeting. More... | |
static int | vm_browse_messages_gr (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Greek syntax for 'You have N messages' greeting. More... | |
static int | vm_browse_messages_he (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
static int | vm_browse_messages_it (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Italian syntax for 'You have N messages' greeting. More... | |
static int | vm_browse_messages_ja (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Japanese syntax for 'You have N messages' greeting. More... | |
static int | vm_browse_messages_pt (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Portuguese syntax for 'You have N messages' greeting. More... | |
static int | vm_browse_messages_vi (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Vietnamese syntax for 'You have N messages' greeting. More... | |
static int | vm_browse_messages_zh (struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) |
Chinese (Taiwan)syntax for 'You have N messages' greeting. More... | |
static void | vm_change_password (struct ast_vm_user *vmu, const char *newpassword) |
The handler for the change password option. More... | |
static void | vm_change_password_shell (struct ast_vm_user *vmu, char *newpassword) |
static char * | vm_check_password_shell (char *command, char *buf, size_t len) |
static int | vm_delete (char *file) |
Removes the voicemail sound and information file. More... | |
static int | vm_exec (struct ast_channel *chan, const char *data) |
static int | vm_execmain (struct ast_channel *chan, const char *data) |
static int | vm_forwardoptions (struct ast_channel *chan, struct ast_vm_user *vmu, char *curdir, int curmsg, char *vm_fmts, char *context, signed char record_gain, long *duration, struct vm_state *vms, char *flag) |
presents the option to prepend to an existing message when forwarding it. More... | |
static const char * | vm_index_to_foldername (int id) |
static int | vm_instructions (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int skipadvanced, int in_urgent, int nodelete) |
static int | vm_instructions_en (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int skipadvanced, int in_urgent, int nodelete) |
static int | vm_instructions_ja (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int skipadvanced, int in_urgent, int nodelete) |
static int | vm_instructions_zh (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int skipadvanced, int in_urgent, int nodelete) |
static int | vm_intro (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms) |
static int | vm_intro_cs (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_da (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_de (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_en (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_es (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_fr (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_gr (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_he (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_is (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_it (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_ja (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_multilang (struct ast_channel *chan, struct vm_state *vms, const char message_gender[]) |
static int | vm_intro_nl (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_no (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_pl (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_pt (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_pt_BR (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_se (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_vi (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_intro_zh (struct ast_channel *chan, struct vm_state *vms) |
static int | vm_lock_path (const char *path) |
Lock file path only return failure if ast_lock_path returns 'timeout', not if the path does not exist or any other reason. More... | |
static struct ast_vm_mailbox_snapshot * | vm_mailbox_snapshot_create (const char *mailbox, const char *context, const char *folder, int descending, enum ast_vm_snapshot_sort_val sort_val, int combine_INBOX_and_OLD) |
static struct ast_vm_mailbox_snapshot * | vm_mailbox_snapshot_destroy (struct ast_vm_mailbox_snapshot *mailbox_snapshot) |
static int | vm_msg_forward (const char *from_mailbox, const char *from_context, const char *from_folder, const char *to_mailbox, const char *to_context, const char *to_folder, size_t num_msgs, const char *msg_ids[], int delete_old) |
static int | vm_msg_move (const char *mailbox, const char *context, size_t num_msgs, const char *oldfolder, const char *old_msg_ids[], const char *newfolder) |
static int | vm_msg_play (struct ast_channel *chan, const char *mailbox, const char *context, const char *folder, const char *msg_num, ast_vm_msg_play_cb cb) |
static int | vm_msg_remove (const char *mailbox, const char *context, size_t num_msgs, const char *folder, const char *msgs[]) |
static struct ast_vm_msg_snapshot * | vm_msg_snapshot_alloc (void) |
static int | vm_msg_snapshot_create (struct ast_vm_user *vmu, struct vm_state *vms, struct ast_vm_mailbox_snapshot *mailbox_snapshot, int snapshot_index, int mailbox_index, int descending, enum ast_vm_snapshot_sort_val sort_val) |
Create and store off all the msgs in an open mailbox. More... | |
static struct ast_vm_msg_snapshot * | vm_msg_snapshot_destroy (struct ast_vm_msg_snapshot *msg_snapshot) |
static int | vm_newuser_setup (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain) |
static int | vm_options (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain) |
static int | vm_play_folder_name (struct ast_channel *chan, char *mbox) |
static int | vm_play_folder_name_gr (struct ast_channel *chan, char *box) |
static int | vm_play_folder_name_ja (struct ast_channel *chan, char *box) |
static int | vm_play_folder_name_pl (struct ast_channel *chan, char *box) |
static int | vm_play_folder_name_ua (struct ast_channel *chan, char *box) |
static int | vm_playmsgexec (struct ast_channel *chan, const char *data) |
static int | vm_sayname (struct ast_channel *chan, const char *mailbox_id) |
static int | vm_tempgreeting (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain) |
The handler for 'record a temporary greeting'. More... | |
static int | vmauthenticate (struct ast_channel *chan, const char *data) |
static int | vmsayname_exec (struct ast_channel *chan, const char *data) |
static const struct ast_tm * | vmu_tm (const struct ast_vm_user *vmu, struct ast_tm *tm) |
fill in *tm for current time according to the proper timezone, if any. More... | |
static int | wait_file (struct ast_channel *chan, struct vm_state *vms, char *file) |
static int | wait_file2 (struct ast_channel *chan, struct vm_state *vms, char *file) |
static int | write_password_to_file (const char *secretfn, const char *password) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Comedian Mail (Voicemail System)" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .optional_modules = "res_adsi,res_smdi", } |
static char * | addesc = "Comedian Mail" |
static unsigned char | adsifdn [4] = "\x00\x00\x00\x0F" |
static unsigned char | adsisec [4] = "\x9B\xDB\xF7\xAC" |
static int | adsiver = 1 |
static struct ao2_container * | alias_mailbox_mappings |
static char | aliasescontext [MAX_VM_CONTEXT_LEN] |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static char | callcontext [AST_MAX_CONTEXT] = "" |
static char | charset [32] = "ISO-8859-1" |
static char | cidinternalcontexts [MAX_NUM_CID_CONTEXTS][64] |
static struct ast_cli_entry | cli_voicemail [] |
static char | dialcontext [AST_MAX_CONTEXT] = "" |
static char * | emailbody |
static char | emaildateformat [32] = "%A, %B %d, %Y at %r" |
static char * | emailsubject |
static char | exitcontext [AST_MAX_CONTEXT] = "" |
static char | ext_pass_check_cmd [128] |
static char | ext_pass_cmd [128] |
static char | externnotify [160] |
static char | fromstring [100] |
static struct ast_flags | globalflags = {0} |
struct ao2_container * | inprocess_container |
static char | listen_control_forward_key [12] |
static char | listen_control_pause_key [12] |
static char | listen_control_restart_key [12] |
static char | listen_control_reverse_key [12] |
static char | listen_control_stop_key [12] |
static char | locale [20] |
static struct ao2_container * | mailbox_alias_mappings |
static const char *const | mailbox_folders [] |
static char | mailcmd [160] = SENDMAIL |
static int | maxdeletedmsg |
static int | maxgreet |
static int | maxlogins = 3 |
static int | maxmsg = MAXMSG |
static int | maxsilence |
static int | minpassword = MINPASSWORD |
static int | msg_id_incrementor |
struct ast_mwi_observer | mwi_observer |
static struct ast_taskprocessor * | mwi_subscription_tps |
static int | my_umask |
static char * | pagerbody |
static char | pagerdateformat [32] = "%A, %B %d, %Y at %r" |
static char | pagerfromstring [100] |
static char * | pagersubject |
static int | passwordlocation |
static char * | playmsg_app = "VoiceMailPlayMsg" |
static ast_cond_t | poll_cond = PTHREAD_COND_INITIALIZER |
static unsigned int | poll_freq = DEFAULT_POLL_FREQ |
static ast_mutex_t | poll_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static unsigned int | poll_mailboxes |
static pthread_t | poll_thread = AST_PTHREADT_NULL |
static unsigned char | poll_thread_run |
static int | pwdchange = PWDCHANGE_INTERNAL |
static int | saydurationminfo = 2 |
static char * | sayname_app = "VMSayName" |
static char | serveremail [80] = ASTERISK_USERNAME |
static int | silencethreshold = 128 |
static int | skipms = 3000 |
static struct ast_smdi_interface * | smdi_iface = NULL |
static struct users | users = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static char | userscontext [AST_MAX_EXTENSION] = "default" |
static const struct ast_app_option | vm_app_options [128] = { [ 's' ] = { .flag = OPT_SILENT }, [ 'S' ] = { .flag = OPT_SILENT_IF_GREET }, [ 'b' ] = { .flag = OPT_BUSY_GREETING }, [ 'u' ] = { .flag = OPT_UNAVAIL_GREETING }, [ 'g' ] = { .flag = OPT_RECORDGAIN , .arg_index = OPT_ARG_RECORDGAIN + 1 }, [ 'd' ] = { .flag = OPT_DTMFEXIT , .arg_index = OPT_ARG_DTMFEXIT + 1 }, [ 'p' ] = { .flag = OPT_PREPEND_MAILBOX }, [ 'a' ] = { .flag = OPT_AUTOPLAY , .arg_index = OPT_ARG_PLAYFOLDER + 1 }, [ 'U' ] = { .flag = OPT_MESSAGE_Urgent }, [ 'P' ] = { .flag = OPT_MESSAGE_PRIORITY }, [ 'e' ] = { .flag = OPT_EARLYM_GREETING }, [ 't' ] = { .flag = OPT_BEEP , .arg_index = OPT_ARG_BEEP_TONE + 1 }, [ 'r' ] = { .flag = OPT_READONLY }, } |
static const struct ast_vm_greeter_functions | vm_greeter_table |
static struct ast_custom_function | vm_info_acf |
static char | vm_invalid_password [80] = "vm-invalid-password" |
static char | vm_login [80] = "vm-login" |
static char | vm_mismatch [80] = "vm-mismatch" |
static char | vm_newpassword [80] = "vm-newpassword" |
static char | vm_newuser [80] = "vm-newuser" |
static char | vm_passchanged [80] = "vm-passchanged" |
static char | vm_password [80] = "vm-password" |
static char | vm_pls_try_again [80] = "vm-pls-try-again" |
static char | vm_prepend_timeout [80] = "vm-then-pound" |
static char | vm_reenterpassword [80] = "vm-reenterpassword" |
static char | VM_SPOOL_DIR [PATH_MAX] |
static const struct ast_vm_functions | vm_table |
static char * | vmauthenticate_app = "VMAuthenticate" |
static char | vmfmts [80] = "wav" |
static int | vmmaxsecs |
static int | vmminsecs |
static char * | voicemail_app = "VoiceMail" |
static char * | voicemailmain_app = "VoiceMailMain" |
static double | volgain |
static struct zones | zones = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static char | zonetag [80] |
Comedian Mail - Voicemail System.
unixODBC (http://www.unixodbc.org/) A source distribution of University of Washington's IMAP c-client (http://www.washington.edu/imap/)
Definition in file app_voicemail_imap.c.
#define ALIASES_OUTPUT_FORMAT "%-32s %-32s\n" |
#define ASTERISK_USERNAME "asterisk" |
Definition at line 638 of file app_voicemail_imap.c.
#define CHUNKSIZE 65536 |
Definition at line 635 of file app_voicemail_imap.c.
#define COMMAND_TIMEOUT 5000 |
Definition at line 631 of file app_voicemail_imap.c.
#define COPY | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h | |||
) | (copy_plain_file(g,h)); |
Definition at line 1014 of file app_voicemail_imap.c.
#define COUNT | ( | a, | |
b | |||
) | count_messages(a,b) |
Definition at line 1007 of file app_voicemail_imap.c.
#define DEFAULT_LISTEN_CONTROL_FORWARD_KEY "#" |
Definition at line 643 of file app_voicemail_imap.c.
#define DEFAULT_LISTEN_CONTROL_PAUSE_KEY "0" |
Definition at line 645 of file app_voicemail_imap.c.
#define DEFAULT_LISTEN_CONTROL_RESTART_KEY "2" |
Definition at line 646 of file app_voicemail_imap.c.
#define DEFAULT_LISTEN_CONTROL_REVERSE_KEY "*" |
Definition at line 644 of file app_voicemail_imap.c.
#define DEFAULT_LISTEN_CONTROL_STOP_KEY "13456789" |
Definition at line 647 of file app_voicemail_imap.c.
#define DEFAULT_POLL_FREQ 30 |
By default, poll every 30 seconds
Definition at line 1085 of file app_voicemail_imap.c.
Definition at line 1010 of file app_voicemail_imap.c.
#define ENDL "\n" |
Definition at line 665 of file app_voicemail_imap.c.
#define ERROR_LOCK_PATH -100 |
Definition at line 694 of file app_voicemail_imap.c.
#define ERROR_MAX_MSGS -101 |
Definition at line 695 of file app_voicemail_imap.c.
Definition at line 1012 of file app_voicemail_imap.c.
#define force_reload_config | ( | ) | load_config_force(1, 1) |
Forcibly reload voicemail.conf, even if it has not changed. This is necessary after running unit tests.
Definition at line 785 of file app_voicemail_imap.c.
#define HVSU_OUTPUT_FORMAT "%-10s %-5s %-25s %-10s %6s\n" |
#define HVSZ_OUTPUT_FORMAT "%-15s %-20s %-45s\n" |
#define INTRO "vm-intro" |
Definition at line 653 of file app_voicemail_imap.c.
#define LAST_MSG_INDEX | ( | a | ) | last_message_index(a) |
Definition at line 1008 of file app_voicemail_imap.c.
#define MAPPING_BUCKETS 511 |
Definition at line 1108 of file app_voicemail_imap.c.
#define MAX_DATETIME_FORMAT 512 |
Definition at line 668 of file app_voicemail_imap.c.
#define MAX_MAIL_BODY_CONTENT_SIZE 134217728L |
Definition at line 655 of file app_voicemail_imap.c.
#define MAX_NUM_CID_CONTEXTS 10 |
Definition at line 669 of file app_voicemail_imap.c.
#define MAX_VM_CONTEXT_LEN (AST_MAX_CONTEXT) |
Definition at line 886 of file app_voicemail_imap.c.
#define MAX_VM_MAILBOX_LEN (MAX_VM_MBOX_ID_LEN + MAX_VM_CONTEXT_LEN) |
Definition at line 888 of file app_voicemail_imap.c.
#define MAX_VM_MBOX_ID_LEN (AST_MAX_EXTENSION) |
Definition at line 885 of file app_voicemail_imap.c.
#define MAXMSG 100 |
Definition at line 657 of file app_voicemail_imap.c.
#define MAXMSGLIMIT 9999 |
Definition at line 658 of file app_voicemail_imap.c.
#define MINPASSWORD 0 |
Default minimum mailbox password length
Definition at line 660 of file app_voicemail_imap.c.
#define MSG_ID_LEN 256 |
Definition at line 4017 of file app_voicemail_imap.c.
#define MSGFILE_LEN (7) |
Length of the message file name: msgXXXX
Definition at line 698 of file app_voicemail_imap.c.
#define OPERATOR_EXIT 300 |
Definition at line 696 of file app_voicemail_imap.c.
#define PWDCHANGE_EXTERNAL (1 << 2) |
Definition at line 1028 of file app_voicemail_imap.c.
#define PWDCHANGE_INTERNAL (1 << 1) |
Definition at line 1027 of file app_voicemail_imap.c.
#define RENAME | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h | |||
) | (rename_file(g,h)); |
Definition at line 1013 of file app_voicemail_imap.c.
#define SENDMAIL "/usr/sbin/sendmail -t" |
Definition at line 652 of file app_voicemail_imap.c.
#define SMDI_MWI_WAIT_TIMEOUT 1000 /* 1 second */ |
Definition at line 629 of file app_voicemail_imap.c.
Definition at line 1011 of file app_voicemail_imap.c.
#define tdesc "Comedian Mail (Voicemail System)" |
Definition at line 1037 of file app_voicemail_imap.c.
#define VALID_DTMF "1234567890*#" /* Yes ABCD are valid dtmf but what phones have those? */ |
Definition at line 648 of file app_voicemail_imap.c.
#define VM_ALLOCED (1 << 13) |
Structure was malloc'ed, instead of placed in a return (usually static) buffer
Definition at line 684 of file app_voicemail_imap.c.
#define VM_ATTACH (1 << 11) |
Attach message to voicemail notifications?
Definition at line 682 of file app_voicemail_imap.c.
#define VM_DELETE (1 << 12) |
Delete message after sending notification
Definition at line 683 of file app_voicemail_imap.c.
#define VM_DIRECTFORWARD (1 << 10) |
Permit caller to use the Directory app for selecting to which mailbox to forward a VM
Definition at line 681 of file app_voicemail_imap.c.
#define VM_EMAIL_EXT_RECS (1 << 19) |
Send voicemail emails when an external recording is added to a mailbox
Definition at line 690 of file app_voicemail_imap.c.
#define VM_ENVELOPE (1 << 4) |
Play the envelope information (who-from, time received, etc.)
Definition at line 675 of file app_voicemail_imap.c.
#define VM_FORCEGREET (1 << 8) |
Have new users record their greetings
Definition at line 679 of file app_voicemail_imap.c.
#define VM_FORCENAME (1 << 7) |
Have new users record their name
Definition at line 678 of file app_voicemail_imap.c.
#define VM_FWDURGAUTO (1 << 18) |
Autoset of Urgent flag on forwarded Urgent messages set globally
Definition at line 689 of file app_voicemail_imap.c.
#define VM_MARK_URGENT (1 << 20) |
After recording, permit the caller to mark the message as urgent
Definition at line 691 of file app_voicemail_imap.c.
#define VM_MESSAGEWRAP (1 << 17) |
Wrap around from the last message to the first, and vice-versa
Definition at line 688 of file app_voicemail_imap.c.
#define VM_MOVEHEARD (1 << 16) |
Move a "heard" message to Old after listening to it
Definition at line 687 of file app_voicemail_imap.c.
#define VM_ODBC_AUDIO_ON_DISK (1 << 21) |
When using ODBC, leave the message and greeting recordings on disk instead of moving them into the table
Definition at line 692 of file app_voicemail_imap.c.
#define VM_OPERATOR (1 << 1) |
Allow 0 to be pressed to go to 'o' extension
Definition at line 672 of file app_voicemail_imap.c.
#define VM_PBXSKIP (1 << 9) |
Skip the [PBX] preamble in the Subject line of emails
Definition at line 680 of file app_voicemail_imap.c.
#define VM_REVIEW (1 << 0) |
After recording, permit the caller to review the recording before saving
Definition at line 671 of file app_voicemail_imap.c.
#define VM_SAYCID (1 << 2) |
Repeat the CallerID info during envelope playback
Definition at line 673 of file app_voicemail_imap.c.
#define VM_SAYDURATION (1 << 5) |
Play the length of the message during envelope playback
Definition at line 676 of file app_voicemail_imap.c.
#define VM_SEARCH (1 << 14) |
Search all contexts for a matching mailbox
Definition at line 685 of file app_voicemail_imap.c.
#define VM_SKIPAFTERCMD (1 << 6) |
After deletion, assume caller wants to go to the next message
Definition at line 677 of file app_voicemail_imap.c.
#define VM_STRING_HEADER_FORMAT "%-8.8s %-32.32s %-32.32s %-9.9s %-6.6s %-30.30s\n" |
#define VM_SVMAIL (1 << 3) |
Allow the user to compose a new VM from within VoicemailMain
Definition at line 674 of file app_voicemail_imap.c.
#define VM_TEMPGREETWARN (1 << 15) |
Remind user tempgreeting is set
Definition at line 686 of file app_voicemail_imap.c.
#define VMBOX_STRING_DATA_FORMAT "%-32.32s %-32.32s %-16.16s %-16.16s %-16.16s %-16.16s\n" |
#define VMBOX_STRING_HEADER_FORMAT "%-32.32s %-32.32s %-16.16s %-16.16s %-16.16s %-16.16s\n" |
#define VMSTATE_MAX_MSG_ARRAY 256 |
Definition at line 940 of file app_voicemail_imap.c.
#define VOICEMAIL_CONFIG "voicemail.conf" |
Definition at line 637 of file app_voicemail_imap.c.
#define VOICEMAIL_DIR_MODE 0777 |
Definition at line 633 of file app_voicemail_imap.c.
#define VOICEMAIL_FILE_MODE 0666 |
Definition at line 634 of file app_voicemail_imap.c.
enum vm_box |
Definition at line 700 of file app_voicemail_imap.c.
enum vm_option_args |
Definition at line 725 of file app_voicemail_imap.c.
enum vm_option_flags |
Definition at line 709 of file app_voicemail_imap.c.
enum vm_passwordlocation |
Enumerator | |
---|---|
OPT_PWLOC_VOICEMAILCONF | |
OPT_PWLOC_SPOOLDIR | |
OPT_PWLOC_USERSCONF | |
OPT_PWLOC_VOICEMAILCONF | |
OPT_PWLOC_SPOOLDIR | |
OPT_PWLOC_USERSCONF | |
OPT_PWLOC_VOICEMAILCONF | |
OPT_PWLOC_SPOOLDIR | |
OPT_PWLOC_USERSCONF |
Definition at line 734 of file app_voicemail_imap.c.
|
static |
Definition at line 6434 of file app_voicemail_imap.c.
References alias_mailbox_mappings, aliasescontext, ao2_find, ao2_ref, ast_strdupa, ast_strlen_zero(), c, voicemailpwcheck::context, alias_mailbox_mapping::mailbox, voicemailpwcheck::mailbox, MAX_VM_MAILBOX_LEN, OBJ_SEARCH_KEY, separate_mailbox(), tmp(), and VM_SPOOL_DIR.
Referenced by has_voicemail(), inboxcount2(), and messagecount().
|
static |
Definition at line 17811 of file app_voicemail_imap.c.
|
static |
Definition at line 17811 of file app_voicemail_imap.c.
|
static |
Definition at line 13601 of file app_voicemail_imap.c.
References args, ast_alloca, AST_APP_ARG, ast_channel_language(), ast_copy_string(), AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), buf, voicemailpwcheck::context, ast_vm_user::email, find_user(), free_user(), ast_vm_user::fullname, ast_vm_user::language, len(), ast_vm_user::locale, LOG_ERROR, voicemailpwcheck::mailbox, messagecount(), NULL, ast_vm_user::pager, ast_vm_user::password, S_OR, separate_mailbox(), and ast_vm_user::zonetag.
|
static |
Definition at line 14836 of file app_voicemail_imap.c.
References adsifdn, adsisec, adsiver, alias_mailbox_mappings, aliasescontext, ao2_callback, apply_options_full(), ast_category_browse(), ast_config_option(), ast_copy_string(), ast_debug, ast_dsp_get_threshold_from_settings(), ast_false(), ast_format_str_reduce(), ast_free, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, AST_LOG_ERROR, AST_LOG_WARNING, ast_mwi_state_callback_all(), AST_PTHREADT_NULL, ast_set2_flag, ast_smdi_interface_find(), ast_strdup, ast_strdupa, ast_strlen_zero(), ast_taskprocessor_alert_set_levels(), AST_TASKPROCESSOR_HIGH_WATER_LEVEL, ast_true(), ast_variable_browse(), ast_variable_retrieve(), ASTERISK_USERNAME, callcontext, cidinternalcontexts, current, DEFAULT_LISTEN_CONTROL_FORWARD_KEY, DEFAULT_LISTEN_CONTROL_PAUSE_KEY, DEFAULT_LISTEN_CONTROL_RESTART_KEY, DEFAULT_LISTEN_CONTROL_REVERSE_KEY, DEFAULT_LISTEN_CONTROL_STOP_KEY, DEFAULT_POLL_FREQ, dialcontext, emailbody, emaildateformat, emailsubject, exitcontext, ext_pass_check_cmd, ext_pass_cmd, externnotify, find_or_create(), free_vm_users(), free_vm_zones(), fromstring, globalflags, is_valid_dtmf(), listen_control_forward_key, listen_control_pause_key, listen_control_restart_key, listen_control_reverse_key, listen_control_stop_key, load_aliases(), load_users(), load_zonemessages(), locale, LOG_ERROR, mailbox_alias_mappings, mailcmd, MAX_NUM_CID_CONTEXTS, maxdeletedmsg, maxgreet, maxlogins, MAXMSG, maxmsg, MAXMSGLIMIT, maxsilence, MINPASSWORD, minpassword, mwi_subscription_tps, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, OPT_PWLOC_SPOOLDIR, OPT_PWLOC_USERSCONF, OPT_PWLOC_VOICEMAILCONF, pagerbody, pagerdateformat, pagerfromstring, pagersubject, passwordlocation, PATH_MAX, poll_freq, poll_mailboxes, poll_thread, populate_defaults(), pwdchange, PWDCHANGE_EXTERNAL, PWDCHANGE_INTERNAL, read_password_from_file(), S_OR, saydurationminfo, SENDMAIL, serveremail, silencethreshold, skipms, smdi_iface, start_poll_thread(), stop_poll_thread(), strsep(), substitute_escapes(), THRESHOLD_SILENCE, tmp(), userscontext, VM_ATTACH, VM_DIRECTFORWARD, VM_ENVELOPE, VM_FORCEGREET, VM_FORCENAME, VM_FWDURGAUTO, vm_invalid_password, vm_login, VM_MARK_URGENT, VM_MESSAGEWRAP, vm_mismatch, VM_MOVEHEARD, vm_newpassword, vm_newuser, VM_ODBC_AUDIO_ON_DISK, VM_OPERATOR, vm_passchanged, vm_password, VM_PBXSKIP, vm_pls_try_again, vm_prepend_timeout, vm_reenterpassword, VM_REVIEW, VM_SAYCID, VM_SAYDURATION, VM_SEARCH, VM_SKIPAFTERCMD, VM_SPOOL_DIR, VM_SVMAIL, VM_TEMPGREETWARN, vmfmts, vmmaxsecs, vmminsecs, volgain, and zonetag.
Referenced by load_config_force().
|
static |
Definition at line 5733 of file app_voicemail_imap.c.
References ast_base64_encode_file_path(), ast_copy_string(), ast_debug, ast_file_is_readable(), ast_log, AST_LOG_WARNING, ast_safe_system(), c, ast_vm_user::context, create_dirpath(), ENDL, errno, last, LOG_ERROR, LOG_WARNING, ast_vm_user::mailbox, voicemailpwcheck::mailbox, mkdtemp(), NULL, PATH_MAX, vmfmts, and ast_vm_user::volgain.
Referenced by make_email_file().
|
static |
Definition at line 13273 of file app_voicemail_imap.c.
References ast_category_get(), ast_config_text_file_save(), ast_log, ast_variable_append(), ast_variable_new, ast_variables_destroy(), generate_msg_id(), LOG_ERROR, LOG_WARNING, NULL, UPDATE_MSG_ID, and var.
Referenced by vm_msg_snapshot_create().
|
static |
Definition at line 7851 of file app_voicemail_imap.c.
References adsi_load_vmail(), adsifdn, adsiver, ast_adsi_available(), ast_adsi_load_session(), AST_ADSI_UNAVAILABLE, ast_channel_adsicpe_set(), ast_log, and AST_LOG_WARNING.
Referenced by vm_authenticate(), and vm_execmain().
|
static |
Definition at line 8050 of file app_voicemail_imap.c.
References ADSI_KEY_APPS, ADSI_KEY_SKT, ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_set_keys(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), ast_mutex_lock, ast_mutex_unlock, buf, vm_state::curmsg, vm_state::deleted, and vm_state::lastmsg.
Referenced by vm_execmain().
|
static |
Definition at line 7919 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, ADSI_KEY_APPS, ADSI_KEY_SKT, ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_keys(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), and buf.
Referenced by vm_execmain().
|
static |
Definition at line 8205 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, ADSI_JUST_LEFT, adsi_logo(), ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), and buf.
Referenced by vm_execmain().
|
static |
Definition at line 7722 of file app_voicemail_imap.c.
References addesc, ADSI_COMM_PAGE, ADSI_JUST_CENT, ADSI_JUST_LEFT, ADSI_KEY_APPS, adsi_logo(), ADSI_MSG_DISPLAY, ADSI_MSG_DOWNLOAD, adsifdn, adsisec, adsiver, ast_adsi_begin_download(), ast_adsi_data_mode(), ast_adsi_display(), ast_adsi_download_disconnect(), ast_adsi_end_download(), ast_adsi_load_session(), ast_adsi_load_soft_key(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), ast_debug, buf, mbox(), and NULL.
Referenced by adsi_begin().
|
static |
Definition at line 7871 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_DIR_FROM_LEFT, ADSI_JUST_CENT, ADSI_JUST_LEFT, ADSI_KEY_APPS, adsi_logo(), ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_input_control(), ast_adsi_input_format(), ast_adsi_load_soft_key(), ast_adsi_set_keys(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), and buf.
Referenced by vm_authenticate().
|
static |
Definition at line 7714 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, ast_adsi_display(), and buf.
Referenced by adsi_goodbye(), adsi_load_vmail(), adsi_login(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().
|
static |
Definition at line 7948 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_JUST_LEFT, ADSI_KEY_APPS, ADSI_KEY_SKT, ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_keys(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), ast_callerid_parse(), ast_copy_string(), ast_mutex_lock, ast_mutex_unlock, ast_strlen_zero(), buf, buf1, buf2, vm_state::curbox, vm_state::curmsg, vm_state::deleted, vm_state::fn, vm_state::lastmsg, name, NULL, PATH_MAX, and strsep().
Referenced by play_message(), and vm_execmain().
|
static |
Definition at line 7897 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_DIR_FROM_LEFT, ADSI_JUST_LEFT, ADSI_KEY_APPS, ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_input_control(), ast_adsi_input_format(), ast_adsi_set_keys(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), and buf.
Referenced by vm_authenticate().
|
static |
Definition at line 8102 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_JUST_LEFT, ADSI_KEY_APPS, ADSI_KEY_SKT, ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_keys(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), buf, buf1, buf2, vm_state::lastmsg, vm_state::newmessages, and vm_state::oldmessages.
Referenced by vm_execmain().
|
static |
Definition at line 8149 of file app_voicemail_imap.c.
References ADSI_COMM_PAGE, ADSI_JUST_LEFT, ADSI_KEY_APPS, ADSI_KEY_SKT, ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_keys(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), buf, buf1, buf2, vm_state::curbox, and vm_state::lastmsg.
Referenced by vm_execmain().
|
static |
The advanced options within a message.
chan | |
vmu | |
vms | |
msg | |
option | |
record_gain |
Provides handling for the play message envelope, call the person back, or reply to message.
Definition at line 16490 of file app_voicemail_imap.c.
References ast_callerid_parse(), ast_config_destroy(), ast_config_load, ast_log, AST_LOG_WARNING, AST_MAX_EXTENSION, ast_play_and_wait(), ast_strdupa, ast_strlen_zero(), ast_test_suite_event_notify, ast_variable_retrieve(), ast_verb, ast_waitfordigit(), leave_vm_options::beeptone, ast_vm_user::callback, CONFIG_FLAG_NOCACHE, ast_vm_user::context, voicemailpwcheck::context, vm_state::curdir, vm_state::curmsg, dialout(), ast_vm_user::dialout, DISPOSE, find_user(), vm_state::fn, free_user(), vm_state::heard, leave_voicemail(), ast_vm_user::mailbox, voicemailpwcheck::mailbox, make_file(), name, NULL, PATH_MAX, play_message_callerid(), play_message_datetime(), leave_vm_options::record_gain, RETRIEVE, vm_state::starting, valid_config(), and wait_file().
Referenced by vm_execmain().
|
static |
Definition at line 14744 of file app_voicemail_imap.c.
References alias_mailbox_mapping::alias, ao2_alloc, ast_copy_string(), alias_mailbox_mapping::buf, alias_mailbox_mapping::mailbox, voicemailpwcheck::mailbox, and NULL.
Referenced by load_aliases().
AO2_STRING_FIELD_CMP_FN | ( | alias_mailbox_mapping | , |
alias | |||
) |
AO2_STRING_FIELD_CMP_FN | ( | mailbox_alias_mapping | , |
mailbox | |||
) |
AO2_STRING_FIELD_HASH_FN | ( | alias_mailbox_mapping | , |
alias | |||
) |
AO2_STRING_FIELD_HASH_FN | ( | mailbox_alias_mapping | , |
mailbox | |||
) |
|
static |
Definition at line 13342 of file app_voicemail_imap.c.
References apply_options(), ast_copy_string(), ast_log, ast_strdup, ast_strdupa, ast_strlen_zero(), ast_vm_user::context, voicemailpwcheck::context, ast_vm_user::email, find_or_create(), ast_vm_user::fullname, inboxcount2(), LOG_WARNING, ast_vm_user::mailbox, MAX_VM_MAILBOX_LEN, NULL, OPT_PWLOC_SPOOLDIR, ast_vm_user::pager, ast_vm_user::password, ast_vm_user::passwordlocation, PATH_MAX, populate_defaults(), queue_mwi_event(), read_password_from_file(), strsep(), tmp(), and VM_SPOOL_DIR.
Referenced by load_users().
|
static |
Append vmbox info string into given astman with event_name.
Definition at line 14283 of file app_voicemail_imap.c.
References AST_LIST_TRAVERSE, ast_log, ast_vm_mailbox_snapshot_create(), ast_vm_mailbox_snapshot_destroy(), AST_VM_SNAPSHOT_SORT_BY_ID, astman_append(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), ast_vm_user::context, ast_vm_mailbox_snapshot::folders, LOG_ERROR, ast_vm_user::mailbox, ast_vm_msg_snapshot::msg, and NULL.
Referenced by manager_get_mailbox_summary().
|
static |
Append vmu info string into given astman with event_name.
Definition at line 14159 of file app_voicemail_imap.c.
References ast_asprintf, ast_free, ast_log, ast_strlen_zero(), ast_test_flag, astman_append(), ast_vm_user::attachfmt, ast_vm_user::callback, ast_vm_user::context, ast_vm_user::dialout, ast_vm_user::email, errno, ast_vm_user::exit, ast_vm_user::fromstring, fromstring, ast_vm_user::fullname, inboxcount(), ast_vm_user::language, LOG_ERROR, ast_vm_user::mailbox, voicemailpwcheck::mailbox, mailcmd, ast_vm_user::maxmsg, ast_vm_user::maxsecs, NULL, ast_vm_user::pager, ast_vm_user::saydurationm, ast_vm_user::serveremail, serveremail, ast_vm_user::uniqueid, VM_ATTACH, VM_DELETE, VM_ENVELOPE, VM_MARK_URGENT, VM_OPERATOR, VM_REVIEW, VM_SAYCID, ast_vm_user::volgain, and ast_vm_user::zonetag.
Referenced by manager_list_voicemail_users(), and manager_status_voicemail_user().
|
static |
Sets a specific property value.
vmu | The voicemail user object to work with. |
var | The name of the property to be set. |
value | The value to be set to the property. |
The property name must be one of the understood properties. See the source for details.
Definition at line 1525 of file app_voicemail_imap.c.