[asterisk-dev] Zaptel patch advice needed

Anton anton.vazir at gmail.com
Tue Dec 11 07:47:54 CST 2007


Thanks Marek,

I just did the same, and will try in in live in 30 minutes

You are right I do use 2x8 port Sangoma boards + 1x2 port on 
the same PC giving me 20xE1 on single system. 2xport board 
needed since it has a little better sensitivity for longer 
links and works where 4x and 8x boards does not.

On Monday 10 December 2007, marek cervenka wrote:
> >> Hi!
> >> I've came to a requirement to have over 256 /dev/zap/x
> >> device files (512) to have 16E1's accessible (one of
> >> the third party channel drivers - chan_ss7) addresses
> >> old-style and needs this device files).
> >
> > can you please try patch below (from Denis Smirnov for
> > 0.9 adapted to 1.0.0)
> >
> > --- transport.c.old     2007-11-27 10:16:04.000000000
> > +0100 +++ transport.c 2007-12-10 16:26:42.000000000
> > +0100 @@ -172,11 +172,11 @@
> >  int openschannel(struct link* link)
> >  {
> >    ZT_BUFFERINFO bi;
> > -  char devname[100];
> > +  char *devname;
> >    int fd, res;
> >    int zapid = link->schannel + link->first_zapid;
> >
> > -  sprintf(devname, "/dev/zap/%d", zapid);
> > +  devname = "/dev/zap/channel";
> >    fd = open(devname, O_RDWR);
> >    if(fd < 0) {
> >      ast_log(LOG_WARNING, "Unable to open signalling
> > link zaptel device %s: %s\n",
> > @@ -184,6 +184,11 @@
> >      goto fail;
> >    }
> >
> > +  if (ioctl(res, ZT_SPECIFY, &zapid)) {
>
> oops
> correct this to
> +  if (ioctl(fd, ZT_SPECIFY, &zapid)) {
>
> > +    ast_log(LOG_WARNING, "Unable to specify channel
> > %d: %s\n", zapid, strerror(errno));
> > +    goto fail;
> > +  }
> > +
> >    bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
> >    bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
> >    bi.numbufs = NUM_ZAP_BUF;
>
> ---------------------------------------
> Marek Cervenka
> =======================================
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by
> http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev





More information about the asterisk-dev mailing list