From owner-freebsd-isdn@FreeBSD.ORG Wed Nov 8 18:28:26 2006 Return-Path: X-Original-To: freebsd-isdn@freebsd.org Delivered-To: freebsd-isdn@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28C4416A47E for ; Wed, 8 Nov 2006 18:28:26 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 856FB43D5D for ; Wed, 8 Nov 2006 18:28:21 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: TW7/IelmcGUaw4R4idhYZw== X-Cloudmark-Score: 0.000000 [] Received: from [193.217.38.116] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe07.swip.net (CommuniGate Pro SMTP 5.0.12) with ESMTPA id 322461419; Wed, 08 Nov 2006 19:28:17 +0100 From: Hans Petter Selasky To: Daniel Hartmeier Date: Wed, 8 Nov 2006 19:27:57 +0100 User-Agent: KMail/1.7 References: <20061108135555.GK14033@insomnia.benzedrine.cx> <200611081613.04423.hselasky@c2i.net> <20061108175118.GC6819@insomnia.benzedrine.cx> In-Reply-To: <20061108175118.GC6819@insomnia.benzedrine.cx> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611081927.57954.hselasky@c2i.net> Cc: freebsd-isdn@freebsd.org Subject: Re: ISDN4BSD / ihfc0 in NT-mode setup X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2006 18:28:26 -0000 On Wednesday 08 November 2006 18:51, Daniel Hartmeier wrote: > On Wed, Nov 08, 2006 at 04:13:03PM +0100, Hans Petter Selasky wrote: > > It seems like you have configure the NT-side to P2P mode. > > > > Try running "isdnconfig -u 0 -p DRVR_DSS1_NT". > > > > Then "cat /dev/i4b > /dev/null &" or run "capitest -u 0 -i 1 -o 1". > > > > Then pickup the phone. Have "isdndecode" running concurrently. Do you > > hear the dialtone ? > > Yes, that was it. Now with P2MP and opening /dev/i4b it works. > > I wrote a little reader for the device, and when I pick up the receiver > on the phone, I get a dialtone, and I see MSG_CONNECT_IND messages with > the numbers dialed. The other way around, running capitest to dial the > phone, it rings. > > So the cabling seems fine and the basics are working, thank you very > much! > > Is the ioctl protocol (the MSG_* messages) something ISDN4BSD specific? Yes. > They seem to resemble Q.931 as far as event types go. Is there a way to > get access to the Q.931 layer directly from userland, without going > through any abstraction? If you don't open /dev/i4b, you can open /dev/ihfc0.0 instead. That gives you direct access to the D-channel. Currently it is not possible to insert frames at layer-3. > > What I'd like to do is write (in userland) a Q.931 <-> SIP relay, and > use ISDN4BSD for the ISDN side. Ideally, I could read/write Q.931 frames > to the device (having ISDN4BSD do the lower layers itself), i.e. get > access to the raw binary frames. > > It looks like i4btrc might already allow to read the Q.931 frames, is > there a way to inject frames on that level? No, /dev/i4btrcX does not allow insertion of frames. > Before I go dive into the kernel side of the ISDN4BSD ioctls, is this > already available (I'm still not sure what the effect of the P_* > protocols is on the userland interface)? Do you think it would be > difficult to implement? It depends on what you want to do. I would just use the CAPI 2.0 interface of I4B, and extend the CAPI protocol as needed. Then your system will look like this: ISDN -> I4B <-> CAPI <-> SIP --HPS