[Asterisk-Users] libpri and zap lib
Jeremy McNamara
jj at indie.org
Thu May 22 21:28:34 MST 2003
You need to completely understand Asterisk's architecture before you can
pull off a viable calling card solution.
Jeremy McNamara
Wu Jiang wrote:
>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
>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÀ²×«S(ÉÿRÇ«²f¢-)à-+-Ë^®+$ýK
®ÏåS(ËlýØ S(éÿr0/00¡¶Úÿÿùb²Ûÿv("ºoÜ¢oæj)fj?åS(Ëb?ú?jË^®+$þë
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20030522/7647c8f9/attachment.htm
More information about the asterisk-users
mailing list