From owner-freebsd-isdn@FreeBSD.ORG Tue Nov 13 14:46:02 2012 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C483DA3 for ; Tue, 13 Nov 2012 14:46:02 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) by mx1.freebsd.org (Postfix) with ESMTP id 433CC8FC14 for ; Tue, 13 Nov 2012 14:46:01 +0000 (UTC) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id A0EB65C8D5; Tue, 13 Nov 2012 15:45:55 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id zd87v2fNLazx; Tue, 13 Nov 2012 15:45:54 +0100 (CET) Received: from mail.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id BC9075C8D4; Tue, 13 Nov 2012 15:45:54 +0100 (CET) Received: from bsdlo.incore (bsdlo.incore [192.168.0.84]) by mail.incore (Postfix) with ESMTP id B573550880; Tue, 13 Nov 2012 15:45:54 +0100 (CET) Message-ID: <50A25D22.7040504@incore.de> Date: Tue, 13 Nov 2012 15:45:54 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: ISDN4BSD (HPS version) is going into ports References: <509E87EF.9070607@incore.de> <201211112246.44683.hselasky@c2i.net> <50A174C2.2050807@incore.de> <201211131202.47188.hselasky@c2i.net> In-Reply-To: <201211131202.47188.hselasky@c2i.net> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-isdn@freebsd.org X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 14:46:02 -0000 Hi Hans, > The issue about "core show channels" that shows more and more channels, > happens only in Asterisk 1.8.x and is due to chan_capi not updating the > channel name correctly according to how Asterisk expects it being done. With revision 2473 of isnd4bsd this problem is solved: -> asterisk -rx "core show channels" (before incoming call) Channel Location State Application(Data) CAPI//-free s@default:1 Down (None) 1 active channel 0 active calls 0 calls processed Asterisk ending (0). -> asterisk -rx "core show channels" (during the call) Channel Location State Application(Data) SIP/34-00000000 4994068@from-interna Ringing AppDial((Outgoing Line)) CAPI/ISDN_TE_1/49940 4994068@capi_telekom Ring Dial(SIP/34,30,gj) CAPI//-free s@default:1 Down (None) 3 active channels 1 active call 1 call processed Asterisk ending (0). -> asterisk -rx "core show channels" (after hangup) Channel Location State Application(Data) CAPI//-free s@default:1 Down (None) 1 active channel 0 active calls 1 call processed Asterisk ending (0). > The issue about deadlock should be solved by moving the channel allocation > outside of the CAPI applications lock. Channel free is already outside this > lock. There now will always be a free channel, when no call is pending. Please > also note that the CDR start time might be different than before. That means > it should be set to the time when the PBX thread was started for incoming > calls, not when doing DID (dial in digits), and for outgoing calls, when the > asterisk channel was allocated. > > Fixes are available in my I4B SVN repository in the trunk/chan_capi folder. > > Please test and report back! I will do some tests and then update my production server and report the results. > Thanks for valuable feedback! Thanks for valuable correction! -- Andreas Longwitz