From owner-freebsd-isdn@FreeBSD.ORG Sat Aug 23 11:42:03 2003 Return-Path: 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 59EC116A4BF for ; Sat, 23 Aug 2003 11:42:03 -0700 (PDT) Received: from pc5.i.0x5.de (reverse-213-146-113-119.dialin.kamp-dsl.de [213.146.113.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1E6443F93 for ; Sat, 23 Aug 2003 11:41:58 -0700 (PDT) (envelope-from nicolas@dauerreden.de) Received: from pc5.i.0x5.de (localhost [127.0.0.1]) by pc5.i.0x5.de (8.12.8p1/8.12.8) with ESMTP id h7NIfvVr056032 for ; Sat, 23 Aug 2003 20:41:57 +0200 (CEST) (envelope-from nicolas@pc5.i.0x5.de) Received: (from root@localhost) by pc5.i.0x5.de (8.12.8p1/8.12.8/Submit) id h7NIfuWU056031 for freebsd-isdn@freebsd.org.magicnowbp; Sat, 23 Aug 2003 20:41:56 +0200 (CEST) Received: from pc5.i.0x5.de (localhost [127.0.0.1]) by pc5.i.0x5.de (8.12.8p1/8.12.8) with ESMTP id h7NIfuVr056027; Sat, 23 Aug 2003 20:41:56 +0200 (CEST) (envelope-from nicolas@pc5.i.0x5.de) Received: (from nicolas@localhost) by pc5.i.0x5.de (8.12.8p1/8.12.8/Submit) id h7NIftPO056026; Sat, 23 Aug 2003 20:41:55 +0200 (CEST) Date: Sat, 23 Aug 2003 20:41:55 +0200 From: Nicolas Rachinsky To: Martin Husemann Message-ID: <20030823184155.GA55271@pc5.i.0x5.de> Mail-Followup-To: Martin Husemann , Gary Jennejohn , freebsd-isdn@freebsd.org References: <20030820115654.GA38767@pc5.i.0x5.de> <200308201521.h7KFL8ra015997@peedub.jennejohn.org> <20030822155502.GL400@drowsy.duskware.de> <20030823160814.GB15429@pc5.i.0x5.de> <20030823163115.GE845@drowsy.duskware.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030823163115.GE845@drowsy.duskware.de> X-Powered-by: FreeBSD X-Homepage: http://www.rachinsky.de X-PGP-Keyid: C11ABC0E X-PGP-Fingerprint: 19DB 8392 8FE0 814A 7362 EEBD A53B 526A C11A BC0E X-PGP-Key: http://www.rachinsky.de/nicolas/nicolas_rachinsky.asc X-SECURITY: Never trust a running system User-Agent: Mutt/1.5.4i cc: freebsd-isdn@freebsd.org cc: Gary Jennejohn Subject: Re: how to influence the number transmitted after connecting X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 18:42:03 -0000 * Martin Husemann [2003-08-23 18:31 +0200]: > On Sat, Aug 23, 2003 at 06:08:14PM +0200, Nicolas Rachinsky wrote: > > I don't really anything about the ISDN protocolls, do you mean I just > > have to append IEI_CONCTDNO and the number (similar as done within > > i4b_l3_tx_setup())? > > Yes (and take care of the length of the whole packet). Worth a try, and if it > works, we'll turn it into a proper isdnd config option ;-) Juhu. It works. Thank you very much. The patch makes it transmit the called number. I don't know if the patch is correct, but it seems to work fine here. (And yes, it's usefull. Until now everybody calling my MSN ..8 got the ..7 while listening to i4b, now he gets ..8.) I don't know the source well enough to find out how to make a real configuration out of it. Perhaps the value of local-phone-dialout could be used. Do you know how I can acces it from i4b_l3_tx_connect()? Nicolas Index: i4b_l2if.c =================================================================== RCS file: /usr/cvs-freebsd/src/sys/i4b/layer3/i4b_l2if.c,v retrieving revision 1.6.2.2 diff -u -r1.6.2.2 i4b_l2if.c --- i4b_l2if.c 16 Dec 2001 15:12:58 -0000 1.6.2.2 +++ i4b_l2if.c 23 Aug 2003 18:22:01 -0000 @@ -325,10 +325,12 @@ { struct mbuf *m; u_char *ptr; + int len=strlen(cd->dst_telno); NDBGL3(L3_PRIM, "unit %d, cr = 0x%02x", ctrl_desc[cd->controller].unit, cd->cr); - if((m = i4b_Dgetmbuf(I_FRAME_HDRLEN + MSG_CONNECT_LEN)) == NULL) + if((m = i4b_Dgetmbuf(I_FRAME_HDRLEN + MSG_CONNECT_LEN + + (len ? (3+len) : 0))) == NULL) panic("i4b_l3_tx_connect: can't allocate mbuf\n"); ptr = m->m_data + I_FRAME_HDRLEN; @@ -337,6 +339,15 @@ *ptr++ = 0x01; /* call reference length */ *ptr++ = setup_cr(cd, cd->cr); /* call reference value */ *ptr++ = CONNECT; /* message type = connect */ + + if(len) + { + *ptr++ = IEI_CONCTDNO; + *ptr++ = 1+len; + *ptr++ = NUMBER_TYPEPLAN; /* type of number, number plan id */ + strncpy(ptr, cd->dst_telno, len); + ptr += slen; + } DL_Data_Req(ctrl_desc[cd->controller].unit, m); }