Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2003 20:41:55 +0200
From:      Nicolas Rachinsky <list@rachinsky.de>
To:        Martin Husemann <martin@duskware.de>
Cc:        Gary Jennejohn <garyj@jennejohn.org>
Subject:   Re: how to influence the number transmitted after connecting
Message-ID:  <20030823184155.GA55271@pc5.i.0x5.de>
In-Reply-To: <20030823163115.GE845@drowsy.duskware.de>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
* Martin Husemann <martin@duskware.de> [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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030823184155.GA55271>