[asterisk-dev] Zaptel drivers

Tim Johnson - Eclipse Electronic Systems tjohnson at eclipse.sigint.com
Tue Aug 8 12:33:09 MST 2006


I hope I'm in the correct place to be asking this question.  I'm having 
a hard time locating resources for assistance with the Zaptel modules 
and how to extract data from the character devices.  In other words, not 
using Asterisk.  I'm basically just using an E1 link to send basic PCM 
audio over in a particular channel (channel 1 in my case).  On the 
machine with the Digium card (TE205P) I'm simply trying to get the PCM 
audio out and into a sound card. 

As a first step however, I'd just like to be able to pull the data out 
and just store it in a file and be able to correlate it to the data that 
was sent. 

I've been fumbling around quite a bit, and trying to use some examples 
from ztmonitor and zttool.  Right now I'm just opening /dev/zap/1 and 
doing reads and ioctl calls to for status.  Status reads look good.  It 
looks like, but its hard to tell, when an alarm is either set, or 
cleared on a span, due to remote activity like a card reset, my ability 
to communicate with the character device becomes broken.  Any read from 
it or ioctl call, just returns -1at this point, until I re-open the 
character device.  Then I seem to be able to communicate with the device 
again.  I don't know why this happens or what the correct way to handle 
it is.

To start with, I was simply cat'ing /dev/zap/1 >> test.bin and viewing 
the file in a hexeditor.  When no data is being sent, the pattern out is 
constant, when the data begins getting transferred into the TE205P over 
the E1 link, I see this data pattern become erratic.  So I know that at 
some level at least, the modules are doing their job.  Also, if send 
data in on channel 1, and I cat /dev/zap/2, I see no change in the data 
pattern between not transmitting and transmitting.  So I know that the 
channels are getting split up and routed correctly.  But if I look at 
the data out on /dev/zap/1, and try to correlate it to the data a 
transmitted from the other machine, nothing matches.

Am I heading the complete wrong direction here in trying to use 
/dev/zap/1?  If using /dev/zap/1 is correct, is there someway I need to 
be setting up so that I actually tell when I have real data coming and 
not an idle, seemingly random but constant pattern out (might be a 
repeated '0x3fff' or '0xffff', or '0x7e7e')? 

I've pasted my /etc/zaptel.conf file in as well.  Maybe I'm doing 
something wrong there, that someone can point out.

If this is completely the wrong place and you know of a better place, 
please let me know.  I can't really find anything zaptel specific. 

Thanks,

-Tim




# Autogenerated by ./genzaptelconf -- do not hand edit
# Zaptel Configuration File
#
# This file is parsed by the Zaptel Configurator, ztcfg
#

# It must be in the module loading order

span=1,1,0,ccs,hdb3,crc4
bchan=1-15
dchan=16
bchan=17-31
#rawhdlc=1-32
#dchan=1-32




-------------- next part --------------
A non-text attachment was scrubbed...
Name: tjohnson.vcf
Type: text/x-vcard
Size: 326 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20060808/6323697e/tjohnson.vcf


More information about the asterisk-dev mailing list