[asterisk-commits] jpeeler: branch 1.4 r122314 - in /branches/1.4: ./ apps/ build_tools/ channel...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 12 14:08:21 CDT 2008
Author: jpeeler
Date: Thu Jun 12 14:08:20 2008
New Revision: 122314
URL: http://svn.digium.com/view/asterisk?view=rev&rev=122314
Log:
Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should continue working. Release announcement to follow.
Added:
branches/1.4/apps/app_dahdibarge.c
- copied unchanged from r122313, team/jpeeler/chan_dahdi14/apps/app_dahdibarge.c
branches/1.4/apps/app_dahdiras.c
- copied unchanged from r122313, team/jpeeler/chan_dahdi14/apps/app_dahdiras.c
branches/1.4/apps/app_dahdiscan.c
- copied unchanged from r122313, team/jpeeler/chan_dahdi14/apps/app_dahdiscan.c
branches/1.4/channels/chan_dahdi.c
- copied unchanged from r122313, team/jpeeler/chan_dahdi14/channels/chan_dahdi.c
branches/1.4/codecs/codec_dahdi.c
- copied unchanged from r122313, team/jpeeler/chan_dahdi14/codecs/codec_dahdi.c
branches/1.4/include/asterisk/dahdi_compat.h
- copied unchanged from r122313, team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h
Removed:
branches/1.4/apps/app_zapbarge.c
branches/1.4/apps/app_zapras.c
branches/1.4/apps/app_zapscan.c
branches/1.4/channels/chan_zap.c
branches/1.4/codecs/codec_zap.c
Modified:
branches/1.4/acinclude.m4
branches/1.4/apps/app_chanspy.c
branches/1.4/apps/app_disa.c
branches/1.4/apps/app_flash.c
branches/1.4/apps/app_getcpeid.c
branches/1.4/apps/app_meetme.c
branches/1.4/apps/app_page.c
branches/1.4/apps/app_queue.c
branches/1.4/apps/app_read.c
branches/1.4/apps/app_rpt.c
branches/1.4/build_tools/menuselect-deps.in
branches/1.4/channels/chan_iax2.c
branches/1.4/channels/chan_mgcp.c
branches/1.4/channels/chan_misdn.c
branches/1.4/configure
branches/1.4/configure.ac
branches/1.4/contrib/utils/zones2indications.c
branches/1.4/funcs/func_channel.c
branches/1.4/include/asterisk/autoconfig.h.in
branches/1.4/include/asterisk/channel.h
branches/1.4/include/asterisk/indications.h
branches/1.4/include/asterisk/options.h
branches/1.4/main/app.c
branches/1.4/main/asterisk.c
branches/1.4/main/channel.c
branches/1.4/main/file.c
branches/1.4/main/indications.c
branches/1.4/main/loader.c
branches/1.4/makeopts.in
branches/1.4/pbx/pbx_config.c
branches/1.4/res/res_indications.c
branches/1.4/res/res_musiconhold.c
branches/1.4/res/snmp/agent.c
Modified: branches/1.4/acinclude.m4
URL: http://svn.digium.com/view/asterisk/branches/1.4/acinclude.m4?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/acinclude.m4 (original)
+++ branches/1.4/acinclude.m4 Thu Jun 12 14:08:20 2008
@@ -99,6 +99,54 @@
exit 1
fi
fi
+])
+
+# The next three functions check for the availability of a given package.
+# AST_C_DEFINE_CHECK looks for the presence of a #define in a header file,
+# AST_C_COMPILE_CHECK can be used for testing for various items in header files,
+# AST_EXT_LIB_CHECK looks for a symbol in a given library, or at least
+# for the presence of a header file.
+# AST_EXT_TOOL_CHECK looks for a symbol in using $1-config to determine CFLAGS and LIBS
+#
+# They are only run if PBX_$1 != 1 (where $1 is the package),
+# so you can call them multiple times and stop at the first matching one.
+# On success, they both set PBX_$1 = 1, set $1_INCLUDE and $1_LIB as applicable,
+# and also #define HAVE_$1 1 and #define HAVE_$1_VERSION ${last_argument}
+# in autoconfig.h so you can tell which test succeeded.
+# They should be called after AST_EXT_LIB_SETUP($1, ...)
+
+# Check if a given macro is defined in a certain header.
+
+# AST_C_DEFINE_CHECK([package], [macro name], [header file], [version])
+AC_DEFUN([AST_C_DEFINE_CHECK],
+[
+ if test "x${PBX_$1}" != "x1"; then
+ AC_MSG_CHECKING([for $2 in $3])
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${$1_DIR}" != "x"; then
+ $1_INCLUDE="-I${$1_DIR}/include"
+ fi
+ CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
+
+ AC_COMPILE_IFELSE(
+ [ AC_LANG_PROGRAM( [#include <$3>],
+ [#if defined($2)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+ ])],
+ [ AC_MSG_RESULT(yes)
+ PBX_$1=1
+ AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
+ AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])
+ ],
+ [ AC_MSG_RESULT(no) ]
+ )
+ CPPFLAGS="${saved_cppflags}"
+ fi
+ AC_SUBST(PBX_$1)
])
# AST_C_COMPILE_CHECK can be used for testing for various items in header files
Modified: branches/1.4/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_chanspy.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_chanspy.c (original)
+++ branches/1.4/apps/app_chanspy.c Thu Jun 12 14:08:20 2008
@@ -461,6 +461,7 @@
const char *exten, const char *context, struct chanspy_ds *chanspy_ds)
{
struct ast_channel *this;
+ char channel_name[AST_CHANNEL_NAME];
redo:
if (spec)
@@ -473,7 +474,8 @@
if (!this)
return NULL;
- if (!strncmp(this->name, "Zap/pseudo", 10)) {
+ snprintf(channel_name, AST_CHANNEL_NAME, "%s/pseudo", dahdi_chan_name);
+ if (!strncmp(this->name, channel_name, 10)) {
ast_channel_unlock(this);
goto redo;
} else if (this == chan) {
Modified: branches/1.4/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_disa.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_disa.c (original)
+++ branches/1.4/apps/app_disa.c Thu Jun 12 14:08:20 2008
@@ -98,7 +98,7 @@
static void play_dialtone(struct ast_channel *chan, char *mailbox)
{
- const struct tone_zone_sound *ts = NULL;
+ const struct ind_tone_zone_sound *ts = NULL;
if(ast_app_has_voicemail(mailbox, NULL))
ts = ast_get_indication_tone(chan->zone, "dialrecall");
else
Modified: branches/1.4/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_flash.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_flash.c (original)
+++ branches/1.4/apps/app_flash.c Thu Jun 12 14:08:20 2008
@@ -26,7 +26,7 @@
*/
/*** MODULEINFO
- <depend>zaptel</depend>
+ <depend>dahdi</depend>
***/
#include "asterisk.h"
@@ -38,7 +38,6 @@
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
-#include <zaptel/zaptel.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -49,6 +48,8 @@
#include "asterisk/translate.h"
#include "asterisk/image.h"
#include "asterisk/options.h"
+
+#include "asterisk/dahdi_compat.h"
static char *app = "Flash";
@@ -65,9 +66,9 @@
{
/* Avoid the silly zt_waitevent which ignores a bunch of events */
int i,j=0;
- i = ZT_IOMUX_SIGEVENT;
- if (ioctl(fd, ZT_IOMUX, &i) == -1) return -1;
- if (ioctl(fd, ZT_GETEVENT, &j) == -1) return -1;
+ i = DAHDI_IOMUX_SIGEVENT;
+ if (ioctl(fd, DAHDI_IOMUX, &i) == -1) return -1;
+ if (ioctl(fd, DAHDI_GETEVENT, &j) == -1) return -1;
return j;
}
@@ -76,15 +77,15 @@
int res = -1;
int x;
struct ast_module_user *u;
- struct zt_params ztp;
+ DAHDI_PARAMS ztp;
u = ast_module_user_add(chan);
if (!strcasecmp(chan->tech->type, "Zap")) {
memset(&ztp, 0, sizeof(ztp));
- res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
+ res = ioctl(chan->fds[0], DAHDI_GET_PARAMS, &ztp);
if (!res) {
- if (ztp.sigtype & __ZT_SIG_FXS) {
- x = ZT_FLASH;
- res = ioctl(chan->fds[0], ZT_HOOK, &x);
+ if (ztp.sigtype & __DAHDI_SIG_FXS) {
+ x = DAHDI_FLASH;
+ res = ioctl(chan->fds[0], DAHDI_HOOK, &x);
if (!res || (errno == EINPROGRESS)) {
if (res) {
/* Wait for the event to finish */
Modified: branches/1.4/apps/app_getcpeid.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_getcpeid.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_getcpeid.c (original)
+++ branches/1.4/apps/app_getcpeid.c Thu Jun 12 14:08:20 2008
@@ -49,7 +49,7 @@
static char *descrip =
" GetCPEID: Obtains and displays ADSI CPE ID and other information in order\n"
-"to properly setup zapata.conf for on-hook operations.\n";
+"to properly setup chan_dahdi.conf for on-hook operations.\n";
static int cpeid_setstatus(struct ast_channel *chan, char *stuff[], int voice)
Modified: branches/1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_meetme.c (original)
+++ branches/1.4/apps/app_meetme.c Thu Jun 12 14:08:20 2008
@@ -30,7 +30,7 @@
*/
/*** MODULEINFO
- <depend>zaptel</depend>
+ <depend>dahdi</depend>
***/
#include "asterisk.h"
@@ -45,7 +45,6 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <zaptel/zaptel.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -68,6 +67,8 @@
#include "asterisk/devicestate.h"
#include "asterisk/dial.h"
#include "asterisk/causes.h"
+
+#include "asterisk/dahdi_compat.h"
#include "enter.h"
#include "leave.h"
@@ -580,8 +581,8 @@
while (len) {
if (block) {
- x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
- res = ioctl(fd, ZT_IOMUX, &x);
+ x = DAHDI_IOMUX_WRITE | DAHDI_IOMUX_SIGEVENT;
+ res = ioctl(fd, DAHDI_IOMUX, &x);
} else
res = 0;
if (res >= 0)
@@ -741,7 +742,7 @@
static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
{
struct ast_conference *cnf;
- struct zt_confinfo ztc = { 0, };
+ DAHDI_CONFINFO ztc = { 0, };
int confno_int = 0;
AST_LIST_LOCK(&confs);
@@ -768,9 +769,9 @@
/* Setup a new zap conference */
ztc.confno = -1;
- ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
+ ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
cnf->fd = open("/dev/zap/pseudo", O_RDWR);
- if (cnf->fd < 0 || ioctl(cnf->fd, ZT_SETCONF, &ztc)) {
+ if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Unable to open pseudo device\n");
if (cnf->fd >= 0)
close(cnf->fd);
@@ -788,8 +789,8 @@
ast_set_write_format(cnf->chan, AST_FORMAT_SLINEAR);
ztc.chan = 0;
ztc.confno = cnf->zapconf;
- ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
- if (ioctl(cnf->chan->fds[0], ZT_SETCONF, &ztc)) {
+ ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+ if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference\n");
if (cnf->chan)
ast_hangup(cnf->chan);
@@ -1218,8 +1219,8 @@
}
/* flush any data sitting in the pseudo channel */
- x = ZT_FLUSH_ALL;
- if (ioctl(fd, ZT_FLUSH, &x))
+ x = DAHDI_FLUSH_ALL;
+ if (ioctl(fd, DAHDI_FLUSH, &x))
ast_log(LOG_WARNING, "Error flushing channel\n");
}
@@ -1372,7 +1373,7 @@
struct ast_conf_user *user = NULL;
struct ast_conf_user *usr = NULL;
int fd;
- struct zt_confinfo ztc, ztc_empty;
+ DAHDI_CONFINFO ztc, ztc_empty;
struct ast_frame *f;
struct ast_channel *c;
struct ast_frame fr;
@@ -1405,7 +1406,7 @@
char members[10] = "";
int dtmf, opt_waitmarked_timeout = 0;
time_t timeout = 0;
- ZT_BUFFERINFO bi;
+ DAHDI_BUFFERINFO bi;
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
char *buf = __buf + AST_FRIENDLY_OFFSET;
int setusercount = 0;
@@ -1444,8 +1445,8 @@
ast_set_write_format(conf->lchan, AST_FORMAT_SLINEAR);
ztc.chan = 0;
ztc.confno = conf->zapconf;
- ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
- if (ioctl(conf->lchan->fds[0], ZT_SETCONF, &ztc)) {
+ ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+ if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error starting listen channel\n");
ast_hangup(conf->lchan);
conf->lchan = NULL;
@@ -1616,16 +1617,16 @@
/* Setup buffering information */
memset(&bi, 0, sizeof(bi));
bi.bufsize = CONF_SIZE/2;
- bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
- bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+ bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
+ bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
bi.numbufs = audio_buffers;
- if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
+ if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
ast_log(LOG_WARNING, "Unable to set buffering information: %s\n", strerror(errno));
close(fd);
goto outrun;
}
x = 1;
- if (ioctl(fd, ZT_SETLINEAR, &x)) {
+ if (ioctl(fd, DAHDI_SETLINEAR, &x)) {
ast_log(LOG_WARNING, "Unable to set linear mode: %s\n", strerror(errno));
close(fd);
goto outrun;
@@ -1640,7 +1641,7 @@
memset(&ztc_empty, 0, sizeof(ztc_empty));
/* Check to see if we're in a conference... */
ztc.chan = 0;
- if (ioctl(fd, ZT_GETCONF, &ztc)) {
+ if (ioctl(fd, DAHDI_GETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error getting conference\n");
close(fd);
goto outrun;
@@ -1670,15 +1671,15 @@
}
if (confflags & CONFFLAG_WAITMARKED && !conf->markedusers)
- ztc.confmode = ZT_CONF_CONF;
+ ztc.confmode = DAHDI_CONF_CONF;
else if (confflags & CONFFLAG_MONITOR)
- ztc.confmode = ZT_CONF_CONFMON | ZT_CONF_LISTENER;
+ ztc.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
else if (confflags & CONFFLAG_TALKER)
- ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER;
+ ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
else
- ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
-
- if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
+
+ if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference\n");
close(fd);
ast_mutex_unlock(&conf->playlock);
@@ -1796,8 +1797,8 @@
if(confflags & CONFFLAG_MARKEDEXIT)
break;
else {
- ztc.confmode = ZT_CONF_CONF;
- if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ ztc.confmode = DAHDI_CONF_CONF;
+ if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference\n");
close(fd);
goto outrun;
@@ -1812,12 +1813,12 @@
/* Marked user entered, so cancel timeout */
timeout = 0;
if (confflags & CONFFLAG_MONITOR)
- ztc.confmode = ZT_CONF_CONFMON | ZT_CONF_LISTENER;
+ ztc.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
else if (confflags & CONFFLAG_TALKER)
- ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER;
+ ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
else
- ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
- if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
+ if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference\n");
close(fd);
goto outrun;
@@ -1858,9 +1859,9 @@
/* Check if my modes have changed */
/* If I should be muted but am still talker, mute me */
- if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && (ztc.confmode & ZT_CONF_TALKER)) {
- ztc.confmode ^= ZT_CONF_TALKER;
- if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && (ztc.confmode & DAHDI_CONF_TALKER)) {
+ ztc.confmode ^= DAHDI_CONF_TALKER;
+ if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference - Un/Mute \n");
ret = -1;
break;
@@ -1876,9 +1877,9 @@
}
/* If I should be un-muted but am not talker, un-mute me */
- if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && !(confflags & CONFFLAG_MONITOR) && !(ztc.confmode & ZT_CONF_TALKER)) {
- ztc.confmode |= ZT_CONF_TALKER;
- if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && !(confflags & CONFFLAG_MONITOR) && !(ztc.confmode & DAHDI_CONF_TALKER)) {
+ ztc.confmode |= DAHDI_CONF_TALKER;
+ if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference - Un/Mute \n");
ret = -1;
break;
@@ -1992,7 +1993,7 @@
} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
if (confflags & CONFFLAG_PASS_DTMF)
conf_queue_dtmf(conf, user, f);
- if (ioctl(fd, ZT_SETCONF, &ztc_empty)) {
+ if (ioctl(fd, DAHDI_SETCONF, &ztc_empty)) {
ast_log(LOG_WARNING, "Error setting conference\n");
close(fd);
ast_frfree(f);
@@ -2138,7 +2139,7 @@
if (musiconhold)
ast_moh_start(chan, NULL, NULL);
- if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference\n");
close(fd);
ast_frfree(f);
@@ -2245,7 +2246,7 @@
ztc.chan = 0;
ztc.confno = 0;
ztc.confmode = 0;
- if (ioctl(fd, ZT_SETCONF, &ztc)) {
+ if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference\n");
}
}
@@ -3112,9 +3113,9 @@
if ((sscanf(val, "%d", &audio_buffers) != 1)) {
ast_log(LOG_WARNING, "audiobuffers setting must be a number, not '%s'\n", val);
audio_buffers = DEFAULT_AUDIO_BUFFERS;
- } else if ((audio_buffers < ZT_DEFAULT_NUM_BUFS) || (audio_buffers > ZT_MAX_NUM_BUFS)) {
+ } else if ((audio_buffers < DAHDI_DEFAULT_NUM_BUFS) || (audio_buffers > DAHDI_MAX_NUM_BUFS)) {
ast_log(LOG_WARNING, "audiobuffers setting must be between %d and %d\n",
- ZT_DEFAULT_NUM_BUFS, ZT_MAX_NUM_BUFS);
+ DAHDI_DEFAULT_NUM_BUFS, DAHDI_MAX_NUM_BUFS);
audio_buffers = DEFAULT_AUDIO_BUFFERS;
}
if (audio_buffers != DEFAULT_AUDIO_BUFFERS)
Modified: branches/1.4/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_page.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_page.c (original)
+++ branches/1.4/apps/app_page.c Thu Jun 12 14:08:20 2008
@@ -26,7 +26,7 @@
*/
/*** MODULEINFO
- <depend>zaptel</depend>
+ <depend>dahdi</depend>
<depend>app_meetme</depend>
***/
Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Thu Jun 12 14:08:20 2008
@@ -1565,9 +1565,8 @@
/* If the hold time is >1 min, if it's enabled, and if it's not
supposed to be only once and we have already said it, say it */
- if ((avgholdmins+avgholdsecs) > 0 && qe->parent->announceholdtime &&
- ((qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE && !qe->last_pos) ||
- !(qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE))) {
+ if ((avgholdmins+avgholdsecs) > 0 && (qe->parent->announceholdtime) &&
+ (!(qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE) && qe->last_pos)) {
res = play_file(qe->chan, qe->parent->sound_holdtime);
if (res)
goto playout;
Modified: branches/1.4/apps/app_read.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_read.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_read.c (original)
+++ branches/1.4/apps/app_read.c Thu Jun 12 14:08:20 2008
@@ -92,7 +92,7 @@
int maxdigits = 255;
int tries = 1, to = 0, x = 0;
char *argcopy = NULL;
- struct tone_zone_sound *ts;
+ struct ind_tone_zone_sound *ts;
struct ast_flags flags = {0};
AST_DECLARE_APP_ARGS(arglist,
Modified: branches/1.4/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_rpt.c?view=diff&rev=122314&r1=122313&r2=122314
==============================================================================
--- branches/1.4/apps/app_rpt.c (original)
+++ branches/1.4/apps/app_rpt.c Thu Jun 12 14:08:20 2008
@@ -2609,9 +2609,9 @@
*/
for(i = 0; i < 20 ; i++){
- flags = ZT_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT;
- res = ioctl(chan->fds[0], ZT_IOMUX, &flags);
- if(flags & ZT_IOMUX_WRITEEMPTY)
+ flags = DAHDI_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT;
+ res = ioctl(chan->fds[0], DAHDI_IOMUX, &flags);
+ if(flags & DAHDI_IOMUX_WRITEEMPTY)
break;
if( ast_safe_sleep(chan, 50)){
res = -1;
@@ -2660,9 +2660,9 @@
*/
for(i = 0; i < 20 ; i++){
- flags = ZT_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT;
- res = ioctl(chan->fds[0], ZT_IOMUX, &flags);
- if(flags & ZT_IOMUX_WRITEEMPTY)
+ flags = DAHDI_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT;
+ res = ioctl(chan->fds[0], DAHDI_IOMUX, &flags);
+ if(flags & DAHDI_IOMUX_WRITEEMPTY)
break;
if( ast_safe_sleep(chan, 50)){
res = -1;
@@ -2905,7 +2905,7 @@
static void *rpt_tele_thread(void *this)
{
-ZT_CONFINFO ci; /* conference info */
+DAHDI_CONFINFO ci; /* conference info */
int res = 0,haslink,hastx,hasremote,imdone = 0, unkeys_queued, x;
struct rpt_tele *mytele = (struct rpt_tele *)this;
struct rpt_tele *tlist;
@@ -2959,9 +2959,9 @@
ci.confno = (((mytele->mode == ID) || (mytele->mode == IDTALKOVER) || (mytele->mode == UNKEY) ||
(mytele->mode == TAILMSG) || (mytele->mode == LINKUNKEY)) || (mytele->mode == TIMEOUT) ?
myrpt->txconf : myrpt->conf);
- ci.confmode = ZT_CONF_CONFANN;
+ ci.confmode = DAHDI_CONF_CONFANN;
/* first put the channel on the conference in announce mode */
- if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
rpt_mutex_lock(&myrpt->lock);
@@ -3144,9 +3144,9 @@
/* set for all to hear */
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = ZT_CONF_CONFANN;
+ ci.confmode = DAHDI_CONF_CONFANN;
/* first put the channel on the conference in announce mode */
- if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
rpt_mutex_lock(&myrpt->lock);
@@ -3174,9 +3174,9 @@
/* set for all to hear */
ci.chan = 0;
ci.confno = myrpt->txconf;
- ci.confmode = ZT_CONF_CONFANN;
+ ci.confmode = DAHDI_CONF_CONFANN;
/* first put the channel on the conference in announce mode */
- if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
rpt_mutex_lock(&myrpt->lock);
@@ -3385,15 +3385,15 @@
res = -1;
break;
}
- i = ZT_FLUSH_EVENT;
- if (ioctl(myrpt->zaptxchannel->fds[0],ZT_FLUSH,&i) == -1)
+ i = DAHDI_FLUSH_EVENT;
+ if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_FLUSH,&i) == -1)
{
ast_mutex_unlock(&myrpt->remlock);
ast_log(LOG_ERROR,"Cant flush events");
res = -1;
break;
}
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_GET_PARAMS,&par) == -1)
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_GET_PARAMS,&par) == -1)
{
ast_mutex_unlock(&myrpt->remlock);
ast_log(LOG_ERROR,"Cant get params");
@@ -4161,7 +4161,7 @@
static void *rpt_call(void *this)
{
-ZT_CONFINFO ci; /* conference info */
+DAHDI_CONFINFO ci; /* conference info */
struct rpt *myrpt = (struct rpt *)this;
int res;
int stopped,congstarted,dialtimer,lastcidx,aborted;
@@ -4181,10 +4181,10 @@
#endif
ci.chan = 0;
ci.confno = myrpt->conf; /* use the pseudo conference */
- ci.confmode = ZT_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
- | ZT_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER;
+ ci.confmode = DAHDI_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
+ | DAHDI_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER;
/* first put the channel on the conference */
- if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
ast_hangup(mychannel);
@@ -4204,10 +4204,10 @@
#endif
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = ZT_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
- | ZT_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER;
+ ci.confmode = DAHDI_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
+ | DAHDI_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER;
/* first put the channel on the conference */
- if (ioctl(genchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(genchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
ast_hangup(mychannel);
@@ -4232,7 +4232,7 @@
pthread_exit(NULL);
}
/* start dialtone if patchquiet is 0. Special patch modes don't send dial tone */
- if ((!myrpt->patchquiet) && (tone_zone_play_tone(mychannel->fds[0],ZT_TONE_DIALTONE) < 0))
+ if ((!myrpt->patchquiet) && (tone_zone_play_tone(mychannel->fds[0],DAHDI_TONE_DIALTONE) < 0))
{
ast_log(LOG_WARNING, "Cannot start dialtone\n");
ast_hangup(mychannel);
@@ -4274,7 +4274,7 @@
if(!congstarted){
congstarted = 1;
/* start congestion tone */
- tone_zone_play_tone(mychannel->fds[0],ZT_TONE_CONGESTION);
+ tone_zone_play_tone(mychannel->fds[0],DAHDI_TONE_CONGESTION);
}
}
res = ast_safe_sleep(mychannel, MSWAIT);
@@ -4346,10 +4346,10 @@
/* set appropriate conference for the pseudo */
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = (myrpt->p.duplex == 2) ? ZT_CONF_CONFANNMON :
- (ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+ ci.confmode = (myrpt->p.duplex == 2) ? DAHDI_CONF_CONFANNMON :
+ (DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
/* first put the channel on the conference in announce mode */
- if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
ast_hangup(mychannel);
@@ -4373,7 +4373,7 @@
myrpt->callmode = 4;
rpt_mutex_unlock(&myrpt->lock);
/* start congestion tone */
- tone_zone_play_tone(genchannel->fds[0],ZT_TONE_CONGESTION);
+ tone_zone_play_tone(genchannel->fds[0],DAHDI_TONE_CONGESTION);
rpt_mutex_lock(&myrpt->lock);
}
}
@@ -4401,10 +4401,10 @@
/* set appropriate conference for the pseudo */
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? ZT_CONF_CONFANNMON :
- (ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+ ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? DAHDI_CONF_CONFANNMON :
+ (DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
/* first put the channel on the conference in announce mode */
- if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
}
@@ -4471,7 +4471,7 @@
struct rpt_link *l;
int reconnects = 0;
int i,n;
- ZT_CONFINFO ci; /* conference info */
+ DAHDI_CONFINFO ci; /* conference info */
val = node_lookup(myrpt,node);
if (!val){
@@ -4610,9 +4610,9 @@
/* make a conference for the tx */
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
+ ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
/* first put the channel on the conference in proper mode */
- if (ioctl(l->pchan->fds[0], ZT_SETCONF, &ci) == -1)
+ if (ioctl(l->pchan->fds[0], DAHDI_SETCONF, &ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
ast_hangup(l->chan);
@@ -5850,17 +5850,17 @@
struct zt_radio_param r;
memset(&r,0,sizeof(struct zt_radio_param));
- r.radpar = ZT_RADPAR_REMMODE;
- r.data = ZT_RADPAR_REM_RBI1;
+ r.radpar = DAHDI_RADPAR_REMMODE;
+ r.data = DAHDI_RADPAR_REM_RBI1;
/* if setparam ioctl fails, its probably not a pciradio card */
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&r) == -1)
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&r) == -1)
{
rbi_out_parallel(myrpt,data);
return;
}
- r.radpar = ZT_RADPAR_REMCOMMAND;
+ r.radpar = DAHDI_RADPAR_REMCOMMAND;
memcpy(&r.data,data,5);
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&r) == -1)
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&r) == -1)
{
ast_log(LOG_WARNING,"Cannot send RBI command for channel %s\n",myrpt->zaprxchannel->name);
return;
@@ -5909,47 +5909,47 @@
/* if not a zap channel, cant use pciradio stuff */
if (myrpt->rxchannel != myrpt->zaprxchannel) return -1;
- prm.radpar = ZT_RADPAR_UIOMODE;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_GETPARAM,&prm) == -1) return -1;
+ prm.radpar = DAHDI_RADPAR_UIOMODE;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
oldmode = prm.data;
- prm.radpar = ZT_RADPAR_UIODATA;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_GETPARAM,&prm) == -1) return -1;
+ prm.radpar = DAHDI_RADPAR_UIODATA;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
olddata = prm.data;
- prm.radpar = ZT_RADPAR_REMMODE;
- if (asciiflag & 1) prm.data = ZT_RADPAR_REM_SERIAL_ASCII;
- else prm.data = ZT_RADPAR_REM_SERIAL;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+ prm.radpar = DAHDI_RADPAR_REMMODE;
+ if (asciiflag & 1) prm.data = DAHDI_RADPAR_REM_SERIAL_ASCII;
+ else prm.data = DAHDI_RADPAR_REM_SERIAL;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
if (asciiflag & 2)
{
- i = ZT_ONHOOK;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_HOOK,&i) == -1) return -1;
+ i = DAHDI_ONHOOK;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
usleep(100000);
}
- prm.radpar = ZT_RADPAR_REMCOMMAND;
+ prm.radpar = DAHDI_RADPAR_REMCOMMAND;
prm.data = rxmaxbytes;
memcpy(prm.buf,txbuf,txbytes);
prm.index = txbytes;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
if (rxbuf)
{
*rxbuf = 0;
memcpy(rxbuf,prm.buf,prm.index);
}
index = prm.index;
- prm.radpar = ZT_RADPAR_REMMODE;
- prm.data = ZT_RADPAR_REM_NONE;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+ prm.radpar = DAHDI_RADPAR_REMMODE;
+ prm.data = DAHDI_RADPAR_REM_NONE;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
if (asciiflag & 2)
{
- i = ZT_OFFHOOK;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_HOOK,&i) == -1) return -1;
- }
- prm.radpar = ZT_RADPAR_UIOMODE;
+ i = DAHDI_OFFHOOK;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
+ }
+ prm.radpar = DAHDI_RADPAR_UIOMODE;
prm.data = oldmode;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
- prm.radpar = ZT_RADPAR_UIODATA;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
+ prm.radpar = DAHDI_RADPAR_UIODATA;
prm.data = olddata;
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
return(index);
}
@@ -8763,7 +8763,7 @@
int ms = MSWAIT,i,lasttx=0,val,remrx=0,identqueued,othertelemqueued;
int tailmessagequeued,ctqueued,dtmfed;
struct ast_channel *who;
-ZT_CONFINFO ci; /* conference info */
+DAHDI_CONFINFO ci; /* conference info */
time_t t;
struct rpt_link *l,*m;
struct rpt_tele *telem;
@@ -8963,9 +8963,9 @@
/* make a conference for the tx */
ci.chan = 0;
ci.confno = -1; /* make a new conf */
- ci.confmode = ZT_CONF_CONF | ZT_CONF_LISTENER;
+ ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER;
/* first put the channel on the conference in proper mode */
- if (ioctl(myrpt->zaptxchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
rpt_mutex_unlock(&myrpt->lock);
@@ -8982,10 +8982,10 @@
/* make a conference for the pseudo */
ci.chan = 0;
ci.confno = -1; /* make a new conf */
- ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? ZT_CONF_CONFANNMON :
- (ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+ ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? DAHDI_CONF_CONFANNMON :
+ (DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
/* first put the channel on the conference in announce mode */
- if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
rpt_mutex_unlock(&myrpt->lock);
@@ -9005,7 +9005,7 @@
(myrpt->zaptxchannel == myrpt->txchannel))
{
/* get tx channel's port number */
- if (ioctl(myrpt->txchannel->fds[0],ZT_CHANNO,&ci.confno) == -1)
+ if (ioctl(myrpt->txchannel->fds[0],DAHDI_CHANNO,&ci.confno) == -1)
{
ast_log(LOG_WARNING, "Unable to set tx channel's chan number\n");
rpt_mutex_unlock(&myrpt->lock);
@@ -9017,15 +9017,15 @@
myrpt->rpt_thread = AST_PTHREADT_STOP;
pthread_exit(NULL);
}
- ci.confmode = ZT_CONF_MONITORTX;
+ ci.confmode = DAHDI_CONF_MONITORTX;
}
else
{
ci.confno = myrpt->txconf;
- ci.confmode = ZT_CONF_CONFANNMON;
+ ci.confmode = DAHDI_CONF_CONFANNMON;
}
/* first put the channel on the conference in announce mode */
- if (ioctl(myrpt->monchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(myrpt->monchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode for monitor\n");
rpt_mutex_unlock(&myrpt->lock);
@@ -9057,9 +9057,9 @@
/* make a conference for the tx */
ci.chan = 0;
ci.confno = myrpt->txconf;
- ci.confmode = ZT_CONF_CONF | ZT_CONF_TALKER ;
+ ci.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER ;
/* first put the channel on the conference in proper mode */
- if (ioctl(myrpt->txpchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(myrpt->txpchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
rpt_mutex_unlock(&myrpt->lock);
@@ -9786,7 +9786,7 @@
/* apply inbound filters, if any */
rpt_filter(myrpt,f->data,f->datalen / 2);
#endif
- if (ioctl(myrpt->zaprxchannel->fds[0], ZT_GETCONFMUTE, &ismuted) == -1)
+ if (ioctl(myrpt->zaprxchannel->fds[0], DAHDI_GETCONFMUTE, &ismuted) == -1)
{
ismuted = 0;
}
@@ -10076,7 +10076,7 @@
if (l->phonemode)
{
- if (ioctl(l->chan->fds[0], ZT_GETCONFMUTE, &ismuted) == -1)
+ if (ioctl(l->chan->fds[0], DAHDI_GETCONFMUTE, &ismuted) == -1)
{
ismuted = 0;
}
@@ -10568,8 +10568,8 @@
struct ast_channel *who;
struct ast_channel *cs[20];
struct rpt_link *l;
- ZT_CONFINFO ci; /* conference info */
- ZT_PARAMS par;
+ DAHDI_CONFINFO ci; /* conference info */
+ DAHDI_PARAMS par;
int ms,elap,nullfd;
time_t t,last_timeout_warning;
struct zt_radio_param z;
@@ -10948,9 +10948,9 @@
/* make a conference for the tx */
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
+ ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
/* first put the channel on the conference in proper mode */
- if (ioctl(l->pchan->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(l->pchan->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
pthread_exit(NULL);
@@ -11115,9 +11115,9 @@
/* make a conference for the pseudo */
ci.chan = 0;
ci.confno = -1; /* make a new conf */
- ci.confmode = ZT_CONF_CONFANNMON ;
+ ci.confmode = DAHDI_CONF_CONFANNMON ;
/* first put the channel on the conference in announce/monitor mode */
- if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+ if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
rpt_mutex_unlock(&myrpt->lock);
@@ -11144,28 +11144,28 @@
memset(&z,0,sizeof(z));
if ((myrpt->iofd < 1) && (myrpt->txchannel == myrpt->zaptxchannel))
{
- z.radpar = ZT_RADPAR_REMMODE;
- z.data = ZT_RADPAR_REM_NONE;
- res = ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z);
+ z.radpar = DAHDI_RADPAR_REMMODE;
+ z.data = DAHDI_RADPAR_REM_NONE;
+ res = ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z);
/* if PCIRADIO and kenwood selected */
if ((!res) && (!strcmp(myrpt->remote,remote_rig_kenwood)))
{
- z.radpar = ZT_RADPAR_UIOMODE;
+ z.radpar = DAHDI_RADPAR_UIOMODE;
z.data = 1;
- if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+ if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
{
ast_log(LOG_ERROR,"Cannot set UIOMODE\n");
return -1;
}
- z.radpar = ZT_RADPAR_UIODATA;
+ z.radpar = DAHDI_RADPAR_UIODATA;
z.data = 3;
- if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+ if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
{
ast_log(LOG_ERROR,"Cannot set UIODATA\n");
return -1;
}
- i = ZT_OFFHOOK;
- if (ioctl(myrpt->zaptxchannel->fds[0],ZT_HOOK,&i) == -1)
+ i = DAHDI_OFFHOOK;
+ if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_HOOK,&i) == -1)
{
ast_log(LOG_ERROR,"Cannot set hook\n");
return -1;
@@ -11175,23 +11175,23 @@
}
if (myrpt->txchannel == myrpt->zaptxchannel)
{
- i = ZT_ONHOOK;
- ioctl(myrpt->zaptxchannel->fds[0],ZT_HOOK,&i);
+ i = DAHDI_ONHOOK;
+ ioctl(myrpt->zaptxchannel->fds[0],DAHDI_HOOK,&i);
/* if PCIRADIO and Yaesu ft897/ICOM IC-706 selected */
if ((myrpt->iofd < 1) && (!res) &&
(!strcmp(myrpt->remote,remote_rig_ft897) ||
(!strcmp(myrpt->remote,remote_rig_ic706))))
{
- z.radpar = ZT_RADPAR_UIOMODE;
+ z.radpar = DAHDI_RADPAR_UIOMODE;
z.data = 1;
- if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+ if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
{
ast_log(LOG_ERROR,"Cannot set UIOMODE\n");
return -1;
}
- z.radpar = ZT_RADPAR_UIODATA;
+ z.radpar = DAHDI_RADPAR_UIODATA;
z.data = 3;
- if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+ if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
{
ast_log(LOG_ERROR,"Cannot set UIODATA\n");
return -1;
@@ -11227,7 +11227,7 @@
if (myrpt->remote && (myrpt->rxchannel == myrpt->txchannel))
{
i = 128;
- ioctl(myrpt->zaprxchannel->fds[0],ZT_ECHOCANCEL,&i);
+ ioctl(myrpt->zaprxchannel->fds[0],DAHDI_ECHOCANCEL,&i);
}
if (chan->_state != AST_STATE_UP) {
ast_answer(chan);
@@ -11235,7 +11235,7 @@
if (myrpt->rxchannel == myrpt->zaprxchannel)
{
- if (ioctl(myrpt->zaprxchannel->fds[0],ZT_GET_PARAMS,&par) != -1)
+ if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_GET_PARAMS,&par) != -1)
{
if (par.rxisoffhook)
{
@@ -11500,9 +11500,9 @@
time(&myrpt->last_activity_time);
if ((iskenwood_pci4) && (myrpt->txchannel == myrpt->zaptxchannel))
{
- z.radpar = ZT_RADPAR_UIODATA;
+ z.radpar = DAHDI_RADPAR_UIODATA;
z.data = 1;
[... 1370 lines stripped ...]
More information about the asterisk-commits
mailing list