--- mgetty-1.1.30.orig/cnd.c 2002-11-05 16:43:04.000000000 -0500 +++ mgetty-1.1.30/cnd.c 2003-04-28 00:07:35.000000000 -0400 @@ -94,6 +94,9 @@ /* Swedish Telia/ZyXEL Omni 52k - Torulf Lundgren, torulf@upsys.se */ {"Diverting number:", &CallerId}, + /* FALCOM A2D gsm modem */ + {"+CLIP: ", &CallerId}, + {NULL} }; @@ -163,6 +166,23 @@ if ( *p == '\'' || *p == '\"' || !isprint(*p) ) *p = ' '; p++; } + + if ( strcmp(cp->string,"+CLIP: ") == 0 ) { + char *q ; + + p = *(cp->variable) ; + q = *(cp->variable) ; + /* strip non digit charaters */ + while( ! isdigit(*p) ) p++; + /* shift only digit characters */ + while( isdigit(*p) ) { + *q=*p ; + p++ ; + q++ ; + } + *q = 0; + } + } lprintf(L_JUNK, "CND: found: %s", *(cp->variable)); return;