Skip to content
Snippets Groups Projects
chan_unistim.c 203.30 KiB
/*
 * Asterisk -- An open source telephony toolkit.
 *
 * UNISTIM channel driver for asterisk
 *
 * Copyright (C) 2005 - 2007, Cedric Hans
 * 
 * Cedric Hans <cedric.hans@mlkj.net>
 *
 * Asterisk 1.4 patch by Peter Be
 *
 * 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
 *
 * \brief chan_unistim channel driver for Asterisk
 * \author Cedric Hans <cedric.hans@mlkj.net>
 *
 * Unistim (Unified Networks IP Stimulus) channel driver
 * for Nortel i2002, i2004 and i2050
 *
 * \ingroup channel_drivers
 */

/*** MODULEINFO
	<support_level>extended</support_level>
 ***/

#include "asterisk.h"

ASTERISK_FILE_VERSION(__FILE__, "$Revision$")

#include <sys/stat.h>
#include <signal.h>

#if defined(__CYGWIN__)
/*
 * cygwin headers are partly inconsistent. struct iovec is defined in sys/uio.h
 * which is not included by default by sys/socket.h - in_pktinfo is defined in
 * w32api/ws2tcpip.h but this probably has compatibility problems with sys/socket.h
 * So for the time being we simply disable HAVE_PKTINFO when building under cygwin.
 *    This should be done in some common header, but for now this is the only file
 * using iovec and in_pktinfo so it suffices to apply the fix here.
 */
#ifdef HAVE_PKTINFO
#undef HAVE_PKTINFO
#endif
#endif /* __CYGWIN__ */

#include "asterisk/paths.h"	/* ast_config_AST_LOG_DIR used in (too ?) many places */
#include "asterisk/network.h"
#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/event.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/netsock2.h"
#include "asterisk/acl.h"
#include "asterisk/callerid.h"