[Asterisk-Users] libpri and zap lib

Wu Jiang wujiang at rogers.com
Thu May 22 21:09:02 MST 2003


Yes, I had wanted to use AGI, and referred eagi_test.c. But I didn't find the samples or documents to figure out how to implement to following senario (a pre-paid card application): 
1. After answer an incoming call on channel 1, make an outbound call via channel 2.
2. If the callee on channel 2 answers, bridge channel 1 and 2, and record the time; when either part hangs up, disconnect the other part and record the time.

In the AGI command list I didn't find something like "transfer" or "dial" to make a call. so I thought I had to turn to the lower API.

regards,

James


----- Original Message ----- 
From: "Mark Spencer" <markster at digium.com>
To: <asterisk-users at lists.digium.com>
Sent: Thursday, May 22, 2003 10:24 PM
Subject: Re: [Asterisk-Users] libpri and zap lib


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
>
> ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÀ²×«SÉÿRÇ«²f¢-)à-+-Ë^®+$ýK
®ÏåSËlýØ Séÿr?¡¶Úÿÿùb²Ûÿv("ºoÜ¢oæj)fjåSËbú?jË^®+$þë

>

_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users


More information about the asterisk-users mailing list