Asterisk - The Open Source Telephony Project
18.5.0
|
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 | baseio |
struct | inprocess |
struct | leave_vm_options |
Options for leaving voicemail with the voicemail() application. More... | |
struct | mailbox_alias_mapping |
struct | test_files |
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 | BASELINELEN 72 |
#define | BASEMAXINLINE 256 |
#define | CHECK(u, attr, value) |
#define | CHUNKSIZE 65536 |
#define | COMMAND_TIMEOUT 5000 |
#define | COPY(a, b, c, d, e, f, g, h) (copy_plain_file(g,h)); |
#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 | HVSU_OUTPUT_FORMAT "%-10s %-5s %-25s %-10s %6s\n" |
#define | HVSZ_OUTPUT_FORMAT "%-15s %-20s %-45s\n" |
#define | INTRO "vm-intro" |
#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 | 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_DIRECFORWARD (1 << 10) |
#define | VM_ENVELOPE (1 << 4) |
#define | VM_FORCEGREET (1 << 8) |
#define | VM_FORCENAME (1 << 7) |
#define | VM_FWDURGAUTO (1 << 18) |
#define | VM_MESSAGEWRAP (1 << 17) |
#define | VM_MOVEHEARD (1 << 16) |
#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_SVMAIL (1 << 3) |
#define | VM_TEMPGREETWARN (1 << 15) |
#define | VMSTATE_MAX_MSG_ARRAY 256 |
#define | VOICEMAIL_CONFIG "voicemail.conf" |
#define | VOICEMAIL_DIR_MODE 0777 |
#define | VOICEMAIL_FILE_MODE 0666 |
Enumerations | |
enum | vm_box { NEW_FOLDER = 0, OLD_FOLDER = 1, WORK_FOLDER = 2, FAMILY_FOLDER = 3, FRIENDS_FOLDER = 4, GREETINGS_FOLDER = -1 } |
enum | vm_option_args { OPT_ARG_RECORDGAIN = 0, OPT_ARG_PLAYFOLDER = 1, OPT_ARG_DTMFEXIT = 2, OPT_ARG_BEEP_TONE = 3, OPT_ARG_ARRAY_SIZE = 4 } |
enum | vm_option_flags { OPT_SILENT = (1 << 0), OPT_BUSY_GREETING = (1 << 1), OPT_UNAVAIL_GREETING = (1 << 2), OPT_RECORDGAIN = (1 << 3), OPT_PREPEND_MAILBOX = (1 << 4), OPT_AUTOPLAY = (1 << 6), OPT_DTMFEXIT = (1 << 7), OPT_MESSAGE_Urgent = (1 << 8), OPT_MESSAGE_PRIORITY = (1 << 9), OPT_EARLYM_GREETING = (1 << 10), OPT_BEEP = (1 << 11) } |
enum | vm_passwordlocation { OPT_PWLOC_VOICEMAILCONF = 0, OPT_PWLOC_SPOOLDIR = 1, OPT_PWLOC_USERSCONF = 2 } |
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_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... | |
AST_TEST_DEFINE (test_voicemail_vmuser) | |
AST_TEST_DEFINE (test_voicemail_vmsayname) | |
AST_TEST_DEFINE (test_voicemail_msgcount) | |
AST_TEST_DEFINE (test_voicemail_notify_endl) | |
AST_TEST_DEFINE (test_voicemail_load_config) | |
AST_TEST_DEFINE (test_voicemail_vm_info) | |
static int | base_encode (char *filename, FILE *so) |
Performs a base 64 encode algorithm on the contents of a File. 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_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_frame * | fake_read (struct ast_channel *ast) |
static int | fake_write (struct ast_channel *ast, struct ast_frame *frame) |
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 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_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Reload voicemail configuration from the CLI. More... | |
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_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 | inbuf (struct baseio *bio, FILE *fi) |
utility used by inchar(), for base_encode() More... | |
static int | inchar (struct baseio *bio, FILE *fi) |
utility used by base_encode() 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 (struct ast_vm_user *vmu, 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_from_memory (int reload, struct ast_config *cfg, struct ast_config *ucfg) |
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_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_refresh (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 | 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 | ochar (struct baseio *bio, int c, FILE *so) |
utility used by base_encode() More... | |
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 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 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) |
static int | vm_instructions_en (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int skipadvanced, int in_urgent) |
static int | vm_instructions_ja (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int skipadvanced, int in_urgent) |
static int | vm_instructions_zh (struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int skipadvanced, int in_urgent) |
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_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 FILE * | vm_mkftemp (char *template) |
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 | vm_test_create_user (const char *context, const char *mailbox) |
static int | vm_test_destroy_user (const char *context, const char *mailbox) |
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 = "30ef0c93b36035ec78c9cfd712d36d9b" , .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 }, [ '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 } } |
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.
Definition in file app_voicemail.c.
#define ALIASES_OUTPUT_FORMAT "%-32s %-32s\n" |
Referenced by handle_voicemail_show_aliases().
#define ASTERISK_USERNAME "asterisk" |
Definition at line 512 of file app_voicemail.c.
Referenced by actual_load_config().
#define BASELINELEN 72 |
Definition at line 537 of file app_voicemail.c.
Referenced by ochar().
#define BASEMAXINLINE 256 |
Definition at line 538 of file app_voicemail.c.
Referenced by base_encode(), and inbuf().
#define CHECK | ( | u, | |
attr, | |||
value | |||
) |
Referenced by AST_TEST_DEFINE().
#define CHUNKSIZE 65536 |
Definition at line 509 of file app_voicemail.c.
#define COMMAND_TIMEOUT 5000 |
Definition at line 505 of file app_voicemail.c.
#define COPY | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h | |||
) | (copy_plain_file(g,h)); |
Definition at line 872 of file app_voicemail.c.
Referenced by copy_message(), and save_to_folder().
#define DEFAULT_LISTEN_CONTROL_FORWARD_KEY "#" |
Definition at line 517 of file app_voicemail.c.
Referenced by actual_load_config().
#define DEFAULT_LISTEN_CONTROL_PAUSE_KEY "0" |
Definition at line 519 of file app_voicemail.c.
Referenced by actual_load_config().
#define DEFAULT_LISTEN_CONTROL_RESTART_KEY "2" |
Definition at line 520 of file app_voicemail.c.
Referenced by actual_load_config().
#define DEFAULT_LISTEN_CONTROL_REVERSE_KEY "*" |
Definition at line 518 of file app_voicemail.c.
Referenced by actual_load_config().
#define DEFAULT_LISTEN_CONTROL_STOP_KEY "13456789" |
Definition at line 521 of file app_voicemail.c.
Referenced by actual_load_config().
#define DEFAULT_POLL_FREQ 30 |
By default, poll every 30 seconds
Definition at line 943 of file app_voicemail.c.
Referenced by actual_load_config().
Definition at line 873 of file app_voicemail.c.
Referenced by AST_TEST_DEFINE(), close_mailbox(), notify_new_message(), play_record_review(), and vm_tempgreeting().
Definition at line 868 of file app_voicemail.c.
Referenced by advanced_options(), AST_TEST_DEFINE(), forward_message(), invent_message(), leave_voicemail(), message_range_and_existence_check(), notify_new_message(), play_message(), play_message_by_id_helper(), play_record_review(), sayname(), vm_intro(), vm_msg_forward(), vm_msg_play(), vm_msg_snapshot_create(), vm_options(), and vm_tempgreeting().
#define ENDL "\n" |
Definition at line 542 of file app_voicemail.c.
Referenced by add_email_attachment(), base_encode(), make_email_file(), ochar(), and sendpage().
#define ERROR_LOCK_PATH -100 |
Definition at line 567 of file app_voicemail.c.
Referenced by close_mailbox(), copy_message(), count_messages(), open_mailbox(), play_message_by_id(), resequence_mailbox(), save_to_folder(), vm_exec(), vm_execmain(), vm_mailbox_snapshot_create(), vm_msg_forward(), vm_msg_move(), and vm_msg_remove().
#define ERROR_MAX_MSGS -101 |
Definition at line 568 of file app_voicemail.c.
Referenced by close_mailbox(), and save_to_folder().
Definition at line 870 of file app_voicemail.c.
Referenced by close_mailbox(), copy_message(), resequence_mailbox(), and save_to_folder().
#define HVSU_OUTPUT_FORMAT "%-10s %-5s %-25s %-10s %6s\n" |
Referenced by handle_voicemail_show_users().
#define HVSZ_OUTPUT_FORMAT "%-15s %-20s %-45s\n" |
Referenced by handle_voicemail_show_zones().
#define INTRO "vm-intro" |
Definition at line 528 of file app_voicemail.c.
Referenced by leave_voicemail(), and play_record_review().
#define MAPPING_BUCKETS 511 |
Definition at line 966 of file app_voicemail.c.
Referenced by load_module().
#define MAX_DATETIME_FORMAT 512 |
Definition at line 545 of file app_voicemail.c.
#define MAX_MAIL_BODY_CONTENT_SIZE 134217728L |
Definition at line 530 of file app_voicemail.c.
Referenced by vm_allocate_dh().
#define MAX_NUM_CID_CONTEXTS 10 |
Definition at line 546 of file app_voicemail.c.
Referenced by actual_load_config(), and play_message_callerid().
#define MAX_VM_CONTEXT_LEN (AST_MAX_CONTEXT) |
Definition at line 749 of file app_voicemail.c.
#define MAX_VM_MAILBOX_LEN (MAX_VM_MBOX_ID_LEN + MAX_VM_CONTEXT_LEN) |
Definition at line 751 of file app_voicemail.c.
Referenced by __has_voicemail(), append_mailbox(), and find_user().
#define MAX_VM_MBOX_ID_LEN (AST_MAX_EXTENSION) |
Definition at line 748 of file app_voicemail.c.
#define MAXMSG 100 |
Definition at line 532 of file app_voicemail.c.
Referenced by actual_load_config(), and apply_option().
#define MAXMSGLIMIT 9999 |
Definition at line 533 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), and last_message_index().
#define MINPASSWORD 0 |
Default minimum mailbox password length
Definition at line 535 of file app_voicemail.c.
Referenced by actual_load_config().
#define MSG_ID_LEN 256 |
Definition at line 3739 of file app_voicemail.c.
Referenced by generate_msg_id(), leave_voicemail(), msg_create_from_file(), and vm_msg_snapshot_create().
#define OPERATOR_EXIT 300 |
Definition at line 569 of file app_voicemail.c.
Referenced by leave_voicemail(), vm_exec(), and vm_execmain().
#define PWDCHANGE_EXTERNAL (1 << 2) |
Definition at line 886 of file app_voicemail.c.
Referenced by actual_load_config(), vm_newuser_setup(), and vm_options().
#define PWDCHANGE_INTERNAL (1 << 1) |
Definition at line 885 of file app_voicemail.c.
Referenced by actual_load_config(), vm_newuser_setup(), and vm_options().
#define RENAME | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h | |||
) | (rename_file(g,h)); |
Definition at line 871 of file app_voicemail.c.
Referenced by close_mailbox(), resequence_mailbox(), and save_to_folder().
Definition at line 867 of file app_voicemail.c.
Referenced by advanced_options(), forward_message(), invent_message(), leave_voicemail(), message_range_and_existence_check(), notify_new_message(), play_message(), play_message_by_id_helper(), sayname(), vm_intro(), vm_msg_forward(), vm_msg_play(), vm_msg_snapshot_create(), vm_options(), and vm_tempgreeting().
#define SENDMAIL "/usr/sbin/sendmail -t" |
Definition at line 526 of file app_voicemail.c.
Referenced by actual_load_config().
#define SMDI_MWI_WAIT_TIMEOUT 1000 /* 1 second */ |
Definition at line 503 of file app_voicemail.c.
Referenced by run_externnotify().
Definition at line 869 of file app_voicemail.c.
Referenced by AST_TEST_DEFINE(), copy_message(), forward_message(), leave_voicemail(), msg_create_from_file(), and play_record_review().
#define tdesc "Comedian Mail (Voicemail System)" |
Definition at line 895 of file app_voicemail.c.
Referenced by vm_msg_play().
Definition at line 874 of file app_voicemail.c.
Referenced by add_message_id().
#define VALID_DTMF "1234567890*#" /* Yes ABCD are valid dtmf but what phones have those? */ |
Definition at line 522 of file app_voicemail.c.
Referenced by is_valid_dtmf().
#define VM_ALLOCED (1 << 13) |
Structure was malloc'ed, instead of placed in a return (usually static) buffer
Definition at line 561 of file app_voicemail.c.
Referenced by AST_TEST_DEFINE(), find_user(), find_user_realtime(), free_user(), free_vm_users(), and vm_allocate_dh().
#define VM_ATTACH (1 << 11) |
Attach message to voicemail notifications?
Definition at line 559 of file app_voicemail.c.
Referenced by actual_load_config(), append_vmu_info_astman(), apply_option(), AST_TEST_DEFINE(), forward_message(), notify_new_message(), and sendmail().
#define VM_DELETE (1 << 12) |
Delete message after sending notification
Definition at line 560 of file app_voicemail.c.
Referenced by append_vmu_info_astman(), apply_option(), AST_TEST_DEFINE(), and notify_new_message().
#define VM_DIRECFORWARD (1 << 10) |
Permit caller to use the Directory app for selecting to which mailbox to forward a VM
Definition at line 558 of file app_voicemail.c.
Referenced by actual_load_config(), and forward_message().
#define VM_ENVELOPE (1 << 4) |
Play the envelope information (who-from, time received, etc.)
Definition at line 552 of file app_voicemail.c.
Referenced by actual_load_config(), append_vmu_info_astman(), apply_option(), AST_TEST_DEFINE(), and play_message().
#define VM_FORCEGREET (1 << 8) |
Have new users record their greetings
Definition at line 556 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), vm_execmain(), and vm_newuser_setup().
#define VM_FORCENAME (1 << 7) |
Have new users record their name
Definition at line 555 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), vm_execmain(), and vm_newuser_setup().
#define VM_FWDURGAUTO (1 << 18) |
Autoset of Urgent flag on forwarded Urgent messages set globally
Definition at line 566 of file app_voicemail.c.
Referenced by actual_load_config(), and forward_message().
#define VM_MESSAGEWRAP (1 << 17) |
Wrap around from the last message to the first, and vice-versa
Definition at line 565 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), vm_execmain(), vm_instructions_en(), and vm_instructions_ja().
#define VM_MOVEHEARD (1 << 16) |
Move a "heard" message to Old after listening to it
Definition at line 564 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), and close_mailbox().
#define VM_OPERATOR (1 << 1) |
Allow 0 to be pressed to go to 'o' extension
Definition at line 549 of file app_voicemail.c.
Referenced by actual_load_config(), append_vmu_info_astman(), apply_option(), AST_TEST_DEFINE(), leave_voicemail(), and play_record_review().
#define VM_PBXSKIP (1 << 9) |
Skip the [PBX] preamble in the Subject line of emails
Definition at line 557 of file app_voicemail.c.
Referenced by actual_load_config(), and make_email_file().
#define VM_REVIEW (1 << 0) |
After recording, permit the caller to review the recording before saving
Definition at line 548 of file app_voicemail.c.
Referenced by actual_load_config(), append_vmu_info_astman(), apply_option(), AST_TEST_DEFINE(), and play_record_review().
#define VM_SAYCID (1 << 2) |
Repeat the CallerID info during envelope playback
Definition at line 550 of file app_voicemail.c.
Referenced by actual_load_config(), append_vmu_info_astman(), apply_option(), AST_TEST_DEFINE(), and play_message().
#define VM_SAYDURATION (1 << 5) |
Play the length of the message during envelope playback
Definition at line 553 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), and play_message().
#define VM_SEARCH (1 << 14) |
Search all contexts for a matching mailbox
Definition at line 562 of file app_voicemail.c.
Referenced by actual_load_config(), find_or_create(), find_user(), and find_user_realtime().
#define VM_SKIPAFTERCMD (1 << 6) |
After deletion, assume caller wants to go to the next message
Definition at line 554 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), and vm_execmain().
#define VM_SVMAIL (1 << 3) |
Allow the user to compose a new VM from within VoicemailMain
Definition at line 551 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), and vm_execmain().
#define VM_TEMPGREETWARN (1 << 15) |
Remind user tempgreeting is set
Definition at line 563 of file app_voicemail.c.
Referenced by actual_load_config(), apply_option(), AST_TEST_DEFINE(), and vm_intro().
#define VMSTATE_MAX_MSG_ARRAY 256 |
Definition at line 803 of file app_voicemail.c.
Referenced by vm_allocate_dh().
#define VOICEMAIL_CONFIG "voicemail.conf" |
Definition at line 511 of file app_voicemail.c.
Referenced by load_config(), and vm_change_password().
#define VOICEMAIL_DIR_MODE 0777 |
Definition at line 507 of file app_voicemail.c.
Referenced by create_dirpath(), leave_voicemail(), and msg_create_from_file().
#define VOICEMAIL_FILE_MODE 0666 |
Definition at line 508 of file app_voicemail.c.
Referenced by copy(), leave_voicemail(), msg_create_from_file(), and vm_mkftemp().
enum vm_box |
Enumerator | |
---|---|
NEW_FOLDER | |
OLD_FOLDER | |
WORK_FOLDER | |
FAMILY_FOLDER | |
FRIENDS_FOLDER | |
GREETINGS_FOLDER |
Definition at line 571 of file app_voicemail.c.
enum vm_option_args |
Enumerator | |
---|---|
OPT_ARG_RECORDGAIN | |
OPT_ARG_PLAYFOLDER | |
OPT_ARG_DTMFEXIT | |
OPT_ARG_BEEP_TONE | |
OPT_ARG_ARRAY_SIZE |
Definition at line 594 of file app_voicemail.c.
enum vm_option_flags |
Enumerator | |
---|---|
OPT_SILENT | |
OPT_BUSY_GREETING | |
OPT_UNAVAIL_GREETING | |
OPT_RECORDGAIN | |
OPT_PREPEND_MAILBOX | |
OPT_AUTOPLAY | |
OPT_DTMFEXIT | |
OPT_MESSAGE_Urgent | |
OPT_MESSAGE_PRIORITY | |
OPT_EARLYM_GREETING | |
OPT_BEEP |
Definition at line 580 of file app_voicemail.c.
enum vm_passwordlocation |
Enumerator | |
---|---|
OPT_PWLOC_VOICEMAILCONF | |
OPT_PWLOC_SPOOLDIR | |
OPT_PWLOC_USERSCONF |
Definition at line 603 of file app_voicemail.c.
|
static |
Definition at line 6061 of file app_voicemail.c.
References ao2_find, ao2_ref, ast_strdupa, ast_strlen_zero, c, alias_mailbox_mapping::mailbox, MAX_VM_MAILBOX_LEN, OBJ_SEARCH_KEY, and separate_mailbox().
Referenced by has_voicemail(), inboxcount2(), inprocess_count(), and messagecount().
|
static |
Definition at line 16611 of file app_voicemail.c.
|
static |
Definition at line 16611 of file app_voicemail.c.
|
static |
Definition at line 12679 of file app_voicemail.c.
References 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, context, ast_vm_user::email, find_user(), free_user(), ast_vm_user::fullname, ast_vm_user::language, ast_vm_user::locale, LOG_ERROR, mailbox, messagecount(), NULL, ast_vm_user::pager, parse(), ast_vm_user::password, S_OR, separate_mailbox(), and ast_vm_user::zonetag.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 13680 of file app_voicemail.c.
References 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, ast_vm_user::context, 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, find_or_create(), free_vm_users(), free_vm_zones(), is_valid_dtmf(), load_aliases(), load_users(), load_zonemessages(), LOG_ERROR, ast_vm_user::mailbox, MAX_NUM_CID_CONTEXTS, MAXMSG, MAXMSGLIMIT, MINPASSWORD, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, OPT_PWLOC_SPOOLDIR, OPT_PWLOC_USERSCONF, OPT_PWLOC_VOICEMAILCONF, ast_vm_user::password, ast_vm_user::passwordlocation, PATH_MAX, populate_defaults(), PWDCHANGE_EXTERNAL, PWDCHANGE_INTERNAL, read_password_from_file(), S_OR, SENDMAIL, start_poll_thread(), stop_poll_thread(), strsep(), substitute_escapes(), THRESHOLD_SILENCE, tmp(), VM_ATTACH, VM_DIRECFORWARD, VM_ENVELOPE, VM_FORCEGREET, VM_FORCENAME, VM_FWDURGAUTO, VM_MESSAGEWRAP, VM_MOVEHEARD, VM_OPERATOR, VM_PBXSKIP, VM_REVIEW, VM_SAYCID, VM_SAYDURATION, VM_SEARCH, VM_SKIPAFTERCMD, VM_SVMAIL, and VM_TEMPGREETWARN.
Referenced by load_config(), and load_config_from_memory().
|
static |
Definition at line 5384 of file app_voicemail.c.
References ast_copy_string(), ast_debug, ast_file_is_readable(), ast_log, AST_LOG_WARNING, ast_safe_system(), base_encode(), ast_vm_user::context, create_dirpath(), ENDL, errno, LOG_ERROR, LOG_WARNING, ast_vm_user::mailbox, mkdtemp(), NULL, PATH_MAX, and ast_vm_user::volgain.
Referenced by make_email_file().
|
static |
Definition at line 12356 of file app_voicemail.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 7448 of file app_voicemail.c.
References adsi_load_vmail(), ast_adsi_available(), ast_adsi_load_session(), ast_log, and AST_LOG_WARNING.
Referenced by vm_authenticate(), and vm_execmain().
|
static |
Definition at line 7644 of file app_voicemail.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, vm_state::curmsg, vm_state::deleted, and vm_state::lastmsg.
Referenced by vm_execmain().
|
static |
Definition at line 7513 of file app_voicemail.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(), and ast_adsi_voice_mode().
Referenced by vm_execmain().
|
static |
Definition at line 7799 of file app_voicemail.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(), and ast_adsi_voice_mode().
Referenced by vm_execmain().
|
static |
Definition at line 7319 of file app_voicemail.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, ADSI_JUST_LEFT, ADSI_KEY_APPS, adsi_logo(), ADSI_MSG_DISPLAY, ADSI_MSG_DOWNLOAD, 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, mbox(), and NULL.
Referenced by adsi_begin().
|
static |
Definition at line 7465 of file app_voicemail.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(), and ast_adsi_voice_mode().
Referenced by vm_authenticate().
|
static |
Definition at line 7311 of file app_voicemail.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, and ast_adsi_display().
Referenced by adsi_goodbye(), adsi_load_vmail(), adsi_login(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().
|
static |
Definition at line 7542 of file app_voicemail.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, 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 7491 of file app_voicemail.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(), and ast_adsi_voice_mode().
Referenced by vm_authenticate().
|
static |
Definition at line 7696 of file app_voicemail.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(), buf1, buf2, vm_state::lastmsg, vm_state::newmessages, and vm_state::oldmessages.
Referenced by vm_execmain().
|
static |
Definition at line 7743 of file app_voicemail.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(), 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 15305 of file app_voicemail.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, context, ast_vm_user::context, vm_state::curdir, vm_state::curmsg, ast_vm_user::dialout, dialout(), DISPOSE, find_user(), vm_state::fn, free_user(), vm_state::heard, leave_voicemail(), ast_vm_user::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 13588 of file app_voicemail.c.
References alias_mailbox_mapping::alias, ao2_alloc, ast_copy_string(), alias_mailbox_mapping::buf, alias_mailbox_mapping::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 12425 of file app_voicemail.c.
References apply_options(), ast_copy_string(), ast_log, ast_strdup, ast_strdupa, ast_strlen_zero, ast_vm_user::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(), and tmp().
Referenced by load_users().
|
static |
Append vmu info string into given astman with event_name.
Definition at line 13227 of file app_voicemail.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, ast_vm_user::fullname, inboxcount(), ast_vm_user::language, LOG_ERROR, mailbox, ast_vm_user::mailbox, ast_vm_user::maxmsg, ast_vm_user::maxsecs, NULL, ast_vm_user::pager, ast_vm_user::saydurationm, ast_vm_user::serveremail, ast_vm_user::uniqueid, VM_ATTACH, VM_DELETE, VM_ENVELOPE, 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 1252 of file app_voicemail.c.
References apply_options(), ast_copy_string(), ast_free, ast_log, AST_LOG_WARNING, ast_set2_flag, ast_strdup, ast_true(), ast_vm_user::attachfmt, ast_vm_user::callback, ast_vm_user::dialout, ast_vm_user::emailbody, ast_vm_user::emailsubject, ast_vm_user::exit, ast_vm_user::fromstring, ast_vm_user::language, ast_vm_user::locale, LOG_WARNING, ast_vm_user::maxdeletedmsg, MAXMSG, ast_vm_user::maxmsg, MAXMSGLIMIT, ast_vm_user::maxsecs, ast_vm_user::minsecs, OPT_PWLOC_SPOOLDIR, OPT_PWLOC_VOICEMAILCONF, ast_vm_user::passwordlocation, ast_vm_user::saydurationm, ast_vm_user::serveremail, substitute_escapes(), VM_ATTACH, VM_DELETE, VM_ENVELOPE, VM_FORCEGREET, VM_FORCENAME, VM_MESSAGEWRAP, VM_MOVEHEARD, VM_OPERATOR, VM_REVIEW, VM_SAYCID, VM_SAYDURATION, VM_SKIPAFTERCMD, VM_SVMAIL, VM_TEMPGREETWARN, vmmaxsecs, vmminsecs, ast_vm_user::volgain, and ast_vm_user::zonetag.
Referenced by apply_options(), and apply_options_full().
|
static |
Destructively Parse options and apply.
Definition at line 1507 of file app_voicemail.c.
References apply_option(), ast_strdupa, strsep(), value, and var.
Referenced by append_mailbox(), apply_option(), and AST_TEST_DEFINE().
|
static |
Loads the options specific to a voicemail user.
This is called when a vm_user structure is being set up, such as from load_options.
Definition at line 1526 of file app_voicemail.c.
References apply_option(), ast_copy_string(), ast_free, ast_log, ast_strdup, ast_strlen_zero, ast_vm_user::context, ast_vm_user::email, ast_vm_user::emailbody, ast_vm_user::emailsubject, ast_vm_user::fullname, LOG_WARNING, ast_vm_user::mailbox, ast_variable::name, ast_variable::next, ast_vm_user::pager, ast_vm_user::password, substitute_escapes(), ast_vm_user::uniqueid, ast_variable::value, and var.
Referenced by actual_load_config(), find_user_realtime(), and vm_allocate_dh().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 16611 of file app_voicemail.c.
|
static |
Encode a string according to the MIME rules for encoding strings that are not 7-bit clean or contain control characters.
Additionally, if the encoded string would exceed the MIME limit of 76 characters per line, then the encoding will be broken up into multiple sections, separated by a space character, in order to facilitate breaking up the associated header across multiple lines.
end | An expandable buffer for holding the result |
maxlen | Always zero, but see |
start | A string to be encoded |
preamble | The length of the first line already used for this string, to ensure that each line maintains a maximum length of 76 chars. |
postamble | the length of any additional characters appended to the line, used to ensure proper field wrapping. |
The | encoded string. |
Definition at line 5029 of file app_voicemail.c.
References ast_str_alloca, ast_str_append(), ast_str_buffer(), ast_str_reset(), ast_str_set(), and ast_str_strlen().
Referenced by make_email_file(), and sendpage().
|
static |
Wraps a character sequence in double quotes, escaping occurences of quotes within the string.
from | The string to work with. |
buf | The buffer into which to write the modified quoted string. |
maxlen | Always zero, but see |
Definition at line 4957 of file app_voicemail.c.
References ast_str_append(), ast_str_buffer(), and ast_str_set().
Referenced by make_email_file(), and sendpage().
AST_TEST_DEFINE | ( | test_voicemail_vmuser | ) |
Definition at line 12486 of file app_voicemail.c.
References apply_options(), ast_calloc, ast_set_flag, AST_TEST_FAIL, ast_test_flag, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_vm_user::attachfmt, ast_vm_user::callback, ast_vm_user::dialout, ast_vm_user::emailbody, ast_vm_user::emailsubject, ast_vm_user::exit, free_user(), ast_vm_user::fromstring, sip_to_pjsip::info(), ast_vm_user::maxdeletedmsg, ast_vm_user::maxsecs, ast_vm_user::minsecs, OPT_PWLOC_SPOOLDIR, ast_vm_user::passwordlocation, populate_defaults(), ast_vm_user::saydurationm, ast_vm_user::serveremail, TEST_EXECUTE, TEST_INIT, VM_ALLOCED, VM_ATTACH, VM_DELETE, VM_ENVELOPE, VM_FORCEGREET, VM_FORCENAME, VM_MESSAGEWRAP, VM_MOVEHEARD, VM_OPERATOR, VM_REVIEW, VM_SAYCID, VM_SAYDURATION, VM_SKIPAFTERCMD, VM_SVMAIL, VM_TEMPGREETWARN, ast_vm_user::volgain, and ast_vm_user::zonetag.
AST_TEST_DEFINE | ( | test_voicemail_vmsayname | ) |
Definition at line 14480 of file app_voicemail.c.
References ao2_ref, ast_channel_alloc, ast_channel_nativeformats_set(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_tech_set(), ast_channel_unlock, ast_config_AST_DATA_DIR, ast_fileexists(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_gsm, ast_hangup(), ast_log, AST_LOG_WARNING, AST_STATE_DOWN, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, create_dirpath(), errno, fake_read(), fake_write(), sip_to_pjsip::info(), LOG_WARNING, NULL, PATH_MAX, TEST_CONTEXT, TEST_EXECUTE, TEST_EXTENSION, TEST_INIT, vmsayname_exec(), and ast_channel_tech::write.
AST_TEST_DEFINE | ( | test_voicemail_msgcount | ) |
Definition at line 14576 of file app_voicemail.c.
References ast_alloca, ast_app_has_voicemail(), ast_app_inboxcount(), ast_app_inboxcount2(), ast_app_messagecount(), ast_channel_unref, ast_config_AST_DATA_DIR, ast_dummy_channel_alloc, ast_fileexists(), ast_free, ast_safe_system(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_unreplace_sigchld(), create_dirpath(), DELETE, vm_state::deleted, DISPOSE, find_or_create(), find_user(), free_user(), vm_state::heard, sip_to_pjsip::info(), make_file(), NULL, open_mailbox(), populate_defaults(), STORE, TEST_EXECUTE, TEST_INIT, and test_files::txtfile.
AST_TEST_DEFINE | ( | test_voicemail_notify_endl | ) |
Definition at line 14748 of file app_voicemail.c.
References ARRAY_LEN, ast_clear_flag, ast_config_AST_DATA_DIR, ast_set_flag, ast_strdup, AST_TEST_FAIL, ast_test_flag, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_vm_user::email, ast_vm_user::emailbody, ast_vm_user::emailsubject, errno, make_ari_stubs::file, find_or_create(), find_user(), ast_vm_user::flags, free_user(), sip_to_pjsip::info(), make_email_file(), name, NULL, ast_vm_user::password, populate_defaults(), ast_vm_user::serveremail, TEST_EXECUTE, TEST_INIT, type, and VM_ATTACH.
AST_TEST_DEFINE | ( | test_voicemail_load_config | ) |
Definition at line 14858 of file app_voicemail.c.
References ast_config_destroy(), ast_config_load, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, CHECK, cleanup(), config_filename, CONFIG_FLAG_NOCACHE, make_ari_stubs::file, sip_to_pjsip::info(), load_config(), load_config_from_memory(), ast_vm_user::mailbox, NULL, TEST_EXECUTE, TEST_INIT, and valid_config().
AST_TEST_DEFINE | ( | test_voicemail_vm_info | ) |
Definition at line 14935 of file app_voicemail.c.
References acf_vm_info(), ARRAY_LEN, ast_channel_unref, ast_copy_string(), ast_dummy_channel_alloc, ast_strdup, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_vm_user::email, find_or_create(), find_user(), free_user(), ast_vm_user::fullname, sip_to_pjsip::info(), ast_vm_user::language, ast_vm_user::locale, NULL, ast_vm_user::pager, ast_vm_user::password, populate_defaults(), TEST_EXECUTE, TEST_INIT, and ast_vm_user::zonetag.
|
static |
Performs a base 64 encode algorithm on the contents of a File.
filename | The path to the file to be encoded. Must be readable, file is opened in read mode. |
so | A FILE handle to the output file to receive the base 64 encoded contents of the input file, identified by filename. |
TODO: shouldn't this (and the above 3 support functions) be put into some kind of external utility location, such as funcs/func_base64.c ?
Definition at line 4835 of file app_voicemail.c.
References ast_log, AST_LOG_WARNING, BASEMAXINLINE, c, ENDL, errno, inchar(), baseio::iocp, and ochar().
Referenced by add_email_attachment().
|
static |
Performs a change of the voicemail passowrd in the realtime engine.
vmu | The voicemail user to change the password for. |
password | The new value to be set to the password for this user. |
This only works if there is a realtime engine configured. This is called from the (top level) vm_change_password.
Definition at line 1485 of file app_voicemail.c.
References ast_copy_string(), ast_realtime_require_field(), ast_test_suite_event_notify, ast_update2_realtime(), ast_vm_user::context, ast_vm_user::mailbox, ast_vm_user::password, RQ_CHAR, and SENTINEL.
Referenced by vm_change_password().
|
static |
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.
Definition at line 5002 of file app_voicemail.c.
References str.
Referenced by make_email_file(), and sendpage().
|
static |
Check that password meets minimum required length.
vmu | The voicemail user to change the password for. |
password | The password string to check |
Definition at line 1444 of file app_voicemail.c.
References ast_debug, ast_log, AST_LOG_NOTICE, AST_LOG_WARNING, ast_strlen_zero, buf, ast_vm_user::context, ast_vm_user::mailbox, ast_vm_user::password, and vm_check_password_shell().
Referenced by vm_newuser_setup(), and vm_options().
|
static |
Definition at line 9152 of file app_voicemail.c.
References ast_check_realtime(), ast_debug, ast_free, ast_log, AST_LOG_NOTICE, AST_LOG_WARNING, ast_mutex_lock, ast_mutex_unlock, ast_test_flag, ast_unlock_path(), ast_vm_user::context, vm_state::curbox, vm_state::curdir, vm_state::curmsg, DELETE, vm_state::deleted, vm_state::dh_arraysize, done, ERROR_LOCK_PATH, ERROR_MAX_MSGS, EXISTS, vm_state::fn, vm_state::heard, last_message_index(), vm_state::lastmsg, ast_vm_user::mailbox, make_file(), ast_vm_user::maxdeletedmsg, NULL, PATH_MAX, RENAME, save_to_folder(), vm_lock_path(), and VM_MOVEHEARD.
Referenced by play_message_by_id(), vm_allocate_dh(), vm_execmain(), vm_mailbox_snapshot_create(), vm_msg_forward(), vm_msg_move(), vm_msg_play(), and vm_msg_remove().
|
static |
Definition at line 12845 of file app_voicemail.c.
References AST_LIST_TRAVERSE, ast_strdup, ast_vm_user::context, ast_vm_user::list, and NULL.
Referenced by handle_voicemail_show_users().
|
static |
Utility function to copy a file.
infile | The path to the file to be copied. The file must be readable, it is opened in read only mode. |
outfile | The path for which to copy the file to. The directory permissions must allow the creation (or truncation) of the file, and allow for opening the file in write only mode. |
When the compiler option HARDLINK_WHEN_POSSIBLE is set, the copy operation will attempt to use the hard link facility instead of copy the file (to save disk space). If the link operation fails, it falls back to the copy operation. The copy operation copies up to 4096 bytes at once.
Definition at line 4629 of file app_voicemail.c.
References ast_log, AST_LOG_WARNING, errno, len(), and VOICEMAIL_FILE_MODE.
Referenced by __bt_ret(), ast_ari_asterisk_update_object(), ast_bucket_file_copy(), ast_dns_test_write_domain(), ast_func_read(), ast_func_read2(), ast_func_write(), ast_sip_for_each_aor(), ast_sip_sanitize_xml(), ast_sip_session_add_supplements(), ast_sorcery_copy(), ast_sorcery_object_set_copy_handler(), AST_TEST_DEFINE(), authenticate_api_key(), check_nonce(), config_hook_exec(), copy_plain_file(), crypto_get_attrib(), handle_updates(), iax2_register(), module_load_error(), parse_hint_device(), parse_hint_presence(), play_message(), process_dahdi(), reload_followme(), vm_allocate_dh(), and vm_forwardoptions().
|
static |
Copies a message from one mailbox to another.
chan | |
vmu | |
imbox | |
msgnum | |
duration | |
recip | |
fmt | |
dir | |
flag,dest_folder | This is only used by file storage based mailboxes. |
Definition at line 5982 of file app_voicemail.c.
References ast_channel_caller(), ast_channel_language(), ast_copy_string(), ast_log, AST_LOG_ERROR, AST_LOG_NOTICE, ast_strlen_zero, ast_unlock_path(), ast_vm_user::context, COPY, copy_plain_file(), create_dirpath(), ERROR_LOCK_PATH, EXISTS, ast_party_caller::id, inprocess_count(), last_message_index(), ast_vm_user::mailbox, make_dir(), make_file(), mbox(), ast_party_id::name, notify_new_message(), NULL, ast_party_id::number, PATH_MAX, S_COR, STORE, ast_party_name::str, ast_party_number::str, ast_party_name::valid, ast_party_number::valid, vm_delete(), and vm_lock_path().
Referenced by forward_message(), leave_voicemail(), vm_allocate_dh(), and vm_msg_forward().
|
static |
Copies a voicemail information (envelope) file.
frompath | |
topath | Every voicemail has the data (.wav) file, and the information file. This function performs the file system copying of the information file for a voicemail, handling the internal fields and their values. This is used by the COPY macro when not using IMAP storage. |
Definition at line 4694 of file app_voicemail.c.
References ast_check_realtime(), ast_filecopy(), ast_load_realtime(), ast_store_realtime(), ast_variables_destroy(), copy(), exten, ast_variable::name, ast_variable::next, NULL, PATH_MAX, priority, SENTINEL, tmp(), ast_variable::value, and var.
Referenced by copy_message().
|
static |
Find all .txt files - even if they are not in sequence from 0000.
vmu | |
dir | This method is used when mailboxes are stored on the filesystem. (not ODBC and not IMAP). |
Definition at line 4524 of file app_voicemail.c.
References ast_unlock_path(), ERROR_LOCK_PATH, NULL, and vm_lock_path().
Referenced by leave_voicemail(), msg_create_from_file(), and open_mailbox().
|
static |
basically mkdir -p $dest/$context/$ext/$folder
dest | String. base directory. |
len | Length of dest. |
context | String. Ignored if is null or empty string. |
ext | String. Ignored if is null or empty string. |
folder | String. Ignored if is null or empty string. |
Definition at line 1948 of file app_voicemail.c.
References ast_log, AST_LOG_WARNING, ast_mkdir(), make_dir(), and VOICEMAIL_DIR_MODE.
Referenced by add_email_attachment(), AST_TEST_DEFINE(), copy_message(), invent_message(), leave_voicemail(), msg_create_from_file(), open_mailbox(), save_to_folder(), and vm_allocate_dh().
|
static |
Definition at line 15233 of file app_voicemail.c.
References ast_channel_context(), ast_channel_context_set(), ast_channel_exten_set(), ast_channel_priority_set(), ast_copy_string(), ast_play_and_wait(), ast_readstring(), ast_strlen_zero, ast_test_suite_event_notify, ast_verb, and ast_waitfordigit().
Referenced by advanced_options(), and vm_execmain().
|
static |
Definition at line 14475 of file app_voicemail.c.
References ast_null_frame.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 14470 of file app_voicemail.c.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 12385 of file app_voicemail.c.
References ast_calloc, ast_copy_string(), AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_log, ast_strlen_zero, ast_test_flag, ast_vm_user::context, ast_vm_user::list, LOG_WARNING, ast_vm_user::mailbox, NULL, and VM_SEARCH.
Referenced by actual_load_config(), append_mailbox(), AST_TEST_DEFINE(), and vm_test_create_user().
|
static |
Finds a voicemail user from the users file or the realtime engine.
ivm | |
context | |
mailbox |
Definition at line 1658 of file app_voicemail.c.
References ao2_find, ao2_ref, ast_alloca, ast_calloc, ast_free, AST_LIST_LOCK, AST_LIST_NEXT, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_set2_flag, ast_strdup, ast_strdupa, ast_strlen_zero, ast_test_flag, ast_vm_user::email, ast_vm_user::emailbody, ast_vm_user::emailsubject, find_user_realtime(), ast_vm_user::list, alias_mailbox_mapping::mailbox, MAX_VM_MAILBOX_LEN, NULL, OBJ_SEARCH_KEY, S_OR, separate_mailbox(), VM_ALLOCED, and VM_SEARCH.
Referenced by acf_vm_info(), advanced_options(), AST_TEST_DEFINE(), forward_message(), leave_voicemail(), manager_status_voicemail_user(), mb_poll_thread(), msg_create_from_file(), play_message_by_id(), vm_allocate_dh(), vm_authenticate(), vm_execmain(), vm_mailbox_snapshot_create(), vm_msg_forward(), vm_msg_move(), vm_msg_play(), and vm_msg_remove().
|
static |
Finds a voicemail user from the realtime engine.
ivm | |
context | |
mailbox | This is called as a fall through case when the normal find_user() was not able to find a user. That is, the default it so look in the usual voicemail users file first. |
Definition at line 1617 of file app_voicemail.c.
References apply_options_full(), ast_calloc, ast_copy_string(), ast_free, ast_load_realtime(), ast_set_flag, ast_test_flag, ast_variables_destroy(), ast_vm_user::mailbox, NULL, populate_defaults(), retval, SENTINEL, var, VM_ALLOCED, and VM_SEARCH.
Referenced by find_user().
|
static |
Sends a voicemail message to a mailbox recipient.
chan | |
context | |
vms | |
sender | |
fmt | |
is_new_message | Used to indicate the mode for which this method was invoked. Will be 0 when called to forward an existing message (option 8) Will be 1 when called to leave a message (option 3->5) |
record_gain | |
urgent | Reads the destination mailbox(es) from keypad input for CID, or if use_directory feature is enabled, the Directory. |
When in the leave message mode (is_new_message == 1):
When in the forward message mode (is_new_message == 0):
Definition at line 8269 of file app_voicemail.c.
References ast_channel_caller(), ast_channel_context(), ast_channel_context_set(), ast_channel_exten(), ast_channel_exten_set(), ast_channel_language(), ast_channel_priority(), ast_channel_priority_set(), ast_clear_flag, ast_config_destroy(), ast_config_load, ast_copy_string(), ast_fileexists(), ast_filerename(), AST_LIST_EMPTY, AST_LIST_HEAD_NOLOCK_STATIC, AST_LIST_INSERT_HEAD, AST_LIST_REMOVE_CURRENT, AST_LIST_REMOVE_HEAD, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, AST_LOG_ERROR, AST_LOG_WARNING, AST_MAX_EXTENSION, ast_play_and_wait(), ast_readstring(), ast_say_digit_str(), ast_strdupa, ast_stream_and_wait(), ast_streamfile(), ast_strlen_zero, ast_test_flag, ast_test_suite_event_notify, ast_variable_retrieve(), ast_waitfordigit(), leave_vm_options::beeptone, CONFIG_FLAG_NOCACHE, CONFIG_STATUS_FILEINVALID, ast_vm_user::context, copy_message(), vm_state::curbox, vm_state::curdir, vm_state::curmsg, DISPOSE, done, find_user(), vm_state::fn, free_user(), inboxcount(), inprocess_count(), leave_voicemail(), LOG_ERROR, LOG_NOTICE, ast_vm_user::mailbox, make_file(), ast_vm_user::maxmsg, name, NULL, PATH_MAX, pbx_exec(), pbx_findapp(), leave_vm_options::record_gain, RETRIEVE, run_externnotify(), S_COR, S_OR, sendmail(), serveremail, STORE, strsep(), vm_state::username, VM_ATTACH, VM_DIRECFORWARD, vm_forwardoptions(), and VM_FWDURGAUTO.
Referenced by vm_execmain().
|
static |
Definition at line 1990 of file app_voicemail.c.
References ast_free, ast_test_flag, ast_vm_user::email, ast_vm_user::emailbody, ast_vm_user::emailsubject, NULL, and VM_ALLOCED.
Referenced by acf_vm_info(), advanced_options(), AST_TEST_DEFINE(), forward_message(), free_user_final(), leave_voicemail(), manager_status_voicemail_user(), mb_poll_thread(), msg_create_from_file(), play_message_by_id(), vm_allocate_dh(), vm_authenticate(), vm_execmain(), vm_mailbox_snapshot_create(), vm_msg_forward(), vm_msg_move(), vm_msg_play(), and vm_msg_remove().
|
static |
Definition at line 2008 of file app_voicemail.c.
References ast_delete_mwi_state_full(), ast_strlen_zero, ast_vm_user::context, free_user(), ast_vm_user::mailbox, and NULL.
Referenced by free_vm_users().
|
static |
Free the users structure.
Definition at line 13470 of file app_voicemail.c.
References AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, ast_set_flag, free_user_final(), ast_vm_user::list, and VM_ALLOCED.
Referenced by actual_load_config(), and unload_module().
|
static |
Free the zones structure.
Definition at line 13482 of file app_voicemail.c.
References AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, free_zone(), and vm_zone::list.
Referenced by actual_load_config(), and unload_module().
|
static |
Definition at line 5770 of file app_voicemail.c.
References ast_copy_string(), ast_free, ast_log, AST_LOG_WARNING, ast_odbc_prepare_and_execute(), ast_odbc_release_obj(), ast_odbc_request_obj, ast_strdupa, ast_strlen_zero, context, generic_prepare(), has_voicemail(), inboxcount2(), LOG_WARNING, mailbox, mailboxes, messagecount(), odbc_obj::next, NULL, parse(), PATH_MAX, separate_mailbox(), strsep(), and tmp().
Referenced by free_vm_zones().
|
static |
Sets the destination string to a uniquely identifying msg_id string.
dst | pointer to a character buffer that should contain MSG_ID_LEN characters. |
Definition at line 6291 of file app_voicemail.c.
References ast_atomic_fetchadd_int(), MSG_ID_LEN, and NULL.
Referenced by add_message_id(), leave_voicemail(), and msg_create_from_file().
|
static |
Gets the current date and time, as formatted string.
s | The buffer to hold the output formatted date. |
len | the length of the buffer. Used to prevent buffer overflow in ast_strftime. |
The date format string used is "%a %b %e %r UTC %Y".
Definition at line 5726 of file app_voicemail.c.
References ast_localtime(), ast_strftime(), and ast_tvnow().
Referenced by leave_voicemail(), and msg_create_from_file().
|
static |
get_folder: Folder menu Plays "press 1 for INBOX messages" etc. Should possibly be internationalized
Definition at line 7819 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_fileexists(), ast_play_and_wait(), ast_say_number(), ast_test_suite_event_notify, ast_verb, ast_waitfordigit(), d, mbox(), NULL, PATH_MAX, and vm_play_folder_name().
Referenced by get_folder2().
|
static |
plays a prompt and waits for a keypress.
chan | |
fn | the name of the voice prompt file to be played. For example, 'vm-changeto', 'vm-savefolder' |
start | Does not appear to be used at this time. |
This is used by the main menu option to move a message to a folder or to save a message into a folder. After playing the message identified by the fn parameter value, it calls get_folder(), which plays the prompting for the number inputs that correspond to the available folders.
Definition at line 7904 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), ast_test_suite_event_notify, get_folder(), and get_folder_ja().
Referenced by vm_execmain().
|
static |
Definition at line 1977 of file app_voicemail.c.
References ARRAY_LEN.
Referenced by play_message(), save_to_folder(), vm_allocate_dh(), vm_execmain(), vm_mailbox_snapshot_create(), vm_msg_forward(), vm_msg_move(), vm_msg_play(), and vm_msg_remove().
|
static |
Definition at line 7865 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_play_and_wait(), ast_say_number(), ast_waitfordigit(), d, mbox(), NULL, and vm_play_folder_name().
Referenced by get_folder2().
|
static |
Reload voicemail configuration from the CLI.
Definition at line 13020 of file app_voicemail.c.
References ast_cli_args::argc, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, load_config(), NULL, and ast_cli_entry::usage.
|
static |
Show a list of voicemail zones in the CLI.
Definition at line 12980 of file app_voicemail.c.
References alias_mailbox_mapping::alias, ALIASES_OUTPUT_FORMAT, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli_args::argc, ast_cli(), ast_strlen_zero, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, alias_mailbox_mapping::mailbox, NULL, and ast_cli_entry::usage.
|
static |
Show a list of voicemail users in the CLI.
Definition at line 12868 of file app_voicemail.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_check_realtime(), ast_cli(), AST_LIST_EMPTY, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_strlen_zero, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_voicemail_show_users(), ast_vm_user::context, ast_cli_args::fd, ast_vm_user::fullname, HVSU_OUTPUT_FORMAT, inboxcount(), ast_cli_args::line, ast_vm_user::list, ast_vm_user::mailbox, ast_cli_args::n, NULL, ast_cli_args::pos, show_users_realtime(), ast_cli_entry::usage, ast_cli_args::word, and ast_vm_user::zonetag.
|
static |
Show a list of voicemail zones in the CLI.
Definition at line 12944 of file app_voicemail.c.
References ast_cli_args::argc, ast_cli(), AST_LIST_EMPTY, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, HVSZ_OUTPUT_FORMAT, vm_zone::list, vm_zone::msg_format, vm_zone::name, NULL, vm_zone::timezone, and ast_cli_entry::usage.
|
static |
Determines if the given folder has messages.
mailbox | The @ delimited string for user@context. If no context is found, uses 'default' for the context. |
folder | the folder to look in |
This function is used when the mailbox is stored in a filesystem back end. This invokes the __has_voicemail(). Here we are interested in the presence of messages (> 0) only, not the actual count.
Definition at line 6124 of file app_voicemail.c.
References __has_voicemail(), ast_copy_string(), ast_strlen_zero, context, strsep(), and tmp().
Referenced by ast_app_has_voicemail(), free_zone(), and vm_allocate_dh().
|
static |
Definition at line 6224 of file app_voicemail.c.
References inboxcount2().
Referenced by append_vmu_info_astman(), ast_app_inboxcount(), forward_message(), handle_voicemail_show_users(), leave_voicemail(), and msg_create_from_file().
|
static |
Check the given mailbox's message count.
mailbox | The @ delimited string for user. If no context is found, uses 'default' for the context. |
urgentmsgs | urgent message count. |
newmsgs | new message count. |
oldmsgs | old message count pointer |
Definition at line 6154 of file app_voicemail.c.
References __has_voicemail(), ast_copy_string(), ast_strlen_zero, context, NULL, strsep(), and tmp().
Referenced by append_mailbox(), ast_app_inboxcount2(), free_zone(), inboxcount(), poll_subscribed_mailbox(), run_externnotify(), and vm_allocate_dh().
|
static |
utility used by inchar(), for base_encode()
Definition at line 4770 of file app_voicemail.c.
References baseio::ateof, BASEMAXINLINE, baseio::iobuf, baseio::iocp, and baseio::iolen.
Referenced by analys_(), ast_eivr_getvariable(), ast_eivr_setvariable(), inchar(), lpfilt_(), netconsole(), preemp_(), sip_addheader(), sip_removeheader(), and term_strip().
|
static |
utility used by base_encode()
Definition at line 4794 of file app_voicemail.c.
References inbuf(), baseio::iobuf, baseio::iocp, and baseio::iolen.
Referenced by base_encode().
|
static |
Definition at line 1124 of file app_voicemail.c.
References CMP_MATCH, inprocess::context, and inprocess::mailbox.
Referenced by load_module().
|
static |
Definition at line 1133 of file app_voicemail.c.
References __has_voicemail(), ao2_alloc, ao2_find, ao2_link, ao2_lock, ao2_ref, ao2_unlock, ast_alloca, ast_atomic_fetchadd_int(), ast_copy_string(), ast_log, context, inprocess::context, inprocess::count, LOG_WARNING, mailbox, inprocess::mailbox, and NULL.
Referenced by copy_message(), forward_message(), leave_voicemail(), msg_create_from_file(), and vm_allocate_dh().
|
static |
Definition at line 1118 of file app_voicemail.c.
References inprocess::mailbox.
Referenced by load_module().
|
static |
Definition at line 5736 of file app_voicemail.c.
References ast_channel_language(), ast_fileexists(), ast_log, AST_LOG_WARNING, ast_say_digit_str(), ast_stream_and_wait(), create_dirpath(), DISPOSE, NULL, PATH_MAX, and RETRIEVE.
Referenced by leave_voicemail().
|
static |
Determines if a DTMF key entered is valid.
key | The character to be compared. expects a single character. Though is capable of handling a string, this is internally copies using ast_strdupa. |
Tests the character entered against the set of valid DTMF characters.
Definition at line 1592 of file app_voicemail.c.
References ast_log, AST_LOG_WARNING, ast_strdupa, and VALID_DTMF.
Referenced by actual_load_config().
|
static |
Determines the highest message number in use for a given user and mailbox folder.
vmu | |
dir | the folder the mailbox folder to look for messages. Used to construct the SQL where clause. |
This method is used when mailboxes are stored on the filesystem. (not ODBC and not IMAP). Typical use to set the msgnum would be to take the value returned from this method and add one to it.
Definition at line 4578 of file app_voicemail.c.
References ast_debug, map, ast_vm_user::maxmsg, and MAXMSGLIMIT.
Referenced by close_mailbox(), copy_message(), leave_voicemail(), msg_create_from_file(), open_mailbox(), and save_to_folder().
|
static |
Prompts the user and records a voicemail to a mailbox.
chan | |
ext | |
options | OPT_BUSY_GREETING, OPT_UNAVAIL_GREETING |
Definition at line 6601 of file app_voicemail.c.
References ast_answer(), ast_callerid_merge(), ast_canmatch_extension(), ast_channel_caller(), ast_channel_context(), ast_channel_context_set(), ast_channel_exten(), ast_channel_exten_set(), ast_channel_language(), ast_channel_lock, ast_channel_macrocontext(), ast_channel_name(), ast_channel_priority(), ast_channel_priority_set(), ast_channel_redirecting(), ast_channel_unlock, ast_check_realtime(), ast_copy_string(), ast_debug, ast_destroy_realtime(), ast_exists_extension(), ast_filedelete(), ast_fileexists(), ast_filerename(), ast_free, ast_log, AST_LOG_ERROR, AST_LOG_NOTICE, AST_LOG_WARNING, ast_mutex_lock, ast_mutex_unlock, ast_play_and_wait(), ast_set_flag, AST_STATE_UP, ast_stopstream(), ast_store_realtime(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strdupa, ast_stream_and_wait(), ast_streamfile(), ast_strlen_zero, ast_test_flag, ast_unlock_path(), ast_update_realtime(), ast_verb, ast_waitstream(), leave_vm_options::beeptone, context, ast_vm_user::context, copy_message(), count_messages(), create_dirpath(), DISPOSE, errno, ast_vm_user::exit, leave_vm_options::exitcontext, exten, find_user(), free_user(), generate_msg_id(), get_date(), inboxcount(), inprocess_count(), INTRO, invent_message(), last_message_index(), LOG_WARNING, ast_vm_user::mailbox, make_file(), ast_vm_user::maxmsg, ast_vm_user::maxsecs, ast_vm_user::minsecs, MSG_ID_LEN, name, vm_state::newmessages, notify_new_message(), NULL, OPERATOR_EXIT, OPT_BUSY_GREETING, OPT_DTMFEXIT, OPT_MESSAGE_PRIORITY, OPT_MESSAGE_Urgent, OPT_SILENT, OPT_UNAVAIL_GREETING, PATH_MAX, pbx_builtin_getvar_helper(), pbx_builtin_setvar_helper(), play_record_review(), priority, leave_vm_options::record_gain, RETRIEVE, S_COR, S_OR, SENTINEL, STORE, strsep(), transfer, vm_lock_path(), VM_OPERATOR, VOICEMAIL_DIR_MODE, and VOICEMAIL_FILE_MODE.
Referenced by advanced_options(), forward_message(), and vm_exec().
|
static |
Definition at line 13606 of file app_voicemail.c.
References alias_mailbox_mapping_create(), ao2_link, ao2_ref, ast_strlen_zero, ast_variable_browse(), ast_variable::name, ast_variable::next, ast_variable::value, and var.
Referenced by actual_load_config().
|
static |
Definition at line 13538 of file app_voicemail.c.
References actual_load_config(), ast_clear_flag, ast_config_destroy(), ast_config_load, ast_log, ast_unload_realtime(), CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, LOG_ERROR, NULL, and VOICEMAIL_CONFIG.
Referenced by AST_TEST_DEFINE(), handle_voicemail_reload(), load_module(), and reload().
|
static |
Definition at line 13580 of file app_voicemail.c.
References actual_load_config(), and ast_unload_realtime().
Referenced by AST_TEST_DEFINE().
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS.
If a dependency, allocation or environment variable fails tests, return AST_MODULE_LOAD_FAILURE.
If the module can't load the configuration file, can't register as a provider or has another issue not fatal to Asterisk itself, return AST_MODULE_LOAD_DECLINE.
On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 15123 of file app_voicemail.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_cleanup, ao2_container_alloc_hash, ao2_container_register(), ao2_container_unregister(), ARRAY_LEN, ast_cli_register_multiple, ast_config_AST_SPOOL_DIR, ast_custom_function_register, ast_install_vm_test_functions(), ast_log, AST_LOG_WARNING, ast_manager_register_xml, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_realtime_require_field(), ast_register_application_xml, ast_taskprocessor_get(), AST_TEST_REGISTER, ast_vm_greeter_register, ast_vm_register, EVENT_FLAG_CALL, EVENT_FLAG_REPORTING, EVENT_FLAG_USER, inprocess_cmp_fn(), inprocess_hash_fn(), load_config(), LOG_ERROR, manager_list_voicemail_users(), manager_status_voicemail_user(), manager_voicemail_refresh(), MAPPING_BUCKETS, NULL, print_mappings(), RQ_CHAR, RQ_UINTEGER3, SENTINEL, unload_module(), vm_exec(), vm_execmain(), vm_playmsgexec(), vm_test_create_user(), vm_test_destroy_user(), vmauthenticate(), and vmsayname_exec().
Referenced by vm_msg_play().
|
static |
Definition at line 13660 of file app_voicemail.c.
References append_mailbox(), ast_category_browse(), ast_variable_browse(), ast_variable::name, ast_variable::next, NULL, ast_variable::value, and var.
Referenced by actual_load_config().
|
static |
Definition at line 13625 of file app_voicemail.c.
References ast_copy_string(), ast_free, AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, AST_LOG_WARNING, ast_malloc, ast_variable_browse(), ast_variable::lineno, vm_zone::list, vm_zone::msg_format, ast_variable::name, vm_zone::name, ast_variable::next, strsep(), vm_zone::timezone, ast_variable::value, and var.
Referenced by actual_load_config().
|
static |
Creates a file system path expression for a folder within the voicemail data folder and the appropriate context.
dest | The variable to hold the output generated path expression. This buffer should be of size PATH_MAX. |
len | The length of the path string that was written out. |
context | |
ext | |
folder | The path is constructed as VM_SPOOL_DIRcontext/ext/folder |
Definition at line 1902 of file app_voicemail.c.
Referenced by copy_message(), create_dirpath(), make_email_file(), notify_new_message(), and prep_email_sub_vars().
|
static |
Creates the email file to be sent to indicate a new voicemail exists for a user.
p | The output file to generate the email contents into. |
srcemail | The email address to send the email to, presumably the email address for the owner of the mailbox. |
vmu | The voicemail user who is sending the voicemail. |
msgnum | The message index in the mailbox folder. |
context | |
mailbox | The voicemail box to read the voicemail to be notified in this email. |
fromfolder | |
cidnum | The caller ID number. |
cidname | The caller ID name. |
attach | the name of the sound file to be attached to the email, if attach_user_voicemail == 1. |
attach2 | |
format | The message sound file format. i.e. .wav |
duration | The time of the message content, in seconds. |
attach_user_voicemail | if 1, the sound file is attached to the email. |
chan | |
category | |
imap | if == 1, indicates the target folder for the email notification to be sent to will be an IMAP mailstore. This causes additional mailbox headers to be set, which would facilitate searching for the email in the destination IMAP folder. |
flag,msg_id | The email body, and base 64 encoded attachement (if any) are stored to the file identified by *p. This method does not actually send the email. That is done by invoking the configure 'mailcmd' and piping this generated file into it, or with the sendemail() function. |
Definition at line 5085 of file app_voicemail.c.
References add_email_attachment(), ast_channel_priority(), ast_channel_unref, ast_config_destroy(), ast_config_load, ast_copy_string(), ast_debug, ast_dummy_channel_alloc, ast_free, ast_localtime(), ast_log, AST_LOG_WARNING, ast_random(), ast_str_buffer(), ast_str_create, ast_str_encode_mime(), ast_str_quote(), ast_str_set(), ast_str_substitute_variables(), ast_strdupa, ast_strftime(), ast_strftime_locale(), ast_strlen_zero, ast_test_flag, ast_variable_retrieve(), check_mime(), CONFIG_FLAG_NOCACHE, ast_vm_user::context, email, ast_vm_user::email, ast_vm_user::emailbody, emailbody, ast_vm_user::emailsubject, emailsubject, ENDL, ast_vm_user::fromstring, fromstring, ast_vm_user::fullname, host, ast_vm_user::locale, ast_vm_user::mailbox, make_dir(), make_file(), MAXHOSTNAMELEN, NULL, prep_email_sub_vars(), S_OR, strip_control_and_high(), strsep(), valid_config(), VM_PBXSKIP, and vmu_tm().
Referenced by AST_TEST_DEFINE(), sendmail(), and vm_allocate_dh().
|
static |
Creates a file system path expression for a folder within the voicemail data folder and the appropriate context.
dest | The variable to hold the output generated path expression. This buffer should be of size PATH_MAX. |
len | The length of the path string that was written out. |
dir | |
num | The path is constructed as VM_SPOOL_DIRcontext/ext/folder |
Definition at line 1919 of file app_voicemail.c.
Referenced by advanced_options(), AST_TEST_DEFINE(), close_mailbox(), copy_message(), forward_message(), leave_voicemail(), make_email_file(), message_range_and_existence_check(), msg_create_from_file(), notify_new_message(), play_message(), play_message_by_id_helper(), prep_email_sub_vars(), resequence_mailbox(), save_to_folder(), vm_allocate_dh(), vm_execmain(), vm_forwardoptions(), vm_msg_forward(), vm_msg_play(), and vm_msg_snapshot_create().
|
static |
Manager list voicemail users command.
Definition at line 13428 of file app_voicemail.c.
References append_vmu_info_astman(), AST_LIST_EMPTY, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), ast_vm_user::list, LOG_ERROR, NULL, and RESULT_SUCCESS.
Referenced by load_module().
|
static |
Definition at line 13344 of file app_voicemail.c.
References ast_strlen_zero, astman_get_header(), NULL, poll_subscribed_mailbox(), and ast_mwi_state::uniqueid.
Referenced by manager_voicemail_refresh().
|
static |
Definition at line 13382 of file app_voicemail.c.
References append_vmu_info_astman(), ast_log, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), find_user(), free_user(), LOG_ERROR, NULL, and RESULT_SUCCESS.
Referenced by load_module().
|
static |
Definition at line 13375 of file app_voicemail.c.
References ast_mwi_state_callback_all(), astman_send_ack(), manager_match_mailbox(), and RESULT_SUCCESS.
Referenced by load_module().
|
static |
Definition at line 13074 of file app_voicemail.c.
References ast_cond_timedwait, ast_mutex_lock, ast_mutex_unlock, ast_mwi_state_callback_subscribed(), ast_samp2tv(), ast_strdupa, ast_strlen_zero, ast_tvadd(), ast_tvnow(), context, find_user(), free_user(), mailbox, NULL, poll_lock, poll_subscribed_mailbox(), RAII_VAR, separate_mailbox(), and ast_mwi_state::uniqueid.
Referenced by start_poll_thread().
|
static |
Definition at line 1961 of file app_voicemail.c.
Referenced by add_peer_mailboxes(), adsi_load_vmail(), copy_message(), get_folder(), get_folder_ja(), notify_new_message(), open_mailbox(), save_to_folder(), vm_allocate_dh(), vm_execmain(), and vm_index_to_foldername().
|
static |
common bounds checking and existence check for Voicemail API functions.
This is called by vm_msg_move, vm_msg_remove, and vm_msg_forward to ensure that data passed in are valid. This ensures that given the desired message IDs, they can be found.
vms | The voicemail state corresponding to an open mailbox |
msg_ids | An array of message identifiers |
num_msgs | The number of identifiers in msg_ids |
msg_nums | [out] The message indexes corresponding to the given |
vmu | message IDs |
-1 | Failure |
0 | Success |
Definition at line 16082 of file app_voicemail.c.
References ast_config_destroy(), ast_config_load, ast_strlen_zero, ast_variable_retrieve(), CONFIG_FLAG_NOCACHE, CONFIG_STATUS_FILEINVALID, ast_vm_user::context, vm_state::curdir, vm_state::curmsg, DISPOSE, done, vm_state::fn, vm_state::lastmsg, ast_vm_user::mailbox, make_file(), PATH_MAX, and RETRIEVE.
Referenced by play_message_by_id_helper(), vm_msg_forward(), vm_msg_move(), vm_msg_play(), and vm_msg_remove().
|
static |
Definition at line 6048 of file app_voicemail.c.
References __has_voicemail(), ast_strdupa, ast_strlen_zero, context, mailbox, and separate_mailbox().
Referenced by acf_vm_info(), ast_app_messagecount(), free_zone(), and vm_allocate_dh().
|
static |
Definition at line 6315 of file app_voicemail.c.
References ast_check_realtime(), ast_closestream(), ast_debug, ast_destroy_realtime(), ast_filecopy(), ast_filedelete(), ast_fileexists(), ast_filerename(), ast_log, AST_LOG_ERROR, AST_LOG_WARNING, ast_ratestream(), ast_readfile(), ast_seekstream(), ast_store_realtime(), ast_strdupa, ast_tellstream(), ast_unlock_path(), ast_vm_recording_data::call_callerchan, ast_vm_recording_data::call_callerid, ast_vm_recording_data::call_context, ast_vm_recording_data::call_extension, ast_vm_recording_data::call_macrocontext, ast_vm_recording_data::call_priority, ast_vm_recording_data::context, ast_vm_user::context, count_messages(), create_dirpath(), errno, find_user(), ast_vm_recording_data::folder, free_user(), generate_msg_id(), get_date(), inboxcount(), inprocess_count(), last_message_index(), LOG_ERROR, LOG_NOTICE, LOG_WARNING, ast_vm_recording_data::mailbox, ast_vm_user::mailbox, make_file(), ast_vm_user::maxmsg, MSG_ID_LEN, vm_state::newmessages, notify_new_state(), NULL, PATH_MAX, ast_vm_recording_data::recording_ext, ast_vm_recording_data::recording_file, S_OR, SENTINEL, STORE, vm_lock_path(), VOICEMAIL_DIR_MODE, and VOICEMAIL_FILE_MODE.
|
static |
Definition at line 13181 of file app_voicemail.c.
References ao2_ref, ast_mwi_subscriber_data(), ast_taskprocessor_push(), and mwi_handle_subscribe2().
|
static |
Definition at line 13174 of file app_voicemail.c.
References ao2_ref, NULL, and poll_subscribed_mailbox().
Referenced by mwi_handle_subscribe().
|
static |
Definition at line 13163 of file app_voicemail.c.
References ao2_ref, ast_mwi_subscriber_data(), ast_taskprocessor_push(), and mwi_handle_unsubscribe2().
|
static |
Definition at line 13144 of file app_voicemail.c.
References ao2_ref, ast_delete_mwi_state_full(), NULL, and ast_mwi_state::uniqueid.
Referenced by mwi_handle_unsubscribe().
|
static |
Sends email notification that a user has a new voicemail waiting for them.
chan | |
vmu | |
vms | |
msgnum | |
duration | |
fmt | |
cidnum | The Caller ID phone number value. |
cidname | The Caller ID name value. |
flag |
Definition at line 8155 of file app_voicemail.c.
References ast_app_has_voicemail(), ast_app_inboxcount2(), ast_channel_lock, ast_channel_uniqueid(), ast_channel_unlock, ast_config_destroy(), ast_config_load, ast_log, AST_LOG_WARNING, ast_strdupa, ast_strlen_zero, ast_test_flag, ast_variable_retrieve(), ast_vm_user::attachfmt, CONFIG_FLAG_NOCACHE, CONFIG_STATUS_FILEINVALID, ast_vm_user::context, vm_state::curmsg, DELETE, DISPOSE, ast_vm_user::email, ast_vm_user::mailbox, make_dir(), make_file(), mbox(), vm_state::newmessages, NULL, ast_vm_user::pager, PATH_MAX, pbx_builtin_getvar_helper(), queue_mwi_event(), RETRIEVE, run_externnotify(), sendmail(), sendpage(), ast_vm_user::serveremail, serveremail, strsep(), VM_ATTACH, VM_DELETE, and vm_delete().
Referenced by copy_message(), and leave_voicemail().
|
static |
Definition at line 16131 of file app_voicemail.c.
References ast_app_inboxcount2(), ast_vm_user::context, ast_vm_user::mailbox, NULL, queue_mwi_event(), and run_externnotify().
Referenced by msg_create_from_file(), vm_msg_forward(), vm_msg_move(), vm_msg_play(), and vm_msg_remove().
|
static |
utility used by base_encode()
Definition at line 4807 of file app_voicemail.c.
References BASELINELEN, ENDL, and baseio::linelength.
Referenced by base_encode().
|
static |
Definition at line 9099 of file app_voicemail.c.
References ast_copy_string(), ast_log, AST_LOG_ERROR, ast_unlock_path(), ast_vm_user::context, count_messages(), create_dirpath(), vm_state::curbox, vm_state::curdir, ERROR_LOCK_PATH, last_message_index(), vm_state::lastmsg, LOG_NOTICE, ast_vm_user::maxmsg, mbox(), resequence_mailbox(), vm_state::username, vm_allocate_dh(), vm_lock_path(), and vm_state::vmbox.
Referenced by AST_TEST_DEFINE(), play_message_by_id(), vm_allocate_dh(), vm_execmain(), vm_mailbox_snapshot_create(), vm_msg_forward(), vm_msg_move(), vm_msg_play(), and vm_msg_remove().
|
static |
Definition at line 8843 of file app_voicemail.c.
References adsi_message(), ast_channel_language(), ast_config_destroy(), ast_config_load, ast_copy_string(), AST_DIGIT_ANY, ast_filedelete(), ast_fileexists(), ast_log, AST_LOG_ERROR, AST_LOG_WARNING, ast_mutex_lock, ast_mutex_unlock, ast_say_number(), ast_strdupa, ast_strlen_zero, ast_test_flag, ast_test_suite_event_notify, ast_variable_retrieve(), CONFIG_FLAG_NOCACHE, context, ast_vm_user::context, copy(), vm_state::curbox, vm_state::curdir, vm_state::curmsg, DISPOSE, make_ari_stubs::file, vm_state::fn, get_folder_by_name(), GREETINGS_FOLDER, vm_state::heard, intro, vm_state::lastmsg, LOG_WARNING, ast_vm_user::mailbox, make_file(), NULL, PATH_MAX, play_message_callerid(), play_message_category(), play_message_datetime(), play_message_duration(), RETRIEVE, ast_vm_user::saydurationm, vm_state::starting, strsep(), valid_config(), VM_ENVELOPE, VM_SAYCID, VM_SAYDURATION, wait_file(), and wait_file2().
Referenced by vm_browse_messages_en(), vm_browse_messages_es(), vm_browse_messages_gr(), vm_browse_messages_he(), vm_browse_messages_it(), vm_browse_messages_ja(), vm_browse_messages_pt(), vm_browse_messages_vi(), vm_browse_messages_zh(), and vm_execmain().
|
static |
Finds a message in a specific mailbox by msg_id and plays it to the channel.
0 | Success |
-1 | Failure |
Definition at line 11402 of file app_voicemail.c.
References ARRAY_LEN, ast_copy_string(), ast_log, close_mailbox(), ERROR_LOCK_PATH, find_user(), free_user(), vm_state::lastmsg, LOG_WARNING, NULL, open_mailbox(), play_message_by_id_helper(), and vm_state::username.
Referenced by vm_playmsgexec().
|
static |
Definition at line 11359 of file app_voicemail.c.
References ast_fileexists(), ast_log, AST_LOG_WARNING, ast_mutex_lock, ast_mutex_unlock, ast_strlen_zero, ast_vm_user::context, vm_state::curdir, vm_state::curmsg, DISPOSE, vm_state::fn, vm_state::heard, ast_vm_user::mailbox, make_file(), message_range_and_existence_check(), NULL, RETRIEVE, and wait_file().
Referenced by play_message_by_id().
|
static |
Definition at line 8716 of file app_voicemail.c.
References ast_callerid_parse(), ast_channel_language(), ast_config_AST_SPOOL_DIR, ast_debug, AST_DIGIT_ANY, ast_fileexists(), ast_say_digit_str(), ast_stream_and_wait(), ast_strlen_zero, ast_verb, MAX_NUM_CID_CONTEXTS, name, NULL, PATH_MAX, and wait_file2().
Referenced by advanced_options(), and play_message().
|
static |
Definition at line 8623 of file app_voicemail.c.
References ast_log, AST_LOG_WARNING, ast_play_and_wait(), and ast_strlen_zero.
Referenced by play_message().
|
static |
Definition at line 8638 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_get_time_t(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_localtime(), ast_log, AST_LOG_WARNING, ast_say_date_with_format, ast_strlen_zero, ast_tvnow(), vm_zone::list, vm_zone::msg_format, vm_zone::name, NULL, pbx_builtin_setvar_helper(), vm_zone::timezone, and ast_vm_user::zonetag.
Referenced by advanced_options(), and play_message().
|
static |
Definition at line 8793 of file app_voicemail.c.
References ast_channel_language(), ast_debug, AST_DIGIT_ANY, ast_play_and_wait(), ast_say_number(), NULL, say_and_wait(), and wait_file2().
Referenced by play_message().
|
static |
Definition at line 15504 of file app_voicemail.c.
References ast_channel_setoption(), ast_copy_string(), AST_DIGIT_ANY, ast_filedelete(), ast_filerename(), ast_log, AST_LOG_WARNING, AST_OPTION_RXGAIN, ast_play_and_record_full(), ast_play_and_wait(), AST_RECORD_IF_EXISTS_OVERWRITE, ast_stream_and_wait(), ast_strlen_zero, ast_test_flag, ast_verb, ast_waitfordigit(), ast_vm_user::context, DELETE, DISPOSE, INTRO, ast_vm_user::mailbox, NULL, PATH_MAX, STORE, vm_exec(), VM_OPERATOR, and VM_REVIEW.
Referenced by leave_voicemail(), vm_forwardoptions(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().
|
static |
Definition at line 13049 of file app_voicemail.c.
References inboxcount2(), ast_mwi_state::new_msgs, NULL, ast_mwi_state::old_msgs, queue_mwi_event(), run_externnotify(), ast_mwi_state::uniqueid, and ast_mwi_state::urgent_msgs.
Referenced by manager_match_mailbox(), mb_poll_thread(), and mwi_handle_subscribe2().
|
static |
Sets default voicemail system options to a voicemail user.
This applies select global settings to a newly created (dynamic) instance of a voicemail user.
Definition at line 1205 of file app_voicemail.c.
References ast_copy_flags, ast_copy_string(), AST_FLAGS_ALL, ast_free, ast_vm_user::callback, ast_vm_user::dialout, ast_vm_user::email, ast_vm_user::emailbody, ast_vm_user::emailsubject, ast_vm_user::exit, ast_vm_user::locale, ast_vm_user::maxdeletedmsg, maxdeletedmsg, ast_vm_user::maxmsg, maxmsg, ast_vm_user::maxsecs, ast_vm_user::minsecs, NULL, ast_vm_user::passwordlocation, passwordlocation, ast_vm_user::saydurationm, saydurationminfo, vmmaxsecs, vmminsecs, ast_vm_user::volgain, volgain, and ast_vm_user::zonetag.
Referenced by actual_load_config(), append_mailbox(), AST_TEST_DEFINE(), find_user_realtime(), vm_allocate_dh(), and vm_test_create_user().
|
static |
Definition at line 4895 of file app_voicemail.c.
References ast_callerid_merge(), ast_callerid_split(), ast_config_destroy(), ast_config_load, ast_debug, ast_localtime(), ast_strdupa, ast_strftime_locale(), ast_strlen_zero, ast_variable_retrieve(), CONFIG_FLAG_NOCACHE, ast_vm_user::context, ast_vm_user::fullname, ast_vm_user::locale, ast_vm_user::mailbox, make_dir(), make_file(), NULL, pbx_builtin_setvar_helper(), S_OR, and valid_config().
Referenced by make_email_file(), and sendpage().
|
static |
Definition at line 15099 of file app_voicemail.c.
References alias_mailbox_mapping::alias, and alias_mailbox_mapping::mailbox.
Referenced by load_module().
|
static |
Definition at line 8110 of file app_voicemail.c.
References mailbox_alias_mapping::alias, aliases, ao2_find, ao2_iterator_destroy(), ao2_iterator_next, ao2_ref, ast_debug, ast_publish_mwi_state_channel, ast_strdupa, ast_strlen_zero, context, mailbox, NULL, OBJ_MULTIPLE, OBJ_SEARCH_KEY, and separate_mailbox().
Referenced by append_mailbox(), notify_new_message(), notify_new_state(), poll_subscribed_mailbox(), and vm_execmain().
|
static |
Definition at line 14396 of file app_voicemail.c.
References ast_config_destroy(), ast_config_load, ast_copy_string(), ast_log, ast_variable_retrieve(), LOG_NOTICE, and valid_config().
Referenced by actual_load_config(), and append_mailbox().
|
static |
|
static |
Renames a message in a mailbox folder.
sfn | The path to the mailbox information and data file to be renamed. |
dfn | The path for where the message data and information files will be renamed to. |
This method is used by the RENAME macro when mailboxes are stored on the filesystem. (not ODBC and not IMAP).
Definition at line 4554 of file app_voicemail.c.
References ast_check_realtime(), ast_filerename(), ast_update_realtime(), NULL, PATH_MAX, and SENTINEL.
|
static |
Definition at line 7177 of file app_voicemail.c.
References ast_unlock_path(), ast_vm_user::context, ERROR_LOCK_PATH, EXISTS, ast_vm_user::mailbox, make_file(), ast_vm_user::maxmsg, NULL, PATH_MAX, RENAME, and vm_lock_path().
Referenced by open_mailbox().
|
static |
Resets a user password to a specified password.
context | |
mailbox | |
newpass | This does the actual change password work, called by the vm_change_password() function. |
Definition at line 1729 of file app_voicemail.c.
References ast_copy_string(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_vm_user::context, ast_vm_user::list, ast_vm_user::mailbox, and ast_vm_user::password.
Referenced by vm_change_password(), and vm_change_password_shell().
|
static |
Definition at line 6234 of file app_voicemail.c.
References ao2_ref, ast_app_has_voicemail(), ast_copy_string(), ast_debug, ast_log, AST_LOG_ERROR, AST_LOG_WARNING, ast_safe_system(), ast_smdi_mwi_message_wait_station(), ast_smdi_mwi_set(), ast_smdi_mwi_unset(), ast_strlen_zero, ast_smdi_mwi_message::cause, ast_smdi_mwi_message::fwd_st, inboxcount2(), NULL, S_OR, and SMDI_MWI_WAIT_TIMEOUT.
Referenced by forward_message(), notify_new_message(), notify_new_state(), poll_subscribed_mailbox(), and vm_execmain().
|
static |
Place a message in the indicated folder
vmu | Voicemail user | |
vms | Current voicemail state for the user | |
msg | The message number to save | |
box | The folder into which the message should be saved | |
[out] | newmsg | The new message number of the saved message |
move | Tells whether to copy or to move the message |
0 | Success |
other | Failure |
Definition at line 7214 of file app_voicemail.c.
References ast_debug, ast_log, AST_LOG_ERROR, AST_LOG_NOTICE, ast_mutex_lock, ast_mutex_unlock, ast_unlock_path(), ast_vm_user::context, COPY, create_dirpath(), vm_state::curbox, vm_state::curdir, ERROR_LOCK_PATH, ERROR_MAX_MSGS, EXISTS, get_folder_by_name(), last_message_index(), ast_vm_user::mailbox, make_file(), ast_vm_user::maxdeletedmsg, ast_vm_user::maxmsg, mbox(), NEW_FOLDER, NULL, OLD_FOLDER, PATH_MAX, RENAME, vm_state::username, and vm_lock_path().
Referenced by close_mailbox(), vm_allocate_dh(), vm_execmain(), and vm_msg_move().
|
static |
Definition at line 7207 of file app_voicemail.c.
References AST_DIGIT_ANY, ast_say_number(), d, and NULL.
Referenced by play_message_duration(), vm_execmain(), vm_intro_cs(), vm_intro_de(), vm_intro_en(), vm_intro_es(), vm_intro_fr(), vm_intro_is(), vm_intro_it(), vm_intro_ja(), vm_intro_nl(), vm_intro_no(), vm_intro_pl(), vm_intro_se(), vm_intro_vi(), and vm_intro_zh().
|
static |
Definition at line 14359 of file app_voicemail.c.
References ast_debug, AST_DIGIT_ANY, ast_fileexists(), ast_stream_and_wait(), DISPOSE, NULL, PATH_MAX, and RETRIEVE.
Referenced by ast_app_sayname(), vm_sayname(), and vmsayname_exec().
|
static |
Definition at line 5520 of file app_voicemail.c.
References ast_debug, ast_log, AST_LOG_WARNING, ast_safe_system(), ast_strdupa, ast_strlen_zero, ast_test_flag, ast_vm_user::email, format, ast_vm_user::mailbox, make_email_file(), NULL, strsep(), VM_ATTACH, and vm_mkftemp().
Referenced by forward_message(), and notify_new_message().
|
static |
Definition at line 5571 of file app_voicemail.c.
References ast_channel_unref, ast_copy_string(), ast_debug, ast_dummy_channel_alloc, ast_free, ast_log, AST_LOG_WARNING, ast_safe_system(), ast_str_buffer(), ast_str_create, ast_str_encode_mime(), ast_str_quote(), ast_str_set(), ast_str_substitute_variables(), ast_strftime(), ast_strftime_locale(), ast_strlen_zero, check_mime(), ENDL, ast_vm_user::fullname, host, ast_vm_user::locale, MAXHOSTNAMELEN, NULL, PATH_MAX, prep_email_sub_vars(), S_OR, strip_control_and_high(), vm_mkftemp(), and vmu_tm().
Referenced by notify_new_message().
|
static |
Definition at line 1094 of file app_voicemail.c.
References ast_strlen_zero, and strsep().
Referenced by __has_voicemail(), acf_vm_info(), find_user(), free_zone(), mb_poll_thread(), messagecount(), queue_mwi_event(), vm_allocate_dh(), vm_sayname(), and vmsayname_exec().
|
static |
Definition at line 12806 of file app_voicemail.c.
References ast_category_browse(), ast_cli(), ast_config_destroy(), ast_load_realtime_multientry(), ast_variable_browse(), CLI_FAILURE, CLI_SUCCESS, ast_variable::name, ast_variable::next, NULL, SENTINEL, ast_variable::value, and var.
Referenced by handle_voicemail_show_users().
|
static |
Definition at line 13197 of file app_voicemail.c.
References ast_log, ast_mwi_add_observer(), ast_pthread_create, LOG_ERROR, mb_poll_thread(), and NULL.
Referenced by actual_load_config().
|
static |
Definition at line 13209 of file app_voicemail.c.
References ast_cond_signal, ast_mutex_lock, ast_mutex_unlock, ast_mwi_remove_observer(), AST_PTHREADT_NULL, NULL, and poll_lock.
Referenced by actual_load_config(), and unload_module().
|
static |
Strips control and non 7-bit clean characters from input string.
Definition at line 1175 of file app_voicemail.c.
Referenced by make_email_file(), and sendpage().
|
static |
Definition at line 13491 of file app_voicemail.c.
References ast_log, AST_LOG_NOTICE, ast_str_append(), ast_str_buffer(), ast_str_reset(), ast_str_thread_get(), and str.
Referenced by actual_load_config(), apply_option(), and apply_options_full().
|
static |
Definition at line 15050 of file app_voicemail.c.
References ao2_cleanup, ao2_container_unregister(), ao2_ref, ARRAY_LEN, ast_cli_unregister_multiple(), ast_custom_function_unregister(), ast_manager_unregister(), ast_mwi_state_callback_all(), AST_PTHREADT_NULL, ast_taskprocessor_unreference(), AST_TEST_UNREGISTER, ast_uninstall_vm_test_functions(), ast_unload_realtime(), ast_unregister_application(), ast_vm_greeter_unregister(), ast_vm_unregister(), free_vm_users(), free_vm_zones(), ast_vm_functions::module_name, ast_vm_greeter_functions::module_name, NULL, and stop_poll_thread().
Referenced by load_module(), and vm_msg_play().
|
inlinestatic |
Check if configuration file is valid.
Definition at line 1751 of file app_voicemail.c.
References CONFIG_STATUS_FILEINVALID.
Referenced by advanced_options(), AST_TEST_DEFINE(), make_email_file(), play_message(), prep_email_sub_vars(), read_password_from_file(), vm_change_password(), and vm_forwardoptions().
|
static |
Definition at line 2021 of file app_voicemail.c.
References apply_options_full(), ast_build_string(), ast_callerid_parse(), ast_calloc, ast_channel_caller(), ast_channel_unref, ast_copy_string(), ast_debug, ast_dummy_channel_alloc, ast_filedelete(), ast_fileexists(), ast_free, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_load_realtime(), ast_log, AST_LOG_ERROR, AST_LOG_NOTICE, AST_LOG_WARNING, ast_malloc, ast_mutex_destroy, ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_party_caller_init(), ast_play_and_wait(), ast_realloc, ast_set_flag, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strdup, ast_strdupa, ast_strlen_zero, ast_variable_retrieve(), ast_variables_destroy(), buf, cid_name, cid_num, close_mailbox(), context, ast_vm_user::context, vm_state::context, copy(), copy_message(), create_dirpath(), vm_state::curbox, vm_state::curdir, vm_state::curmsg, debug, DEBUG_ATLEAST, vm_state::deleted, vm_state::dh_arraysize, ast_vm_user::email, errno, ERROR, ast_vm_user::exit, make_ari_stubs::file, find_user(), vm_state::fn, format, free_user(), get_folder_by_name(), GREETINGS_FOLDER, has_voicemail(), vm_state::heard, ast_party_caller::id, inboxcount2(), inprocess_count(), vm_state::lastmsg, len(), ast_vm_user::list, LOG_DEBUG, LOG_ERROR, LOG_NOTICE, LOG_WARNING, mailbox, ast_vm_user::mailbox, make_email_file(), make_file(), MAX_MAIL_BODY_CONTENT_SIZE, ast_vm_user::maxmsg, mbox(), messagecount(), name, ast_party_id::name, NEW_FOLDER, vm_state::newmessages, NULL, ast_party_id::number, OLD_FOLDER, vm_state::oldmessages, open_mailbox(), PATH_MAX, pbx_builtin_setvar_helper(), populate_defaults(), quote(), S_COR, S_OR, save_to_folder(), separate_mailbox(), ast_vm_user::serveremail, serveremail, status, str, ast_party_name::str, ast_party_number::str, strcasestr(), strsep(), tmp(), vm_state::urgentmessages, usage, user, vm_state::username, ast_party_name::valid, ast_party_number::valid, var, VM_ALLOCED, vm_mkftemp(), vm_state::vmbox, and VMSTATE_MAX_MSG_ARRAY.
Referenced by open_mailbox().
|
static |
Definition at line 11226 of file app_voicemail.c.
References adsi_begin(), adsi_login(), adsi_password(), ast_channel_caller(), ast_channel_context(), ast_channel_language(), ast_copy_string(), ast_debug, ast_exists_extension(), ast_log, AST_LOG_WARNING, AST_MAX_EXTENSION, ast_play_and_wait(), ast_readstring(), ast_stopstream(), ast_streamfile(), ast_strlen_zero, ast_verb, ast_waitstream(), find_user(), free_user(), NULL, password, ast_vm_user::password, and S_COR.
Referenced by vm_execmain(), and vmauthenticate().
|
static |
Top level method to invoke the language variant vm_browse_messages_XX function.
chan | The channel for the current user. We read the language property from this. |
vms | passed into the language-specific vm_browse_messages function. |
vmu | passed into the language-specific vm_browse_messages function. |
The method to be invoked is determined by the value of language code property in the user's channel. The default (when unable to match) is to use english.
Definition at line 11203 of file app_voicemail.c.
References ast_channel_language(), vm_browse_messages_en(), vm_browse_messages_es(), vm_browse_messages_gr(), vm_browse_messages_he(), vm_browse_messages_it(), vm_browse_messages_ja(), vm_browse_messages_pt(), vm_browse_messages_vi(), and vm_browse_messages_zh().
Referenced by vm_execmain().
|
static |
Default English syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 11015 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
Spanish syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 11096 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
Greek syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 10963 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, play_message(), and vm_state::vmbox.
Referenced by vm_browse_messages().
|
static |
Definition at line 10991 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
Italian syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 11043 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
Japanese syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 11069 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
Portuguese syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 11122 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
Vietnamese syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 11176 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
Chinese (Taiwan)syntax for 'You have N messages' greeting.
chan | |
vms | |
vmu |
Definition at line 11148 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::curbox, vm_state::fn, vm_state::lastmsg, and play_message().
Referenced by vm_browse_messages().
|
static |
The handler for the change password option.
vmu | The voicemail user to work with. |
newpassword | The new password (that has been gathered from the appropriate prompting). This is called when a new user logs in for the first time and the option to force them to change their password is set. It is also called when the user wants to change their password from menu option '5' on the mailbox options menu. |
Definition at line 1763 of file app_voicemail.c.
References ast_category_browse(), ast_category_get(), ast_config_destroy(), ast_config_load, ast_config_text_file_save(), ast_copy_string(), ast_debug, ast_free, ast_log, AST_LOG_WARNING, ast_malloc, ast_test_suite_event_notify, ast_variable_append(), ast_variable_new, ast_variable_retrieve(), ast_variable_update(), ast_verb, change_password_realtime(), CONFIG_FLAG_WITHCOMMENTS, ast_vm_user::context, ast_vm_user::mailbox, NULL, OPT_PWLOC_SPOOLDIR, OPT_PWLOC_USERSCONF, OPT_PWLOC_VOICEMAILCONF, ast_vm_user::password, ast_vm_user::passwordlocation, PATH_MAX, reset_user_pw(), tmp(), valid_config(), value, var, VOICEMAIL_CONFIG, and write_password_to_file().
Referenced by vm_newuser_setup(), and vm_options().
|
static |
Definition at line 1876 of file app_voicemail.c.
References ast_copy_string(), ast_debug, ast_safe_system(), ast_test_suite_event_notify, buf, ast_vm_user::context, ast_vm_user::mailbox, ast_vm_user::password, and reset_user_pw().
Referenced by vm_newuser_setup(), and vm_options().
|
static |
Definition at line 1391 of file app_voicemail.c.
References AST_APP_ARG, ast_close_fds_above_n(), AST_DECLARE_APP_ARGS, ast_log, AST_NONSTANDARD_APP_ARGS, ast_safe_fork(), ast_strdupa, buf, errno, and LOG_WARNING.
Referenced by check_password().
|
static |
Removes the voicemail sound and information file.
file | The path to the sound file. This will be the folder and message index, without the extension. |
This is used by the DELETE macro when voicemails are stored on the file system.
Definition at line 4749 of file app_voicemail.c.
References ast_alloca, ast_check_realtime(), ast_destroy_realtime(), ast_filedelete(), NULL, and SENTINEL.
Referenced by copy_message(), and notify_new_message().
|
static |
Definition at line 12278 of file app_voicemail.c.
References args, ast_answer(), AST_APP_ARG, ast_app_getdata(), ast_app_parse_options(), AST_CONTROL_PROGRESS, ast_copy_flags, AST_DECLARE_APP_ARGS, ast_indicate(), ast_log, AST_LOG_ERROR, AST_LOG_WARNING, ast_play_and_wait(), AST_STANDARD_APP_ARGS, AST_STATE_UP, ast_strdupa, ast_strlen_zero, ast_test_flag, leave_vm_options::beeptone, ERROR_LOCK_PATH, leave_vm_options::exitcontext, leave_voicemail(), OPERATOR_EXIT, OPT_ARG_ARRAY_SIZE, OPT_ARG_BEEP_TONE, OPT_ARG_DTMFEXIT, OPT_ARG_RECORDGAIN, OPT_BEEP, OPT_BUSY_GREETING, OPT_DTMFEXIT, OPT_EARLYM_GREETING, OPT_MESSAGE_PRIORITY, OPT_MESSAGE_Urgent, OPT_RECORDGAIN, OPT_SILENT, OPT_UNAVAIL_GREETING, pbx_builtin_setvar_helper(), leave_vm_options::record_gain, tmp(), and vm_app_options.
Referenced by load_module(), and play_record_review().
|
static |
Definition at line 11503 of file app_voicemail.c.
References adsi_begin(), adsi_delete(), adsi_folders(), adsi_goodbye(), adsi_message(), adsi_status(), adsi_status2(), advanced_options(), args, ast_adsi_unload_session(), ast_answer(), AST_APP_ARG, ast_app_inboxcount2(), ast_app_parse_options(), ast_channel_context(), ast_channel_language(), ast_channel_lock, ast_channel_uniqueid(), ast_channel_unlock, ast_copy_string(), ast_debug, AST_DECLARE_APP_ARGS, ast_goto_if_exists(), ast_log, AST_LOG_WARNING, ast_mutex_lock, ast_mutex_unlock, ast_play_and_wait(), ast_set_flag, AST_STANDARD_APP_ARGS, AST_STATE_UP, ast_stopstream(), ast_strdupa, ast_strlen_zero, ast_test_flag, ast_test_suite_event_notify, ast_verb, ast_waitfordigit(), ast_vm_user::callback, close_mailbox(), ast_vm_user::context, vm_state::context, vm_state::curdir, vm_state::curmsg, vm_state::deleted, ast_vm_user::dialout, dialout(), ERROR_LOCK_PATH, find_user(), vm_state::fn, forward_message(), free_user(), get_folder2(), get_folder_by_name(), vm_state::heard, ast_vm_user::language, vm_state::lastmsg, ast_vm_user::mailbox, make_file(), ast_vm_user::maxmsg, mbox(), NEW_FOLDER, vm_state::newmessages, NULL, OLD_FOLDER, vm_state::oldmessages, open_mailbox(), OPERATOR_EXIT, OPT_ARG_ARRAY_SIZE, OPT_ARG_PLAYFOLDER, OPT_ARG_RECORDGAIN, OPT_AUTOPLAY, OPT_PREPEND_MAILBOX, OPT_RECORDGAIN, OPT_SILENT, out, parse(), ast_vm_user::password, play_message(), queue_mwi_event(), vm_state::repeats, run_externnotify(), save_to_folder(), say_and_wait(), vm_state::starting, vm_state::urgentmessages, vm_state::username, vm_app_options, vm_authenticate(), vm_browse_messages(), VM_FORCEGREET, VM_FORCENAME, vm_instructions(), vm_intro(), VM_MESSAGEWRAP, vm_newuser_setup(), vm_options(), vm_play_folder_name(), VM_SKIPAFTERCMD, VM_SVMAIL, and vm_state::vmbox.
Referenced by load_module().
|
static |
presents the option to prepend to an existing message when forwarding it.
chan | |
vmu | |
curdir | |
curmsg | |
vm_fmts | |
context | |
record_gain | |
duration | |
vms | |
flag | Presents a prompt for 1 to prepend the current message, 2 to forward the message without prepending, or * to return to the main menu. |
This is invoked from forward_message() when performing a forward operation (option 8 from main menu).
Definition at line 7948 of file app_voicemail.c.
References ast_category_get(), ast_channel_setoption(), ast_config_destroy(), ast_config_load, ast_config_text_file_save(), ast_filecopy(), ast_filerename(), AST_OPTION_RXGAIN, ast_play_and_prepend(), ast_play_and_wait(), ast_stream_and_wait(), ast_test_suite_event_notify, ast_variable_retrieve(), ast_variable_update(), ast_waitfordigit(), CONFIG_FLAG_NOCACHE, CONFIG_STATUS_FILEINVALID, copy(), make_file(), ast_vm_user::maxsecs, NULL, PATH_MAX, play_record_review(), and valid_config().
Referenced by forward_message().
|
static |
Definition at line 1971 of file app_voicemail.c.
|
static |
Definition at line 10635 of file app_voicemail.c.
References ast_channel_language(), vm_state::starting, vm_instructions_en(), vm_instructions_ja(), and vm_instructions_zh().
Referenced by vm_execmain().
|
static |
Definition at line 10427 of file app_voicemail.c.
References ast_mutex_lock, ast_mutex_unlock, ast_play_and_wait(), ast_test_flag, ast_waitfordigit(), vm_state::curmsg, vm_state::deleted, vm_state::lastmsg, vm_state::newmessages, vm_state::repeats, vm_state::starting, vm_state::urgentmessages, VM_MESSAGEWRAP, vm_play_folder_name(), and vm_state::vmbox.
Referenced by vm_instructions(), and vm_instructions_zh().
|
static |
Definition at line 10515 of file app_voicemail.c.
References ast_mutex_lock, ast_mutex_unlock, ast_play_and_wait(), ast_test_flag, ast_waitfordigit(), vm_state::curmsg, vm_state::deleted, vm_state::lastmsg, vm_state::newmessages, vm_state::repeats, vm_state::starting, vm_state::urgentmessages, VM_MESSAGEWRAP, vm_play_folder_name(), and vm_state::vmbox.
Referenced by vm_instructions().
|
static |
Definition at line 10611 of file app_voicemail.c.
References ast_play_and_wait(), vm_state::lastmsg, vm_state::starting, vm_instructions_en(), vm_play_folder_name(), and vm_state::vmbox.
Referenced by vm_instructions().
|
static |
Definition at line 10361 of file app_voicemail.c.
References ast_channel_language(), ast_fileexists(), ast_log, ast_play_and_wait(), ast_test_flag, ast_vm_user::context, DISPOSE, LOG_WARNING, ast_vm_user::mailbox, NULL, RETRIEVE, vm_state::username, vm_intro_cs(), vm_intro_de(), vm_intro_en(), vm_intro_es(), vm_intro_fr(), vm_intro_gr(), vm_intro_he(), vm_intro_is(), vm_intro_it(), vm_intro_ja(), vm_intro_multilang(), vm_intro_nl(), vm_intro_no(), vm_intro_pl(), vm_intro_pt(), vm_intro_pt_BR(), vm_intro_se(), vm_intro_vi(), vm_intro_zh(), and VM_TEMPGREETWARN.
Referenced by vm_execmain().
|
static |
Definition at line 10231 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9927 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9607 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9976 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 10074 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9367 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_play_and_wait(), ast_say_number(), vm_state::newmessages, NULL, and vm_state::oldmessages.
Referenced by vm_intro().
|
static |
Definition at line 9501 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_play_and_wait(), ast_say_number(), vm_state::newmessages, and vm_state::oldmessages.
Referenced by vm_intro().
|
static |
Definition at line 9664 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9733 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9568 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, and say_and_wait().
Referenced by vm_intro().
|
static |
Definition at line 9461 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_play_and_wait(), ast_say_counted_adjective(), ast_say_counted_noun(), ast_say_number(), vm_state::newmessages, and vm_state::oldmessages.
Referenced by vm_intro().
|
static |
Definition at line 10117 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9883 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9768 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, and say_and_wait().
Referenced by vm_intro().
|
static |
Definition at line 10168 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_play_and_wait(), ast_say_number(), vm_state::newmessages, vm_state::oldmessages, and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 10029 of file app_voicemail.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_play_and_wait(), ast_say_number(), vm_state::newmessages, vm_state::oldmessages, and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 9839 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, say_and_wait(), and vm_state::urgentmessages.
Referenced by vm_intro().
|
static |
Definition at line 10331 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, and say_and_wait().
Referenced by vm_intro().
|
static |
Definition at line 10292 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_state::newmessages, vm_state::oldmessages, and say_and_wait().
Referenced by vm_intro().
|
static |
Lock file path only return failure if ast_lock_path returns 'timeout', not if the path does not exist or any other reason.
Definition at line 3729 of file app_voicemail.c.
References ast_lock_path(), and AST_LOCK_TIMEOUT.
Referenced by close_mailbox(), copy_message(), count_messages(), leave_voicemail(), msg_create_from_file(), open_mailbox(), resequence_mailbox(), and save_to_folder().
|
static |
Definition at line 15931 of file app_voicemail.c.
References ARRAY_LEN, ast_calloc, ast_copy_string(), ast_free, ast_log, AST_LOG_ERROR, AST_LOG_WARNING, ast_strlen_zero, close_mailbox(), ERROR_LOCK_PATH, find_user(), ast_vm_mailbox_snapshot::folders, free_user(), get_folder_by_name(), vm_state::lastmsg, LOG_WARNING, NULL, open_mailbox(), ast_vm_mailbox_snapshot::snapshots, vm_state::username, and vm_msg_snapshot_create().
|
static |
Definition at line 16048 of file app_voicemail.c.
References ast_free, AST_LIST_REMOVE_HEAD, ast_vm_mailbox_snapshot::folders, NULL, ast_vm_mailbox_snapshot::snapshots, and vm_msg_snapshot_destroy().
|
static |
Definition at line 1925 of file app_voicemail.c.
References NULL, and VOICEMAIL_FILE_MODE.
Referenced by sendmail(), sendpage(), and vm_allocate_dh().
|
static |
Definition at line 16142 of file app_voicemail.c.
References ast_alloca, ast_config_destroy(), ast_config_load, ast_copy_string(), ast_log, ast_strlen_zero, ast_variable_retrieve(), close_mailbox(), CONFIG_FLAG_NOCACHE, CONFIG_STATUS_FILEINVALID, ast_vm_user::context, copy_message(), vm_state::curdir, vm_state::deleted, DISPOSE, ERROR_LOCK_PATH, find_user(), vm_state::fn, free_user(), get_folder_by_name(), vm_state::lastmsg, LOG_WARNING, ast_vm_user::mailbox, make_file(), message_range_and_existence_check(), notify_new_state(), NULL, open_mailbox(), PATH_MAX, RETRIEVE, vm_state::username, and value.
|
static |
Definition at line 16285 of file app_voicemail.c.
References ast_alloca, ast_copy_string(), ast_log, ast_strlen_zero, close_mailbox(), vm_state::deleted, ERROR_LOCK_PATH, find_user(), free_user(), get_folder_by_name(), vm_state::lastmsg, LOG_WARNING, message_range_and_existence_check(), notify_new_state(), NULL, open_mailbox(), save_to_folder(), and vm_state::username.
|
static |
Definition at line 16487 of file app_voicemail.c.
References ast_config_destroy(), ast_config_load, ast_copy_string(), ast_fileexists(), ast_log, AST_LOG_WARNING, AST_MODFLAG_DEFAULT, AST_MODULE_INFO(), AST_MODULE_SUPPORT_CORE, ast_strlen_zero, ast_variable_retrieve(), ASTERISK_GPL_KEY, close_mailbox(), CONFIG_FLAG_NOCACHE, CONFIG_STATUS_FILEINVALID, ast_vm_user::context, vm_state::curdir, vm_state::curmsg, DISPOSE, find_user(), vm_state::fn, free_user(), get_folder_by_name(), vm_state::heard, vm_state::lastmsg, load_module(), LOG_WARNING, ast_vm_user::mailbox, make_file(), message_range_and_existence_check(), notify_new_state(), NULL, open_mailbox(), PATH_MAX, RETRIEVE, tdesc, unload_module(), vm_state::username, value, and wait_file().
|
static |
Definition at line 16389 of file app_voicemail.c.
References ast_alloca, ast_copy_string(), ast_log, AST_LOG_ERROR, ast_strlen_zero, close_mailbox(), vm_state::deleted, ERROR_LOCK_PATH, find_user(), free_user(), get_folder_by_name(), vm_state::lastmsg, LOG_WARNING, message_range_and_existence_check(), notify_new_state(), NULL, open_mailbox(), and vm_state::username.
|
static |
Definition at line 15748 of file app_voicemail.c.
References ast_calloc, ast_free, ast_string_field_init, and NULL.
Referenced by vm_msg_snapshot_create().
|
static |
Create and store off all the msgs in an open mailbox.
Definition at line 15816 of file app_voicemail.c.
References add_message_id(), ast_config_destroy(), ast_config_load, AST_LIST_INSERT_BEFORE_CURRENT, AST_LIST_INSERT_HEAD, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, ast_string_field_set, ast_variable_retrieve(), AST_VM_SNAPSHOT_SORT_BY_ID, AST_VM_SNAPSHOT_SORT_BY_TIME, CONFIG_FLAG_NOCACHE, CONFIG_STATUS_FILEINVALID, ast_vm_user::context, vm_state::curdir, vm_state::curmsg, DISPOSE, exten, vm_state::fn, vm_state::lastmsg, LOG_WARNING, ast_vm_user::mailbox, make_file(), MSG_ID_LEN, ast_vm_msg_snapshot::msg_number, ast_vm_msg_snapshot::origtime, PATH_MAX, RETRIEVE, ast_vm_mailbox_snapshot::snapshots, ast_vm_mailbox_snapshot::total_msg_num, value, and vm_msg_snapshot_alloc().
Referenced by vm_mailbox_snapshot_create().
|
static |
Definition at line 15764 of file app_voicemail.c.
References ast_free, ast_string_field_free_memory, and NULL.
Referenced by vm_mailbox_snapshot_destroy().
|
static |
Definition at line 10646 of file app_voicemail.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, adsi_logo(), ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), ast_debug, ast_fileexists(), ast_log, AST_LOG_NOTICE, ast_play_and_wait(), ast_readstring(), ast_strlen_zero, ast_test_flag, ast_test_suite_event_notify, check_password(), ast_vm_user::context, NULL, PATH_MAX, play_record_review(), PWDCHANGE_EXTERNAL, PWDCHANGE_INTERNAL, vm_state::username, vm_change_password(), vm_change_password_shell(), VM_FORCEGREET, and VM_FORCENAME.
Referenced by vm_execmain().
|
static |
Definition at line 10744 of file app_voicemail.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, adsi_logo(), ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), ast_debug, ast_fileexists(), ast_log, AST_LOG_NOTICE, ast_play_and_wait(), ast_readstring(), ast_strlen_zero, ast_test_suite_event_notify, ast_waitfordigit(), check_password(), ast_vm_user::context, DISPOSE, ast_vm_user::mailbox, NULL, ast_vm_user::password, PATH_MAX, play_record_review(), PWDCHANGE_EXTERNAL, PWDCHANGE_INTERNAL, RETRIEVE, vm_state::username, vm_change_password(), vm_change_password_shell(), and vm_tempgreeting().
Referenced by vm_execmain().
|
static |
Definition at line 9328 of file app_voicemail.c.
References ast_channel_language(), ast_play_and_wait(), vm_play_folder_name_gr(), vm_play_folder_name_ja(), vm_play_folder_name_pl(), and vm_play_folder_name_ua().
Referenced by get_folder(), get_folder_ja(), vm_execmain(), vm_instructions_en(), vm_instructions_ja(), and vm_instructions_zh().
|
static |
Definition at line 9268 of file app_voicemail.c.
References ast_alloca, ast_play_and_wait(), and buf.
Referenced by vm_play_folder_name().
|
static |
Definition at line 9286 of file app_voicemail.c.
References ast_play_and_wait().
Referenced by vm_play_folder_name().
|
static |
Definition at line 9299 of file app_voicemail.c.
References ast_play_and_wait().
Referenced by vm_play_folder_name().
|
static |
Definition at line 9315 of file app_voicemail.c.
References ast_play_and_wait().
Referenced by vm_play_folder_name().
|
static |
Definition at line 11464 of file app_voicemail.c.
References args, ast_answer(), AST_APP_ARG, ast_debug, AST_DECLARE_APP_ARGS, AST_STANDARD_APP_ARGS, AST_STATE_UP, ast_strdupa, ast_strlen_zero, NULL, parse(), pbx_builtin_setvar_helper(), and play_message_by_id().
Referenced by load_module().
|
static |
Definition at line 14384 of file app_voicemail.c.
References ast_strdupa, ast_strlen_zero, context, mailbox, sayname(), and separate_mailbox().
|
static |
The handler for 'record a temporary greeting'.
chan | |
vmu | |
vms | |
fmtc | |
record_gain | This is option 4 from the mailbox options menu. This function manages the following promptings: 1: play / record / review the temporary greeting. : invokes play_record_review(). 2: remove (delete) the temporary greeting. *: return to the main menu. |
Definition at line 10888 of file app_voicemail.c.
References ADSI_COMM_PAGE, ADSI_JUST_CENT, adsi_logo(), ADSI_MSG_DISPLAY, ast_adsi_available(), ast_adsi_display(), ast_adsi_set_line(), ast_adsi_transmit_message(), ast_adsi_voice_mode(), ast_fileexists(), ast_play_and_wait(), ast_test_suite_event_notify, ast_waitfordigit(), ast_vm_user::context, DELETE, DISPOSE, ast_vm_user::mailbox, NULL, PATH_MAX, play_record_review(), RETRIEVE, and vm_state::username.
Referenced by vm_options().
|
static |
Definition at line 15792 of file app_voicemail.c.
References find_or_create(), and populate_defaults().
Referenced by load_module().
|
static |
Definition at line 15774 of file app_voicemail.c.
References ast_free, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_vm_user::context, ast_vm_user::list, and ast_vm_user::mailbox.
Referenced by load_module().
|
static |
Definition at line 12765 of file app_voicemail.c.
References ast_channel_context(), ast_copy_string(), ast_goto_if_exists(), AST_MAX_EXTENSION, ast_play_and_wait(), ast_strdupa, ast_strlen_zero, ast_vm_user::context, NULL, options, pbx_builtin_setvar_helper(), strsep(), user, and vm_authenticate().
Referenced by load_module().
|
static |
Definition at line 14446 of file app_voicemail.c.
References ast_channel_language(), ast_debug, AST_DIGIT_ANY, ast_log, AST_SAY_CASE_NONE, ast_say_character_str(), ast_strdupa, ast_stream_and_wait(), ast_strlen_zero, context, LOG_WARNING, mailbox, sayname(), and separate_mailbox().
Referenced by AST_TEST_DEFINE(), and load_module().
|
static |
fill in *tm for current time according to the proper timezone, if any.
Definition at line 4979 of file app_voicemail.c.
References AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_localtime(), ast_strlen_zero, ast_tvnow(), vm_zone::name, NULL, vm_zone::timezone, and ast_vm_user::zonetag.
Referenced by make_email_file(), and sendpage().
|
static |
Definition at line 8617 of file app_voicemail.c.
References ast_control_streamfile(), ast_test_suite_event_notify, and NULL.
Referenced by advanced_options(), play_message(), play_message_by_id_helper(), and vm_msg_play().
|
static |
Definition at line 8609 of file app_voicemail.c.
References AST_DIGIT_ANY, ast_log, AST_LOG_WARNING, and ast_stream_and_wait().
Referenced by play_message(), play_message_callerid(), and play_message_duration().
|
static |
Definition at line 14413 of file app_voicemail.c.
References ast_category_append(), ast_category_destroy(), ast_category_new(), ast_config_destroy(), ast_config_new(), ast_config_text_file_save(), ast_log, ast_variable_append(), ast_variable_new, LOG_ERROR, and var.
Referenced by vm_change_password().
|
static |
Definition at line 16611 of file app_voicemail.c.
|
static |
Definition at line 901 of file app_voicemail.c.
|
static |
Definition at line 1024 of file app_voicemail.c.
|
static |
Definition at line 1025 of file app_voicemail.c.
|
static |
Definition at line 1026 of file app_voicemail.c.
|
static |
Definition at line 967 of file app_voicemail.c.
|
static |
Definition at line 936 of file app_voicemail.c.
|
static |
Definition at line 16611 of file app_voicemail.c.
|
static |
Definition at line 1010 of file app_voicemail.c.
|
static |
Definition at line 1022 of file app_voicemail.c.
|
static |
Definition at line 1013 of file app_voicemail.c.
|
static |
Definition at line 13042 of file app_voicemail.c.
|
static |
Definition at line 1009 of file app_voicemail.c.
Referenced by directory_exec().
|
static |
Definition at line 1016 of file app_voicemail.c.
Referenced by make_email_file(), and message_template_parse_emailbody().
|
static |
Definition at line 1027 of file app_voicemail.c.
|
static |
Definition at line 1017 of file app_voicemail.c.
Referenced by make_email_file().
|
static |
Definition at line 1011 of file app_voicemail.c.
Referenced by common_exec(), and conf_run().
|
static |
Definition at line 881 of file app_voicemail.c.
|
static |
Definition at line 880 of file app_voicemail.c.
|
static |
Definition at line 925 of file app_voicemail.c.
|
static |
Definition at line 1020 of file app_voicemail.c.
Referenced by make_email_file().
|
static |
Definition at line 1005 of file app_voicemail.c.
struct ao2_container* inprocess_container |
Definition at line 1110 of file app_voicemail.c.
|
static |
Definition at line 976 of file app_voicemail.c.
|
static |
Definition at line 978 of file app_voicemail.c.
|
static |
Definition at line 979 of file app_voicemail.c.
|
static |
Definition at line 977 of file app_voicemail.c.
|
static |
Definition at line 980 of file app_voicemail.c.
|
static |
Definition at line 918 of file app_voicemail.c.
Referenced by handle_minivm_list_templates().
|
static |
Definition at line 971 of file app_voicemail.c.
|
static |
Definition at line 623 of file app_voicemail.c.
|
static |
Definition at line 924 of file app_voicemail.c.
|
static |
Definition at line 921 of file app_voicemail.c.
Referenced by populate_defaults().
|
static |
Definition at line 931 of file app_voicemail.c.
|
static |
Definition at line 933 of file app_voicemail.c.
|
static |
Definition at line 920 of file app_voicemail.c.
Referenced by populate_defaults().
|
static |
Definition at line 919 of file app_voicemail.c.
Referenced by ast_record_review().
|
static |
Definition at line 934 of file app_voicemail.c.
|
static |
Definition at line 3742 of file app_voicemail.c.
struct ast_mwi_observer mwi_observer |
Definition at line 13192 of file app_voicemail.c.
|
static |
Definition at line 952 of file app_voicemail.c.
|
static |
Definition at line 883 of file app_voicemail.c.
|
static |
Definition at line 1018 of file app_voicemail.c.
|
static |
Definition at line 1028 of file app_voicemail.c.
|
static |
Definition at line 1021 of file app_voicemail.c.
|
static |
Definition at line 1019 of file app_voicemail.c.
|
static |
Definition at line 935 of file app_voicemail.c.
Referenced by populate_defaults().
|
static |
Definition at line 911 of file app_voicemail.c.
|
static |
Definition at line 948 of file app_voicemail.c.
|
static |
Polling frequency
Definition at line 945 of file app_voicemail.c.
|
static |
Definition at line 947 of file app_voicemail.c.
Referenced by mb_poll_thread(), and stop_poll_thread().
|
static |
Poll mailboxes for changes since there is something external to app_voicemail that may change them.
Definition at line 940 of file app_voicemail.c.
|
static |
Definition at line 949 of file app_voicemail.c.
|
static |
Definition at line 950 of file app_voicemail.c.
|
static |
Definition at line 887 of file app_voicemail.c.
|
static |
Definition at line 1007 of file app_voicemail.c.
Referenced by populate_defaults().
|
static |
Definition at line 913 of file app_voicemail.c.
|
static |
Definition at line 923 of file app_voicemail.c.
Referenced by forward_message(), notify_new_message(), and vm_allocate_dh().
|
static |
Definition at line 922 of file app_voicemail.c.
Referenced by ast_record_review(), and setup_privacy_args().
|
static |
Definition at line 932 of file app_voicemail.c.
Referenced by controlplayback_exec(), handle_controlstreamfile(), and stasis_app_control_play_uri().
|
static |
Definition at line 926 of file app_voicemail.c.
|
static |
|
static |
Definition at line 899 of file app_voicemail.c.
|
static |
Definition at line 621 of file app_voicemail.c.
Referenced by vm_exec(), and vm_execmain().
|
static |
Definition at line 15038 of file app_voicemail.c.
|
static |
Definition at line 12760 of file app_voicemail.c.
|
static |
Definition at line 990 of file app_voicemail.c.
|
static |
Definition at line 983 of file app_voicemail.c.
|
static |
Definition at line 989 of file app_voicemail.c.
|
static |
Definition at line 986 of file app_voicemail.c.
|
static |
Definition at line 984 of file app_voicemail.c.
|
static |
Definition at line 987 of file app_voicemail.c.
|
static |
Definition at line 985 of file app_voicemail.c.
|
static |
Definition at line 991 of file app_voicemail.c.
|
static |
Definition at line 1003 of file app_voicemail.c.
|
static |
Definition at line 988 of file app_voicemail.c.
|
static |
Definition at line 878 of file app_voicemail.c.
|
static |
Definition at line 15020 of file app_voicemail.c.
Referenced by __ast_vm_greeter_register(), __ast_vm_register(), and ast_vm_test_swap_table_in().
|
static |
Definition at line 909 of file app_voicemail.c.
|
static |
Definition at line 927 of file app_voicemail.c.
|
static |
Definition at line 930 of file app_voicemail.c.
Referenced by apply_option(), and populate_defaults().
|
static |
Definition at line 929 of file app_voicemail.c.
Referenced by apply_option(), and populate_defaults().
|
static |
Definition at line 904 of file app_voicemail.c.
|
static |
Definition at line 907 of file app_voicemail.c.
|
static |
Definition at line 928 of file app_voicemail.c.
Referenced by populate_defaults().
|
static |
|
static |
Definition at line 917 of file app_voicemail.c.
Referenced by build_peer().