From owner-freebsd-isdn@freebsd.org Fri Feb 19 16:44:44 2016 Return-Path: Delivered-To: freebsd-isdn@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 881E2AAE44A for ; Fri, 19 Feb 2016 16:44:44 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30BB719F1 for ; Fri, 19 Feb 2016 16:44:43 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 94A8F1FE023; Fri, 19 Feb 2016 17:44:34 +0100 (CET) Subject: Re: chan_capi error after update To: Andreas Longwitz , freebsd-isdn@freebsd.org References: <56C6E0D4.5060603@incore.de> From: Hans Petter Selasky Message-ID: <56C74704.6060606@selasky.org> Date: Fri, 19 Feb 2016 17:47:00 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56C6E0D4.5060603@incore.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 16:44:44 -0000 On 02/19/16 10:31, Andreas Longwitz wrote: > Hi, > > isdn4bsd + chan_capi works fine for years now, thanks !! > > On machines running > FreeBSD 8.4-STABLE (LOSERVER) #2 r284338 > with > ihfc0: port 0xbc00-0xbc07 mem > 0xff532000-0xff5320ff irq 22 at device 1.0 on pci6 > ihfc0: [ITHREAD] > ihfc0: Attaching I4B controller 0. > ihfc0: Creating /dev/ihfc0.X. > i4btel: 8 ISDN telephony interface device(s) attached > i4btrc: 64 ISDN trace device(s) attached > i4bctl: ISDN system control port attached > i4b: ISDN call control device attached > i4bisppp: 8 ISDN SyncPPP device(s) attached > > there is a problem after updating software (without changing configuration) > > asterisk18: 1.8.16.0 ---> 1.8.32.1 > chan_capi: 2.0.3 ---> 2.0.14 > libcapi: 2.0.1 ---> 2.0.2 > isdn4bsd-kmod: 2.0.7 ---> 2.0.11 > isdn4bsd-utils: 2.0.7 ---> 2.0.11 > > isdnd works fine, but chan_capi has a problem when asterisk starts: > > [2016-02-18 17:16:51.477] VERBOSE[8810] chan_capi.c: [2016-02-18 > 17:16:51.477] == Reading config for ISDN > [2016-02-18 17:16:51.477] VERBOSE[8810] chan_capi.c: [2016-02-18 > 17:16:51.477] -- config entry 'ISDN' T=(4982871,isdn-in,2) C=[0,0] > E=(0,4,64) G=(1.000000/1.000000) H=(0) > [2016-02-18 17:16:51.477] ERROR[8810] chan_capi.c: CAPI error sending > CAPI_FACILITY_REQ { > header { > WORD wLen = 0x0000 > WORD wApp = 0xffff > WORD wCmd = 0x8468 > WORD wNum = 0x0001 > DWORD dwCid = 0x00000000 > } > data { > WORD wSelector = 0x0003 > STRUCT Param.ptr = 0x03 '?', 0x00 '?', 0x00 '?', 0x00 '?'. > } > } > (NCCI=0) (error=0x1101) > [2016-02-18 17:16:51.477] NOTICE[8810] chan_capi.c: could not send > FACILITY REQUEST! > [2016-02-18 17:16:51.477] VERBOSE[8810] chan_capi.c: [2016-02-18 > 17:16:51.477] -- CAPI controller 0 supports: [DTMF][echo > cancellation][supplementary] > [2016-02-18 17:16:51.477] ERROR[8810] chan_capi.c: CAPI error sending > CAPI_LISTEN_REQ { > header { > WORD wLen = 0x0000 > WORD wApp = 0xffff > WORD wCmd = 0x8462 > WORD wNum = 0x0002 > DWORD dwCid = 0x00000000 > } > data { > DWORD dwInfoMask = 0x0000ffff > DWORD dwCipMask1 = 0x1fff03ff > DWORD dwCipMask2 = 0x00000000 > STRUCT src_telno.ptr = (empty) > STRUCT src_subaddr.ptr = (empty) > } > } > (NCCI=0) (error=0x1101) > [2016-02-18 17:16:51.477] ERROR[8810] chan_capi.c: Unable to listen on > controller=0! > [2016-02-18 17:16:51.478] VERBOSE[8810] channel.c: [2016-02-18 > 17:16:51.478] == Registered channel type 'CAPI' (Common ISDN API 2.0 > Driver 2.0.14) > [2016-02-18 17:16:51.478] VERBOSE[8810] pbx.c: [2016-02-18 17:16:51.478] > == Registered application 'capiCommand' > [2016-02-18 17:16:51.478] ERROR[8810] lock.c: chan_capi.c line 1237 > (capi_application_usleep): mutex '&p_app->lock' freed more times than > we've locked! > [2016-02-18 17:16:51.478] VERBOSE[8810] loader.c: [2016-02-18 > 17:16:51.478] chan_capi.so => (Common ISDN API 2.0 Driver 2.0.14) > [2016-02-18 17:16:51.478] ERROR[8810] lock.c: chan_capi.c line 1237 > (capi_application_usleep): Error releasing mutex: Operation not permitted > > Some seconds later: > [2016-02-18 17:16:51.527] VERBOSE[8810] asterisk.c: [2016-02-18 > 17:16:51.527] Asterisk Ready. > [2016-02-18 17:16:53.873] VERBOSE[8810] chan_capi.c: [2016-02-18 > 17:16:53.873] -- CAPI controller 0 supports: [DTMF][echo > cancellation][supplementary] > [2016-02-18 17:16:55.258] VERBOSE[8810] chan_capi.c: [2016-02-18 > 17:16:55.258] -- listening on controller=0, cip_mask=0x1fff03ff > [2016-02-18 17:16:55.258] WARNING[8810] chan_capi.c: CAPI application > was restarted > > Any ideas ? Hi, Did you set the correct permissions for /dev/capi20. Maybe Asterisk is running it as a different user? --HPS