[Asterisk-Dev] chan_zap.c and zaptel

Steve Creel screel at turbs.com
Mon Mar 29 19:00:32 MST 2004


I am trying to use our existing Avaya desk phones with their low-voltage
MWI.  Under the wcfxs driver (and a 4 port TDM card) I can do the
following in chan_zap's do_monitor loop:

int x;
x = ZT_OFFHOOK;
res2 = ioctl(last->subs[SUB_REAL].zfd, ZT_HOOK, &x);
ast_log(LOG_WARNING,"Tried a MWI light off hook for %d Got: %d (%s)\n", last->channel, res2, strerror(errno));
x = ZT_ONHOOK;
res2 = ioctl(last->subs[SUB_REAL].zfd, ZT_HOOK, &x);
ast_log(LOG_WARNING,"Tried a MWI light on hook for %d Got: %d (%s)\n", last->channel, res2, strerror(errno));

This, as expected, takes the line 'off hook' and triggers a voltage drop,
allowing the light to flash.  When I use the same code on our production
system, with wct4xxp and a 4 port T1/E1 card, I get:

Mar 29 20:56:02 WARNING[425997]: chan_zap.c:5084 do_monitor: Tried a MWI light off hook for 30 Got: 0 (Inappropriate ioctl for device)
Mar 29 20:56:02 WARNING[425997]: chan_zap.c:5087 do_monitor: Tried a MWI light on hook for 30 Got: 0 (Inappropriate ioctl for device)
Mar 29 20:56:45 WARNING[425997]: chan_zap.c:5084 do_monitor: Tried a MWI light off hook for 30 Got: 0 (No such file or directory)
Mar 29 20:56:45 WARNING[425997]: chan_zap.c:5087 do_monitor: Tried a MWI light on hook for 30 Got: 0 (No such file or directory)
Mar 29 20:56:46 WARNING[425997]: chan_zap.c:5084 do_monitor: Tried a MWI light off hook for 30 Got: -1 (Device or resource busy)
Mar 29 20:56:46 WARNING[425997]: chan_zap.c:5087 do_monitor: Tried a MWI light on hook for 30 Got: 0 (Device or resource busy)

The 'Device or resource busy' message just continues.

If I substitute ZT_RING for ZT_OFFHOOK, it does ring... Is there really no
way to take the line off hook (thereby dropping voltage) ?  I've been
banging my head against the wall for too long now, and with no progress...

Any help is appreciated,

Steve



More information about the asterisk-dev mailing list