[Asterisk-Users] libpri and zap lib

Mark Spencer markster at digium.com
Thu May 22 19:24:39 MST 2003


Have you considered using the Asterisk API?  It will almost certainly be
much easier to develop your application rapidly using it.

Mark

On Thu, 22 May 2003, Wu Jiang wrote:

> Hello all,
>
> I have some questions about the libpri and zap lib. I've sent mail to Mark for help. Also I wonder whether anyone else would be interested and helpful in them.
>
> I'm going to migrate a program to Wildcard E400P card. Our original program is based on C API similar to the functions provided in libpri.h and zap.h, so I want to use the E400P card in the following way:
> 1. install and make zapata, zaptel, libpri
> 2. load the modules:
>     modprobe zaptel
>     modprobe tor2
> 3. edit the /etc/zaptel.conf, the run zaptel/ztcfg to configure the modules
> 4. run my program
>
> My program will do the followings:
> 1. open D-channel /dev/zap/16 , /dev/zap/48 and run pri routine on it:
>     dfd1 = open("/dev/zap/16", O_RDWR);
>     dfd2 = open("/dev/zap/48", O_RDWR);
>     pri1 = pri_new(dfd1, node, swtype);
>     pri2 = pri_new(dfd2, node, swtype);
>     /* check and handle the ISDN events on pri1, pri2 as shown in pritest.c*/
> 2.detect DTMF, play audio file, bridge channels, disconnect channels with zap functions:
>     zap_getdtmf();        /* check DTMF*/
>     zap_playf();          /* play audio file*/
>     zap_conf();           /* bridge 2 channels*/
>     zap_clearlinks();     /* disconnect bridged channels*/
>
> Is the above a feasible way?
>
> In the Asterisk code,  the /dev/zap/channel is used for all ISDN D-channels. I haven't understood it clearly. Could you please explain its usage?
>
> Thanks a lot,
>
> James
>
> ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÀ²×«ŠÉÿRÇ«²f¢–)à–+-Ë^®+$ýK
®ÏåŠËlýØ Šéÿr‰¡¶Úÿÿùb²Ûÿv("ºoÜ¢oæj)fjåŠËbú?jË^®+$þë

>




More information about the asterisk-users mailing list