how to influence the number transmitted after connecting

Nicolas Rachinsky list at rachinsky.de
Sat Aug 23 11:42:03 PDT 2003


* Martin Husemann <martin at 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);
 }



More information about the freebsd-isdn mailing list