Skip to content
Snippets Groups Projects
  • cmaj's avatar
    2d67dbfe
    app_voicemail.c: Support multiple file formats for forwarded messages. · 2d67dbfe
    cmaj authored
    If you specify multiple formats in voicemail.conf, eg. "format = gsm|wav"
    and are using realtime ODBC backend, only the first format gets stored
    in the database. So when you forward a message later on, there is a bug
    generating the email, related to the stored format (GSM) being different
    than the desired email format (WAV) specified for the user. Sox can
    handle this, but Asterisk needs to tell sox exactly what to do.
    
    ASTERISK-22192
    
    Change-Id: I7321e7f7e7c58adbf41dd4fd7191c887b9b2eafd
    2d67dbfe
    History
    app_voicemail.c: Support multiple file formats for forwarded messages.
    cmaj authored
    If you specify multiple formats in voicemail.conf, eg. "format = gsm|wav"
    and are using realtime ODBC backend, only the first format gets stored
    in the database. So when you forward a message later on, there is a bug
    generating the email, related to the stored format (GSM) being different
    than the desired email format (WAV) specified for the user. Sox can
    handle this, but Asterisk needs to tell sox exactly what to do.
    
    ASTERISK-22192
    
    Change-Id: I7321e7f7e7c58adbf41dd4fd7191c887b9b2eafd
app_voicemail.c 528.23 KiB
/*
 * Asterisk -- An open source telephony toolkit.
 *
 * Copyright (C) 1999 - 2006, Digium, Inc.
 *
 * Mark Spencer <markster@digium.com>
 *
 * See http://www.asterisk.org for more information about
 * the Asterisk project. Please do not directly contact
 * any of the maintainers of this project for assistance;
 * the project provides a web site, mailing lists and IRC
 * channels for your use.
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License Version 2. See the LICENSE file
 * at the top of the source tree.
 */

/*!
 * \file
 * \author Mark Spencer <markster@digium.com>
 * \brief Comedian Mail - Voicemail System
 *
 * unixODBC (http://www.unixodbc.org/)
 * A source distribution of University of Washington's IMAP c-client
 *         (http://www.washington.edu/imap/)
 *
 * \par See also
 * \arg \ref Config_vm
 * \note For information about voicemail IMAP storage, https://wiki.asterisk.org/wiki/display/AST/IMAP+Voicemail+Storage
 * \ingroup applications
 * \todo This module requires res_adsi to load. This needs to be optional
 * during compilation.
 *
 * \todo This file is now almost impossible to work with, due to all \#ifdefs.
 *       Feels like the database code before realtime. Someone - please come up
 *       with a plan to clean this up.
 */

/*! \li \ref app_voicemail.c uses configuration file \ref voicemail.conf
 * \addtogroup configuration_file Configuration Files
 */

/*!
 * \page voicemail.conf voicemail.conf
 * \verbinclude voicemail.conf.sample
 */

#include "asterisk.h"

#ifdef IMAP_STORAGE
#include <ctype.h>
#include <signal.h>
#include <pwd.h>
#ifdef USE_SYSTEM_IMAP
#include <imap/c-client.h>
#include <imap/imap4r1.h>
#include <imap/linkage.h>
#elif defined (USE_SYSTEM_CCLIENT)
#include <c-client/c-client.h>
#include <c-client/imap4r1.h>
#include <c-client/linkage.h>
#else
#include "c-client.h"
#include "imap4r1.h"
#include "linkage.h"
#endif
#endif

#include "asterisk/paths.h"	/* use ast_config_AST_SPOOL_DIR */