?
Solved

AVM B1 ISDN card/Asterisk@Home 2.8 - capi doesn't load

Posted on 2006-05-18
6
Medium Priority
?
550 Views
Last Modified: 2008-01-09
I've asked this on the Asterisk @ Home forum, and I've asked AVM - but had no luck ! No answer at all on the forum, and AVM simply said "we only support recent Suse".

I followed the recipe at http://www.asteriskguru.com/tutorials/avm_b1.html to install drivers for an AVM B1 card. It took a while to figure out that the bits and pieces in debian packages capiutils & libcapi20-dev are in CentOS RPMs isdn4k-utils & isdn4k-utils-dev (I think).
 
As the system boots, the system logs :
May 8 13:53:49 asterisk1 kernel: CAPI Subsystem Rev 1.1.2.8
May 8 13:53:49 asterisk1 kernel: b1: revision 1.1.2.2
May 8 13:53:49 asterisk1 kernel: b1dma: revision 1.1.2.3
May 8 13:53:49 asterisk1 kernel: ACPI: PCI interrupt 0000:05:09.0[A] -> GSI 10 (level, low) -> IRQ 10
May 8 13:53:49 asterisk1 kernel: b1pci: PCI BIOS reports AVM-B1 V4 at i/o 0x1080, irq 10, mem 0xfc501000
May 8 13:53:49 asterisk1 kernel: kcapi: Controller 1: b1pciv4-1080 attached
May 8 13:53:49 asterisk1 kernel: b1pci: AVM B1 PCI V4 at i/o 0x1080, irq 10, mem 0xfc501000, revision 4 (dma)
May 8 13:53:49 asterisk1 kernel: b1pci: revision 1.1.2.2
 
which appears to say that the card is recognised and modules loaded.
 
However, Asterisk logs :
May 8 13:54:12 WARNING[2727] chan_capi.c: CAPI not installed, CAPI disabled!
May 8 13:54:12 WARNING[2727] loader.c: chan_capi.so: load_module failed, returning -1
May 8 13:54:12 WARNING[2727] loader.c: Loading module chan_capi.so failed!
 
Ocapiinit & capiinfo say :
# capiinit
ERROR: cannot load module kernelcapi
# capiinfo
capi not installed - No such file or directory (2)
 
lsmod shows :
b1pci 10445 0  
b1dma 16737 1 b1pci
b1 21965 2 b1pci,b1dma
kernelcapi 44769 3 b1pci,b1dma,b1
 
Can anyone suggest where things are going wrong, and what I need to do to fix it ?


I had another go with a fresh install, and using the provided scipt (install-AVMB1ISDN) - but still no success.
 
Building chan_capi produced loads of errors :
 
+ cd /usr/src/chan_capi-0.3.5
+ make
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686 -DCAPI_ES -DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes -Wno-missing-declarations -DCRYPTO -c -o chan_capi.o chan_capi.c
chan_capi.c:17:34: asterisk/channel_pvt.h: No such file or directory
chan_capi.c: In function `capi_echo_canceller':
chan_capi.c:175: error: structure has no member named `pvt'
chan_capi.c: In function `capi_detect_dtmf':
<several more pages>
chan_capi.c: In function `search_did':
chan_capi.c:1248: error: structure has no member named `pvt'
chan_capi.c: In function `pipe_msg':
chan_capi.c:1724: error: structure has no member named `dnid'
chan_capi.c:1724: error: structure has no member named `dnid'
chan_capi.c: In function `capi_handle_msg':
chan_capi.c:2021: warning: implicit declaration of function `use_ast_mutex_init_instead_of_pthread_mutex_init'
chan_capi.c: In function `load_module':
chan_capi.c:2600: warning: implicit declaration of function `ast_load'
chan_capi.c:2600: warning: assignment makes pointer from integer without a cast
chan_capi.c:2775: warning: implicit declaration of function `ast_destroy'
chan_capi.c:2793: warning: passing arg 1 of `ast_channel_register' from incompatible pointer type
chan_capi.c:2793: error: too many arguments to function `ast_channel_register'
chan_capi.c: In function `unload_module':
chan_capi.c:2813: warning: passing arg 1 of `ast_channel_unregister' from incompatible pointer type
make: *** [chan_capi.o] Error 1

make config and make install produce similar output.
0
Comment
Question by:FurnessSupport
  • 3
  • 3
6 Comments
 
LVL 19

Accepted Solution

by:
feptias earned 1500 total points
ID: 16707132
Your starting point is different to my own experience of Asterisk - e.g. you mentioned Asterisk@home, AVM cards and CAPI, whereas I used asterisk source releases, Digium and PRI. However, if it helps, I can comment on the difficulties of compiling/building Asterisk from source, which appears to be one of your problems.

The first time I tried to build Asterisk from source there were compile errors similar to what you've shown in your question for chan_capi.c. They can be due to missing libraries or subtle differences in the path names used for include files on different versions of linux.
I just worked my way through the errors in a logical way and used google searches to help point to the cause of problems that were hard to find. In your listing above I would guess that the key line is:
chan_capi.c:17:34: asterisk/channel_pvt.h: No such file or directory

If it can't find the include file, then the subsequent errors are likely to be a consequence of the missing code that was in that include. You could use a Linux file search utility to look for the channel_pvt.h file, then take it from there. It helps if you know a bit of C.

Good luck
0
 
LVL 1

Author Comment

by:FurnessSupport
ID: 16708965
Thanks for that, though I think that is a secondary issue until I can get the capi drivers loaded.
0
 
LVL 19

Expert Comment

by:feptias
ID: 16709172
hmm, maybe, as I say I'm not familiar with the capi stuff, but on reading the list of error messages that you posted in the question the first ones that seemed relevant were from the asterisk log:
May 8 13:54:12 WARNING[2727] loader.c: chan_capi.so: load_module failed, returning -1
May 8 13:54:12 WARNING[2727] loader.c: Loading module chan_capi.so failed!

chan_capi.so is the file that would be built when you compile chan_capi.c so I thought the sequence of events was probably: error compiling the .C file means there is no .SO file which means asterisk isn't happy trying to use that module which gives the errors above.
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
LVL 1

Author Comment

by:FurnessSupport
ID: 16709286
Sorry, my fault ! Should have explained better.

There's two different issues here, and two attempts at dealing with it.

The first attempt I had was following the asteriskguru.com article. I got chan_capi to compile, but couldn't load the modules (the ERROR: cannot load module kernelcapi message).


I then had another go with a completely fresh install of AAH (in case any of the other experimenting I'd done was causing a problem), and used the script included in AAH to build/install stuff. This time, as well as the kernel module problem, I got all these compile errors for chan_capi.

Googling has given me the information that I'm not alone in having the problem, but no clue how to deal with it :-(
0
 
LVL 1

Author Comment

by:FurnessSupport
ID: 16741278
I have now sorted it out, see http://www.aussievoip.com.au/wiki/index.php?page=freePBX-AVMb1

In short - some of the software required appears to be old (incompatible) versions if you use the 'bundled' versions, using up to date versions fetched manually fixed it.
0
 
LVL 19

Expert Comment

by:feptias
ID: 16742096
Thanks for the update. Have fun with Asterisk.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Every year the snow affects people and businesses. According to the Federation of Small Businesses (FSB), in 2009, UK businesses lost an estimated £1.2bn (http://news.bbc.co.uk/1/hi/business/7864804.stm) because of bad weather. This article was c…
Article by: user_n
How Sip Phone (User Agent) works and communicates with sip servers 1.  There is a sip server and a sip registrar.  The sip server and sip registrar can be one server or two different servers. The sip registrar is the server on which it is record…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question