Luis Vazquez
2005-Jun-28 10:06 UTC
[Asterisk-Users] problems with chan_capi 0.3.5 , divactrl, eicon diva server, and kernel 2.6.10/2.6.12
Hello all, I'm having problems getting chan_capi 0.3.5 to work well with an Eicon Diva Server card using using the driver from linux kernel both 2.6.10 and 2.6.12 (vanilla versions). I have a (really two) producci?n system(s) running chan_capi in another identical Eicon Card using kernel 2.4.27 and the Diva Server drivers from Eicon. I installed an compiled the source level rpm divas4linux_EICON-104.429-1.i386.rpm into a binary rpm named divas4linux_EICON-105.465-1.i386.rpm. It works (allmost) without problems except for the fact of some random segmentation faults in Asterisk when capi is handling incoming calls (the same problem has already been reported in the list without solutions as long as I know). The problem with Eicon's Diva Server Driver is they dont give a version to work with kernel 2.6 and I need to upgrade to k2.6 for many reasons, besides I prefer to use the open source version. The first problem I found was having no response when making a call in 2.6.12. After searching the list I downgraded to 2.6.10 and I was able to made a call. Then I found the patch(es) in the comments at "Asterisk How to connect with CAPI" at voip-info.org. I'm using the one from nitram that seems very similar to the one from irroot but more complete. With this patch chan_capi is mostly working with 2.6.12 but I have some problems I don't have with Eicon's driver in 2.4.27. And the same synthoms occur both with 2.6.12 or 2.6.10. The worst first: 1- When I made a call from Asterisk through the capi interface it take many seconds (around 10 secs) to get connected and then you hear a static noise, something like permanent random clicks mixed with the voice. I used the ditrace tool to debug a call and I see many "Layer 1 -> [Lost Framing]" in the output, not present when using the same BRI line in the production PBX using k2.4.27 and Eicon's Driver/Tools. I have tried exchanging the cards too, but the problem is the same. Here is a snippet of ditrace.txt: ===================================== 0:01:51.055 s 2 Layer 2 -> [Idle] 0:01:51.057 s 2 Layer 1 -> [Lost Framing] <----- 0:01:51.057 s 2 Layer 2 -> [Idle] ....... 0:01:51.085 s 2 Layer 1 -> [Syncronized] 0:01:51.085 s 2 Layer 2 -> [Idle] 0:01:51.087 s 2 Layer 1 -> [Lost Framing] <------ ....... 0:01:51.177 s 2 Layer 2 -> [Idle] 0:01:51.295 s 2 Layer 1 -> [Syncronized] 0:01:51.295 s 2 Layer 2 -> [Idle] 0:01:51.297 s 2 Layer 1 -> [Activated] 0:01:51.297 s 2 Layer 2 -> [Idle] 0:01:51.328 L 8 CAPI_REGISTER - Id = 1 0:01:51.328 L 8 MaxLogicalConnections = 30(30) 0:01:51.328 L 8 MaxBDataBuffers = 7 0:01:51.328 L 8 MaxBDataLength = 160 0:01:51.328 L 8 Allocated Memory = 75000 0:01:51.328 L 8 CAPI_REGISTER - Id = 1 0:01:51.328 L 8 MaxLogicalConnections = 30(30) 0:01:51.328 L 8 MaxBDataBuffers = 7 0:01:51.328 L 8 MaxBDataLength = 160 0:01:51.328 L 8 CAPI_REGISTER - appl already registered 0:01:51.329 - CAPI20_PUT(026) ............ 0:01:51.331 - 1 CREATEID ok: context:1f assigned Id:5 freeIds=ec ............ 0:01:51.342 - CAPI20_GET(014) 0x0000 01 00 05 81 06 00 02 00 00 00 00 00 ............ --- LISTEN CONF AppID 0x0001 MsgNr 0x0006 CNTR: 0x00000002 Info: initiated 0:01:51.344 - 4 alloc cr in use =3 0:01:51.344 - 3 free cr in use =2 0:01:51.344 - 2 DELETEID ok: deleted Id:5 freeIds=ec 0:01:51.346 - 4 free cr in use =2 0:01:51.346 - 3 DELETEID ok: deleted Id:5 freeIds=ec 0:01:51.348 - 4 DELETEID ok: deleted Id:5 freeIds=ec 0:01:51.357 s 2 Layer 1 -> [Syncronized] 0:01:51.357 s 2 Layer 2 -> [Idle] 0:01:51.359 s 2 Layer 1 -> [Activated] ........ 0:01:52.105 s 2 Layer 1 -> [Lost Framing] <----- 0:01:52.105 s 2 Layer 2 -> [Idle] 0:01:52.107 s 2 Layer 1 -> [Syncronized] 0:01:52.107 s 2 Layer 2 -> [Idle] 0:01:52.109 s 2 Layer 1 -> [Activated] 0:01:52.109 s 2 Layer 2 -> [Idle] 0:01:52.222 s 2 Layer 1 -> [Lost Framing] <----- 0:01:52.105 s 2 Layer 2 -> [Idle] 0:01:52.107 s 2 Layer 1 -> [Syncronized] 0:01:52.107 s 2 Layer 2 -> [Idle] 0:01:52.109 s 2 Layer 1 -> [Activated] 0:01:52.109 s 2 Layer 2 -> [Idle] ............ 0:01:53.032 s 2 Layer 1 -> [Lost Framing] <----- 0:01:53.032 s 2 Layer 2 -> [Idle] 0:01:53.034 s 2 Layer 1 -> [Syncronized] 0:01:53.034 s 2 Layer 2 -> [Idle] 2 - After the call is terminated from asterisk side I see the hangup on asterisk CLI but the capi line keeps busy for a while (at least 15-20 secs). I see the orange light in Eicon Card is on and I'm unable to place a new call in meantime. 3 - Sometimes when I take the system down (halt or reboot) I get a kernel panic with null pointer errors related to capi drivers. If have checked both with and withoud early B3 connects dial option but the problems are the same. The relevant parts of my capi.conf, dial command used and kernel config are at the end. I am using asterisk-1.0.7; vanilla kernel-2.6.10 or 2.6.12 compiled with gcc 3.4 in Mandrake 10.1, divactrl 2.0 from Melware, chan-capi 0.3.5 (with deadlock cvs-HEAD patch from levigo.de adapted to asterisk 1.0.*) and (here is my main suspect) system isdn/capi libs/tools (libisdn4k-utils2-3.2p3-16mdk - isdn4k-utils-3.2p3-16mdk) from Mandrake 10.1. What is the best isdn libs version for using with chan_capi, k2.6.* and divactrl?? Does anybody has a working chan_capi environment with a recent (2.6.10 up) kernel, and could give a hint on any of those synthoms?? I would like to try the new sourceforge chan_capi version 0.5.*, but it is not clear if these works with asterisk stable or only with cvs version? If so, are they (mostly) stable enough for testing in a production system (compared to chan_capi 0.3.5)? Thanks anybody. Luis ############ capi.conf ############## [general] nationalprefix=0 internationalprefix=00 [interfaces] controller=2 msn=4096925,4096927,4092350 incomingmsn=* softdtmf=0 context=incoming devices=2 ###################################### DIAL COMMAND USED: exten => _NXXXXXX,1,Dial(capi/4096925:b${EXTEN}|60|T) or exten => _NXXXXXX,1,Dial(capi/4096925:${EXTEN}|60|T) ########### config-2.6.12-1 ############ ................ # ISDN subsystem # CONFIG_ISDN=m # # Old ISDN4Linux # CONFIG_ISDN_I4L is not set # # CAPI subsystem # CONFIG_ISDN_CAPI=m CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y CONFIG_ISDN_CAPI_MIDDLEWARE=y CONFIG_ISDN_CAPI_CAPI20=m CONFIG_ISDN_CAPI_CAPIFS_BOOL=y CONFIG_ISDN_CAPI_CAPIFS=m # # CAPI hardware drivers ..... ###### AVM Cards... # # Active Eicon DIVA Server cards # CONFIG_CAPI_EICON=y CONFIG_ISDN_DIVAS=m CONFIG_ISDN_DIVAS_BRIPCI=y CONFIG_ISDN_DIVAS_PRIPCI=y CONFIG_ISDN_DIVAS_DIVACAPI=m CONFIG_ISDN_DIVAS_USERIDI=m CONFIG_ISDN_DIVAS_MAINT=m ........... ##############################################
Armin Schindler
2005-Jun-29 02:34 UTC
[Asterisk-Users] problems with chan_capi 0.3.5 , divactrl, eicon diva server, and kernel 2.6.10/2.6.12
On Tue, 28 Jun 2005, Luis Vazquez wrote:> Hello all, > I'm having problems getting chan_capi 0.3.5 to work well with an Eicon Diva > Server card using using the driver from linux kernel both 2.6.10 and 2.6.12 > (vanilla versions).Have you tried the chan_capi-cm version from sourceforge ?> I have a (really two) producci?n system(s) running chan_capi in another > identical Eicon Card using kernel 2.4.27 and the Diva Server drivers from > Eicon. I installed an compiled the source level rpm > divas4linux_EICON-104.429-1.i386.rpm into a binary rpm named > divas4linux_EICON-105.465-1.i386.rpm. > It works (allmost) without problems except for the fact of some random > segmentation faults in Asterisk when capi is handling incoming calls (the same > problem has already been reported in the list without solutions as long as I > know).This doesn't sound like a problem with the diva drivers...> The problem with Eicon's Diva Server Driver is they dont give a version to > work with kernel 2.6 and I need to upgrade to k2.6 for many reasons, besides I > prefer to use the open source version.You don't want to use the drivers which are part of kernel 2.6.x ?> 1- When I made a call from Asterisk through the capi interface it take many > seconds (around 10 secs) to get connected and then you hear a static noise, > something like permanent random clicks mixed with the voice. > I used the ditrace tool to debug a call and I see many "Layer 1 -> [Lost > Framing]" in the output, not present when using the same BRI line in the > production PBX using k2.4.27 and Eicon's Driver/Tools. > I have tried exchanging the cards too, but the problem is the same....> 0:01:53.032 s 2 Layer 1 -> [Lost Framing] <----- > 0:01:53.032 s 2 Layer 2 -> [Idle] > 0:01:53.034 s 2 Layer 1 -> [Syncronized] > 0:01:53.034 s 2 Layer 2 -> [Idle]This looks like a layer 1 connection problem. What type of ISDN line do you have and which divactrl load parameters did you use?> 2 - After the call is terminated from asterisk side I see the hangup on > asterisk CLI but the capi line keeps busy for a while (at least 15-20 secs). I > see the orange light in Eicon Card is on and I'm unable to place a new call in > meantime.This might be the same like 1.> 3 - Sometimes when I take the system down (halt or reboot) I get a kernel > panic with null pointer errors related to capi drivers.Backtrace / Oops message ?> What is the best isdn libs version for using with chan_capi, k2.6.* and > divactrl??your versions should be okay.> Does anybody has a working chan_capi environment with a recent (2.6.10 up) > kernel, and could give a hint on any of those synthoms?? > > I would like to try the new sourceforge chan_capi version 0.5.*, but it is not > clear if these works with asterisk stable or only with cvs version? If so, are > they (mostly) stable enough for testing in a production system (compared to > chan_capi 0.3.5)?It does work with stable and HEAD of Asterisk. The latest changes to the voice buffer caused some problems, but 0.5.3 should be working (at least here in my environment). Armin