Elink 343p

Gert Doering (gert@greenie.muc.de)
Thu, 15 Jul 1999 15:40:48 +0200


Hi,

On Thu, Jul 15, 1999 at 11:50:01AM +0200, Sascha Ziemann wrote:
> | Interesting indeed.  Is that always *two* spaces between the two 
> | numbers?  Or "at least one"?
> I do not know.

However.  I have changed ring.c to accept this as well (it's similar
enough to ELSA), just add the following patch:

------------------------
Index: ring.c
===================================================================
RCS file: /u2/cvs/mgetty/ring.c,v
retrieving revision 4.12
diff -u -r4.12 ring.c
--- ring.c	1999/06/07 20:41:15	4.12
+++ ring.c	1999/07/15 13:33:41
@@ -65,7 +65,11 @@
     return 0;				/* not found -> unspecified */
 }
 
-/* ELSA CallerID data comes in as "RING;<from>[;<to>]" */
+/* ELSA CallerID data comes in as "RING;<from>[;<to>]"
+ *
+ * this function is also used for others that report the number in
+ * the format <from>[non-digit(s)]<to>
+ */
 static int ring_handle_ELSA _P2((string, msn_list),
 				 char * string, char ** msn_list )
 {
@@ -85,7 +89,11 @@
     {
 	*p = '\0';
 	CallerId = safedup( string );
-	return find_msn( p+1, msn_list );
+
+	p++;
+	while( *p != '\0' && !isdigit(*p) ) p++;
+
+	return find_msn( p, msn_list );
     }
 }
 
@@ -280,7 +288,7 @@
 	    { *dist_ring_number = ring_handle_ZoomMX( p ); break; }
 	    
 	if ( strlen(p) > 1 )			/* USR type B: "RING 1234" */
-	    { CallerId = safedup(p); break; }
+	    { *dist_ring_number = ring_handle_ELSA( p, msn_list ); break; }
 
 	if ( isdigit( *p ) )			/* RING 1 */
 	    { *dist_ring_number = *p-'0'; break; }
------------------------

> | How does it look like if you call 
> | from "further away", so that you have longer numbers in the message? "321"
> | looks very much like a local telephone system...
> 
> Yes it is.  The modem runs at a Bosch telephone system.  It was quite
> painfull to get it running.  It requires some special settings in the
> telephone system.

Telephone systems are *always* a major PITA.  In my other life I have to
deal with hospital telephone systems and ISDN routers... lots of gray
hair, I can tell you.

> | > Why does Mgetty identify the modem as "no class 2/2.0 faxmodem"?
> | 
> | Hard to say - you didn't show that part of the log file (the lines
> | *before* the comment).  I can't read minds...
> 
> This is a complete log with an incoming external call:
> 
> 07/15 12:13:28 yC0  mgetty: experimental test release 1.1.20-Jan17
[..]
> 07/15 12:13:30 yC0  mdm_send: 'ATI'
> 07/15 12:13:30 yC0    got:[0d][0a]ATI[0d]
> 07/15 12:13:30 yC0    got:Elink 34-3 P1 Version 1.64 [0d]
> 07/15 12:13:30 yC0   mdm_gis: string 1: 'Elink 34-3 P1 Version 1.64 '
> 07/15 12:13:30 yC0    got:[0a][0d][0a]OK[0d]
> 07/15 12:13:30 yC0   mdm_identify: string 'Elink 34-3 P1 Version 1.64 '
> 07/15 12:13:30 yC0  non-numeric ID string: 'Elink 34-3 P1 Version 1.64 '
> 07/15 12:13:30 yC0  Elink detected
> 07/15 12:13:30 yC0   no class 2/2.0 faxmodem, no faxing available
> 07/15 12:13:30 yC0   waiting for line to clear (VTIME), read: 

Hmmm.  I think the problem is that it's hard to properly detect the
Elink (as it doesn't give a proper ATI return code, but sends back some
string... :-/).  Could you send me the output of "mid /dev/ttyC0" for
that modem ("mid" can be found in mgetty/tools/mid), please?

> 07/15 12:31:29 yC0   do_makelock: lock='/var/lock/LCK..ttyC0'
> 07/15 12:31:29 yC0   lock made
> 07/15 12:31:29 yC0  wfr: waiting for ``RING''
> 07/15 12:31:29 yC0   got: [0a][0d][0a]RING 002315691208  321[0d]
> 07/15 12:31:29 yC0    CND: RING 002315691208  321

Looks good...

> 07/15 12:31:35 yC0  found action string: ``NO CARRIER''

Not too good :-)

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert.doering@physik.tu-muenchen.de