*/
/*** MODULEINFO
- <depend>zaptel</depend>
+ <depend>dahdi</depend>
<depend>tonezone</depend>
<defaultenabled>no</defaultenabled>
***/
#include <sys/io.h>
#include <sys/vfs.h>
#include <math.h>
-#ifdef OLD_ASTERISK
-#include <linux/zaptel.h>
-#include <tonezone.h>
-#else
-#include <zaptel/zaptel.h>
-#include <zaptel/tonezone.h>
-#endif
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <termios.h>
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/localtime.h"
#include "asterisk/cdr.h"
#include "asterisk/options.h"
-#include <termios.h>
+
+#include "asterisk/dahdi_compat.h"
+#include "asterisk/tonezone_compat.h"
/* Start a tone-list going */
int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist, int interruptible);
*/
for(i = 0; i < 20 ; i++){
- flags = DAHDI_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT;
+ flags = DAHDI_IOMUX_WRITEEMPTY | DAHDI_IOMUX_NOWAIT;
res = ioctl(chan->fds[0], DAHDI_IOMUX, &flags);
if(flags & DAHDI_IOMUX_WRITEEMPTY)
break;
*/
for(i = 0; i < 20 ; i++){
- flags = DAHDI_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT;
+ flags = DAHDI_IOMUX_WRITEEMPTY | DAHDI_IOMUX_NOWAIT;
res = ioctl(chan->fds[0], DAHDI_IOMUX, &flags);
if(flags & DAHDI_IOMUX_WRITEEMPTY)
break;
int i,ns,rbimode;
char mhz[MAXREMSTR];
char decimals[MAXREMSTR];
-struct zt_params par;
+struct dahdi_params par;
/* get a pointer to myrpt */
#endif
ci.chan = 0;
ci.confno = myrpt->conf; /* use the pseudo conference */
- ci.confmode = DAHDI_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
- | DAHDI_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER;
+ ci.confmode = DAHDI_CONF_REALANDPSEUDO | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER
+ | DAHDI_CONF_PSEUDO_TALKER | DAHDI_CONF_PSEUDO_LISTENER;
/* first put the channel on the conference */
if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
#endif
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = DAHDI_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
- | DAHDI_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER;
+ ci.confmode = DAHDI_CONF_REALANDPSEUDO | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER
+ | DAHDI_CONF_PSEUDO_TALKER | DAHDI_CONF_PSEUDO_LISTENER;
/* first put the channel on the conference */
if (ioctl(genchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ci.chan = 0;
ci.confno = myrpt->conf;
ci.confmode = (myrpt->p.duplex == 2) ? DAHDI_CONF_CONFANNMON :
- (DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+ (DAHDI_CONF_CONF | DAHDI_CONF_LISTENER | DAHDI_CONF_TALKER);
/* first put the channel on the conference in announce mode */
if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ci.chan = 0;
ci.confno = myrpt->conf;
ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? DAHDI_CONF_CONFANNMON :
- (DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+ (DAHDI_CONF_CONF | DAHDI_CONF_LISTENER | DAHDI_CONF_TALKER);
/* first put the channel on the conference in announce mode */
if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
/* make a conference for the tx */
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
+ ci.confmode = DAHDI_CONF_CONF | DAHDI_CONF_LISTENER | DAHDI_CONF_TALKER;
/* first put the channel on the conference in proper mode */
if (ioctl(l->pchan->fds[0], DAHDI_SETCONF, &ci) == -1)
{
static void rbi_out(struct rpt *myrpt,unsigned char *data)
{
-struct zt_radio_param r;
+struct dahdi_radio_param r;
- memset(&r,0,sizeof(struct zt_radio_param));
+ memset(&r,0,sizeof(struct dahdi_radio_param));
r.radpar = DAHDI_RADPAR_REMMODE;
r.data = DAHDI_RADPAR_REM_RBI1;
/* if setparam ioctl fails, its probably not a pciradio card */
unsigned char *rxbuf, int rxmaxbytes, int asciiflag)
{
int i,j,index,oldmode,olddata;
- struct zt_radio_param prm;
+ struct dahdi_radio_param prm;
char c;
if(debug){
/* make a conference for the tx */
ci.chan = 0;
ci.confno = -1; /* make a new conf */
- ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER;
+ ci.confmode = DAHDI_CONF_CONF | DAHDI_CONF_LISTENER;
/* first put the channel on the conference in proper mode */
if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
ci.chan = 0;
ci.confno = -1; /* make a new conf */
ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? DAHDI_CONF_CONFANNMON :
- (DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+ (DAHDI_CONF_CONF | DAHDI_CONF_LISTENER | DAHDI_CONF_TALKER);
/* first put the channel on the conference in announce mode */
if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
/* make a conference for the tx */
ci.chan = 0;
ci.confno = myrpt->txconf;
- ci.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER ;
+ ci.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER ;
/* first put the channel on the conference in proper mode */
if (ioctl(myrpt->txpchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
{
DAHDI_PARAMS par;
int ms,elap,nullfd;
time_t t,last_timeout_warning;
- struct zt_radio_param z;
+ struct dahdi_radio_param z;
struct rpt_tele *telem;
nullfd = open("/dev/null",O_RDWR);
/* make a conference for the tx */
ci.chan = 0;
ci.confno = myrpt->conf;
- ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
+ ci.confmode = DAHDI_CONF_CONF | DAHDI_CONF_LISTENER | DAHDI_CONF_TALKER;
/* first put the channel on the conference in proper mode */
if (ioctl(l->pchan->fds[0],DAHDI_SETCONF,&ci) == -1)
{