HO SIN
2004-Oct-29 18:00 UTC
[Asterisk-Users] E1/R2 application in Brazil: Asterisk compilation with libunicall
Dear Steve and other * e1r2 developers and users; Please allow me for relatively a long post. Thanks to Steve's work, I downloaded libunicall, spandsp and libmfcr2 and it seems those libraries are successfully compiled. Now I faced trouble compiling Asterisk. I have installed and operated many * boxes under T1/PRI and analog environment, but it is first time to install * for e1r2. I would like to ask this community's help. 1. ztcfg seems to have succeeded. I ran zttool and monitor the status of live e1 (from Telefonica/BR), and it seems the line is physically up. zaptel.conf is as in <text1>. 2. testcall application is also compiled but it does not seem to take nor generate calls. The testcall.c paramters are defined as in <text2> and the runtime messages are like <text3>. If I make incoming call on the span then "Unexpected CAS bit pattern" message is generated as at the bottom of the log. 3. Giving up the testcall, then following the instruction on opencall.org page, I have copied chan_unicall.c and patched the Makefile appropriately (the downloaded patch file did not work with current * CVS sources, though). While compiling several errors are reported and the compilation interrupted like in <text4>. 4. My environment is as follows: RH9 on P4/3G Asterisk (tested CVS both latest and 1.0 stable) libunicall-0.0.1 (tested a, c, and d) spandsp-0.0.2 (tested pre3 and pre4) (libtiff 3.6.1 (compiled from source)) libmfcr2-0.0.1 (tested a, c, and d against the same level of libunicall) Have I missed something to include? Any suggestion is appreciated. Hosin ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- <text1> span=1,1,0,cas,hdb3 cas=1-15:1101 cas=17-31:1101 loadzone=us defaultzone=us ------------------------------------------------------------------------------------------------------------------------- <text2> #define PROTOCOL_CLASS "mfcr2" #define PROTOCOL_VARIANT "br,20,20" #define PROTOCOL_END UC_MODE_CPE #define BASE_ANI 3372xxxx #define BASE_DNIS 9538xxxx #define FIRST_TRUNK_CIRCUIT 1 #define NUM_TRUNKS 31 #define FIRST_OG_TRUNK 0 #define NUM_OG_TRUNKS 2 ------------------------------------------------------------------------------------------------------------------------- <text2> [root@localhost libunicall]# ./testcall 0 0 2 1024 -1 -1 0 0 4 160 -1 -1 Thread for channel 0 Loading protocol mfcr2 2004/10/29 23:40:19 Chan 1: mfcr2_Unblock() 2004/10/29 23:40:19 Chan 1: Tx bits 0x9 [1/40000000/ 0/ 0] 0 0 2 1024 -1 -1 0 0 4 160 -1 -1 Thread for channel 1 (snip) Chan 1: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Chan 1: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Chan 2: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Chan 2: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern (snip) Chan 32: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Chan 32: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern 2004/10/29 23:40:19 Chan 1: local_unblocking_expired Chan 1: -- Local end unblocked! :-) Chan 1: -- Local end unblocked! :-) 2004/10/29 23:40:19 Chan 2: local_unblocking_expired Chan 2: -- Local end unblocked! :-) Chan 2: -- Local end unblocked! :-) (snip) 2004/10/29 23:40:19 Chan 32: local_unblocking_expired Chan 32: -- Local end unblocked! :-) Chan 32: -- Local end unblocked! :-) Main thread (snip) Main thread 2004/10/30 00:11:31 Chan 1: Rx bits 0x3 [1/40000000/ 0/ 0] 2004/10/30 00:11:31 Chan 1: R2 prot. err. [1/40000000/ 0/ 0] cause 32773 2004/10/30 00:11:31 Chan 1: Tx bits 0x9 [1/40000000/ 0/ 0] Chan 1: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Chan 1: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Main thread 2004/10/30 00:11:39 Chan 2: Rx bits 0x3 [1/40000000/ 0/ 0] 2004/10/30 00:11:39 Chan 2: R2 prot. err. [1/40000000/ 0/ 0] cause 32773 2004/10/30 00:11:39 Chan 2: Tx bits 0x9 [1/40000000/ 0/ 0] Chan 2: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Chan 2: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Main thread Main thread 2004/10/30 00:11:47 Chan 3: Rx bits 0x3 [1/40000000/ 0/ 0] 2004/10/30 00:11:47 Chan 3: R2 prot. err. [1/40000000/ 0/ 0] cause 32773 2004/10/30 00:11:47 Chan 3: Tx bits 0x9 [1/40000000/ 0/ 0] Chan 3: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Chan 3: -- Protocol failure on channel 0, cause (32773) Unexpected CAS bit pattern Main thread Main thread ------------------------------------------------------------------------------------------------------------------------- <text3> .........(snip) gcc -shared -Xlinker -x -o chan_oss.so chan_oss.o gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686 -DZAPTEL_OPTIMIZATIONS -DASTERISK_VERSION=\"CVS-HEAD-10/09/04-06:16:40\" -DINSTALL_PR EFIX=\"\" -DASTETCDIR=\"/etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi-bin\" -DBUSYDETECT_MARTIN -Wno-missing-prototypes -Wno-missing-declarations -DZAPATA_PRI -DIAX_TRUNKING -DCRYPTO -fPIC -c -o chan_phone.o chan_phone.c gcc -shared -Xlinker -x -o chan_phone.so chan_phone.o gcc -c -o chan_unicall.o chan_unicall.c In file included from chan_unicall.c:18: /usr/include/asterisk/lock.h: In function `ast_mutex_init': /usr/include/asterisk/lock.h:311: `PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function) /usr/include/asterisk/lock.h:311: (Each undeclared identifier is reported only once /usr/include/asterisk/lock.h:311: for each function it appears in.) chan_unicall.c: In function `unicall_call': chan_unicall.c:939: structure has no member named `callerid' chan_unicall.c:941: structure has no member named `callerid' chan_unicall.c: In function `unicall_hangup': chan_unicall.c:1171: structure has no member named `bridge' chan_unicall.c:1172: structure has no member named `bridge' chan_unicall.c:1203: structure has no member named `bridge' chan_unicall.c:1204: structure has no member named `bridge' chan_unicall.c:1222: structure has no member named `bridge' chan_unicall.c:1223: structure has no member named `bridge' chan_unicall.c: In function `unicall_read': chan_unicall.c:2020: structure has no member named `callerid' chan_unicall.c:2029: structure has no member named `callerid' chan_unicall.c:2174: structure has no member named `callerid' chan_unicall.c: In function `unicall_new': chan_unicall.c:2512: structure has no member named `callerid' chan_unicall.c:2513: structure has no member named `ani' chan_unicall.c:2517: structure has no member named `rdnis' chan_unicall.c: In function `handle_uc_event': chan_unicall.c:2612: structure has no member named `callerid' chan_unicall.c:2613: structure has no member named `ani' chan_unicall.c: In function `do_monitor': chan_unicall.c:3054: too few arguments to function `ast_app_has_voicemail' chan_unicall.c: In function `load_module': chan_unicall.c:4188: warning: passing arg 4 of `ast_channel_register' from incompatible pointer type chan_unicall.c:4196: warning: passing arg 4 of `ast_channel_register' from incompatible pointer type make[1]: *** [chan_unicall.o] Error 1 make[1]: Leaving directory `/usr/src/asterisk/channels' make: *** [subdirs] Error 1 ------------------------------------------------------------------------------------------------------------------------- --------------------------------- Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041029/f3b6df66/attachment.htm