[Asterisk-Dev] Question related to zaptel driver development

Henry Margies henry.margies at gmx.de
Tue Aug 30 11:13:31 MST 2005


Hi all

I hope this is the right place to ask questions about zaptel driver
development, if not please point me to the right location.

I'm writting a kernel module to get support for my hardware, which
contains 4 interfaces for analog telephones. I did not find much
information about how to register and use the zaptel API, so please give
me some advises.

For now, I register one span containing four channels. I set callbacks
for open, close, ioctl and hooksig, flags is set to ZT_FLAG_RBS. For all
of my channels I have sigcap set to ZT_SIG_EM_E1 | ZT_SIG_CLEAR |
ZT_SIG_FXSLS.

/etc/zaptel.conf contains:
fxsls=1-4
/etc/asterisk/zapata.conf contains:
switchtype=national
signalling = fxs_ls;
echocancel=yes
immediate=no
group = 3
context=default
channel => 1-4

My problem is:

When I call one of my channels, it goes automatically off-hook when
zt_transmit and zt_receive are used in my driver. Of course I should
only use these functions if there is something to transmit. But I have
to use them for all of my channels, so if one is already in use, another
call goes automatically off-hook.
I'm wondering why zaptel is not waiting until I call zt_hooksig saying
my channel went off-hook?
Also I noticed that calling zt_hooksig(chan, ZT_RXSIG_ONHOOK) does not
finish my running call.

For me it seems that using zt_hooksig gets totally ignored somehow. I
guess I configured something wrong.

So, is it correct to use just one span and 4 channels? Or should I use 4
spans containing only one channel per span?
Are my flags set up correctly?

Some more advises?

Thank you in advance,

Henry


-- 
Hi! I'm a .signature virus! Copy me into your
~/.signature to help me spread!




More information about the asterisk-dev mailing list