Discussion:
Caller id problems
(too old to reply)
leeenux
2006-11-22 13:13:47 UTC
Permalink
Hello all,
I am running my mgetty with the CNDFILE defined in policy.h
#define CNDFILE "dialin.config"

I am using a GSM modem.
The mgetty is able to get the caller id correctly.I can see this in
the debug messages. mgetty says caller-id = XXX which is correct
When i do a !all in the dialin.config - it is blocking all calls as
expected.
when i do a all - it is accepting all calls as expected.
But when i do a !XXX in dialin.config mgetty does not block the call as
expected.
Any explanation as to why this is happening? or what i could do to
ensure that it behaves the way it should?

Thanks in Advance
Gert Doering
2006-11-22 13:44:22 UTC
Permalink
Hello Mr. Leeenux,
Post by leeenux
Any explanation as to why this is happening? or what i could do to
ensure that it behaves the way it should?
Send us a logfile that shows that a certain caller ID is accepted, even
if dialin.config says it should not be (mgetty -x6, only the lines
relating to *this* specific call).

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

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
leeenux
2006-11-23 09:09:01 UTC
Permalink
The dialin.config has just one entry as !918023398938
The mgetty log looks like this:

02/20 18:56:00 AM0 send: AT+CLIP=1[0d]
02/20 18:56:00 AM0 waiting for ``OK''
02/20 18:56:00 AM0 got: AT+CLIP=1[0d]
02/20 18:56:00 AM0 CND: AT+CLIP=1[0d][0a]OK ** found **
02/20 18:56:00 AM0 waiting for line to clear (VTIME=3), read:
[0d][0a]
02/20 18:56:00 AM0 removing lock file
02/20 18:56:00 AM0 waiting...
02/20 18:57:28 AM0 select returned 1
02/20 18:57:28 AM0 checking lockfiles, locking the line
02/20 18:57:28 AM0 makelock(ttyAM0) called
02/20 18:57:28 AM0 do_makelock: lock='/var/lock/LCK..ttyAM0'
02/20 18:57:28 AM0 lock made
02/20 18:57:28 AM0 wfr: waiting for ``RING''
02/20 18:57:28 AM0 got: [0d][0a]RING[0d]
02/20 18:57:28 AM0 CND: RING
02/20 18:57:28 AM0 wfr: rc=0, drn=0
02/20 18:57:28 AM0 CND: check no: 'none'
02/20 18:57:28 AM0 CND: check vs: 918023598938
02/20 18:57:28 AM0 send: ATA[0d]
02/20 18:57:28 AM0 waiting for ``CONNECT''
02/20 18:57:28 AM0 got: ATA[0d]
02/20 18:57:28 AM0 CND: OKATA[0d][0a]+CLIP:
"918023598938",145,,,"",0[0d]
02/20 18:57:28 AM0 CND: +CLIP: "918023598938",145,,,"",0
02/20 18:57:28 AM0 CND: found: 918023598938 ,145,,,
,0[0a][0d][0a]CONNECT ** found **
02/20 18:57:41 AM0 send:
02/20 18:57:41 AM0 waiting for ``_''
02/20 18:57:41 AM0 got: 9600[0d]
02/20 18:57:41 AM0 CND: CONNECT 9600
02/20 18:57:41 AM0 CND: found: 9600[0a] ** found **
02/20 18:57:41 AM0 waiting for line to clear (VTIME=3), read:
~[ff]}#[c0]!}!} } }7}"}&} } } } }%}&}=8O[fb]}'}"}(}"}-}#}&[b7]6~
02/20 18:57:42 AM0 looking for utmp entry... (my PID: 55)
02/20 18:57:42 AM0 tio_set_flow_control( HARD )
02/20 18:57:42 AM0 print welcome banner (/etc/issue.mgetty)
02/20 18:57:42 AM0 getlogname (AUTO_PPP), read:~[ff]}#[c0]!
02/20 18:57:46 AM0 input finished with '\r', setting ICRNL ONLCR
02/20 18:57:46 AM0 tio_get_rs232_lines: status: RTS DTR
02/20 18:57:46 AM0 WARNING: starting login while DCD is low!
02/20 18:57:46 AM0 login: use login config file
/usr/local/etc/mgetty+sendfax/login.config
02/20 18:57:46 AM0 match: user='/AutoPPP/', key=''
02/20 18:57:46 AM0 match: user='/AutoPPP/', key=''
02/20 18:57:46 AM0 match: user='/AutoPPP/', key='/AutoPPP/'*** hit!
02/20 18:57:46 AM0 login: utmp entry: a_ppp
02/20 18:57:46 AM0 looking for utmp entry... (my PID: 55)
02/20 18:57:46 AM0 calling login: cmd='/mnt/FlashMemory/modem/pppd',
argv[]='pppd noauth login debug'
02/20 18:57:46 AM0 setenv: 'CALLER_ID= 918023598938 ,145,,, ,0'
02/20 18:57:46 AM0 setenv: 'CONNECT=9600'
02/20 18:57:46 AM0 setenv: 'DEVICE=ttyAM0'
02/20 18:57:46 ##### data dev=ttyAM0, pid=55, caller=' 918023398938
,145,,, ,0', conn='9600', name='', cmd='/mnt/FlashMemory/modem/pppd',
user='/AutoPPP/'


Any inputs to make?
Post by Gert Doering
Hello Mr. Leeenux,
Post by leeenux
Any explanation as to why this is happening? or what i could do to
ensure that it behaves the way it should?
Send us a logfile that shows that a certain caller ID is accepted, even
if dialin.config says it should not be (mgetty -x6, only the lines
relating to *this* specific call).
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
--
Posted automagically by a mail2news gateway at muc.de e.V.
leeenux
2006-11-23 09:09:27 UTC
Permalink
The dialin.config has just one entry as !918023398938
The mgetty log looks like this:

02/20 18:56:00 AM0 send: AT+CLIP=1[0d]
02/20 18:56:00 AM0 waiting for ``OK''
02/20 18:56:00 AM0 got: AT+CLIP=1[0d]
02/20 18:56:00 AM0 CND: AT+CLIP=1[0d][0a]OK ** found **
02/20 18:56:00 AM0 waiting for line to clear (VTIME=3), read:
[0d][0a]
02/20 18:56:00 AM0 removing lock file
02/20 18:56:00 AM0 waiting...
02/20 18:57:28 AM0 select returned 1
02/20 18:57:28 AM0 checking lockfiles, locking the line
02/20 18:57:28 AM0 makelock(ttyAM0) called
02/20 18:57:28 AM0 do_makelock: lock='/var/lock/LCK..ttyAM0'
02/20 18:57:28 AM0 lock made
02/20 18:57:28 AM0 wfr: waiting for ``RING''
02/20 18:57:28 AM0 got: [0d][0a]RING[0d]
02/20 18:57:28 AM0 CND: RING
02/20 18:57:28 AM0 wfr: rc=0, drn=0
02/20 18:57:28 AM0 CND: check no: 'none'
02/20 18:57:28 AM0 CND: check vs: 918023598938
02/20 18:57:28 AM0 send: ATA[0d]
02/20 18:57:28 AM0 waiting for ``CONNECT''
02/20 18:57:28 AM0 got: ATA[0d]
02/20 18:57:28 AM0 CND: OKATA[0d][0a]+CLIP:
"918023598938",145,,,"",0[0d]
02/20 18:57:28 AM0 CND: +CLIP: "918023598938",145,,,"",0
02/20 18:57:28 AM0 CND: found: 918023598938 ,145,,,
,0[0a][0d][0a]CONNECT ** found **
02/20 18:57:41 AM0 send:
02/20 18:57:41 AM0 waiting for ``_''
02/20 18:57:41 AM0 got: 9600[0d]
02/20 18:57:41 AM0 CND: CONNECT 9600
02/20 18:57:41 AM0 CND: found: 9600[0a] ** found **
02/20 18:57:41 AM0 waiting for line to clear (VTIME=3), read:
~[ff]}#[c0]!}!} } }7}"}&} } } } }%}&}=8O[fb]}'}"}(}"}-}#}&[b7]6~
02/20 18:57:42 AM0 looking for utmp entry... (my PID: 55)
02/20 18:57:42 AM0 tio_set_flow_control( HARD )
02/20 18:57:42 AM0 print welcome banner (/etc/issue.mgetty)
02/20 18:57:42 AM0 getlogname (AUTO_PPP), read:~[ff]}#[c0]!
02/20 18:57:46 AM0 input finished with '\r', setting ICRNL ONLCR
02/20 18:57:46 AM0 tio_get_rs232_lines: status: RTS DTR
02/20 18:57:46 AM0 WARNING: starting login while DCD is low!
02/20 18:57:46 AM0 login: use login config file
/usr/local/etc/mgetty+sendfax/login.config
02/20 18:57:46 AM0 match: user='/AutoPPP/', key=''
02/20 18:57:46 AM0 match: user='/AutoPPP/', key=''
02/20 18:57:46 AM0 match: user='/AutoPPP/', key='/AutoPPP/'*** hit!
02/20 18:57:46 AM0 login: utmp entry: a_ppp
02/20 18:57:46 AM0 looking for utmp entry... (my PID: 55)
02/20 18:57:46 AM0 calling login: cmd='/mnt/FlashMemory/modem/pppd',
argv[]='pppd noauth login debug'
02/20 18:57:46 AM0 setenv: 'CALLER_ID= 918023398938 ,145,,, ,0'
02/20 18:57:46 AM0 setenv: 'CONNECT=9600'
02/20 18:57:46 AM0 setenv: 'DEVICE=ttyAM0'
02/20 18:57:46 ##### data dev=ttyAM0, pid=55, caller=' 918023398938
,145,,, ,0', conn='9600', name='', cmd='/mnt/FlashMemory/modem/pppd',
user='/AutoPPP/'


Any inputs to make?
Post by Gert Doering
Hello Mr. Leeenux,
Post by leeenux
Any explanation as to why this is happening? or what i could do to
ensure that it behaves the way it should?
Send us a logfile that shows that a certain caller ID is accepted, even
if dialin.config says it should not be (mgetty -x6, only the lines
relating to *this* specific call).
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
--
Posted automagically by a mail2news gateway at muc.de e.V.
leeenux
2006-11-23 09:15:05 UTC
Permalink
Hello Mr Gert,

The dialin.config has just one entry as !918023398938
The mgetty log looks like this:

02/20 18:56:00 AM0 send: AT+CLIP=1[0d]
02/20 18:56:00 AM0 waiting for ``OK''
02/20 18:56:00 AM0 got: AT+CLIP=1[0d]
02/20 18:56:00 AM0 CND: AT+CLIP=1[0d][0a]OK ** found **
02/20 18:56:00 AM0 waiting for line to clear (VTIME=3), read:
[0d][0a]
02/20 18:56:00 AM0 removing lock file
02/20 18:56:00 AM0 waiting...
02/20 18:57:28 AM0 select returned 1
02/20 18:57:28 AM0 checking lockfiles, locking the line
02/20 18:57:28 AM0 makelock(ttyAM0) called
02/20 18:57:28 AM0 do_makelock: lock='/var/lock/LCK..ttyAM0'
02/20 18:57:28 AM0 lock made
02/20 18:57:28 AM0 wfr: waiting for ``RING''
02/20 18:57:28 AM0 got: [0d][0a]RING[0d]
02/20 18:57:28 AM0 CND: RING
02/20 18:57:28 AM0 wfr: rc=0, drn=0
02/20 18:57:28 AM0 CND: check no: 'none'
02/20 18:57:28 AM0 CND: check vs: 918023398938
02/20 18:57:28 AM0 send: ATA[0d]
02/20 18:57:28 AM0 waiting for ``CONNECT''
02/20 18:57:28 AM0 got: ATA[0d]
02/20 18:57:28 AM0 CND: OKATA[0d][0a]+CLIP:
"918023398938",145,,,"",0[0d]
02/20 18:57:28 AM0 CND: +CLIP: "918023398938",145,,,"",0
02/20 18:57:28 AM0 CND: found: 918023398938 ,145,,,
,0[0a][0d][0a]CONNECT ** found **
02/20 18:57:41 AM0 send:
02/20 18:57:41 AM0 waiting for ``_''
02/20 18:57:41 AM0 got: 9600[0d]
02/20 18:57:41 AM0 CND: CONNECT 9600
02/20 18:57:41 AM0 CND: found: 9600[0a] ** found **
02/20 18:57:41 AM0 waiting for line to clear (VTIME=3), read:
~[ff]}#[c0]!}!} } }7}"}&} } } } }%}&}=8O[fb]}'}"}(}"}-}#}&[b7]6~
02/20 18:57:42 AM0 looking for utmp entry... (my PID: 55)
02/20 18:57:42 AM0 tio_set_flow_control( HARD )
02/20 18:57:42 AM0 print welcome banner (/etc/issue.mgetty)
02/20 18:57:42 AM0 getlogname (AUTO_PPP), read:~[ff]}#[c0]!
02/20 18:57:46 AM0 input finished with '\r', setting ICRNL ONLCR
02/20 18:57:46 AM0 tio_get_rs232_lines: status: RTS DTR
02/20 18:57:46 AM0 WARNING: starting login while DCD is low!
02/20 18:57:46 AM0 login: use login config file
/usr/local/etc/mgetty+sendfax/login.config
02/20 18:57:46 AM0 match: user='/AutoPPP/', key=''
02/20 18:57:46 AM0 match: user='/AutoPPP/', key=''
02/20 18:57:46 AM0 match: user='/AutoPPP/', key='/AutoPPP/'*** hit!
02/20 18:57:46 AM0 login: utmp entry: a_ppp
02/20 18:57:46 AM0 looking for utmp entry... (my PID: 55)
02/20 18:57:46 AM0 calling login: cmd='/mnt/FlashMemory/modem/pppd',
argv[]='pppd noauth login debug'
02/20 18:57:46 AM0 setenv: 'CALLER_ID= 918023398938 ,145,,, ,0'
02/20 18:57:46 AM0 setenv: 'CONNECT=9600'
02/20 18:57:46 AM0 setenv: 'DEVICE=ttyAM0'
02/20 18:57:46 ##### data dev=ttyAM0, pid=55, caller=' 918023398938
,145,,, ,0', conn='9600', name='', cmd='/mnt/FlashMemory/modem/pppd',
user='/AutoPPP/'

Any inputs to make?
Thanks
Post by Gert Doering
Hello Mr. Leeenux,
Post by leeenux
Any explanation as to why this is happening? or what i could do to
ensure that it behaves the way it should?
Send us a logfile that shows that a certain caller ID is accepted, even
if dialin.config says it should not be (mgetty -x6, only the lines
relating to *this* specific call).
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
--
Posted automagically by a mail2news gateway at muc.de e.V.
Gert Doering
2006-11-23 09:47:02 UTC
Permalink
Hi,
Post by leeenux
The dialin.config has just one entry as !918023398938
Well, one part of the problem is that
Post by leeenux
02/20 18:57:28 AM0 CND: +CLIP: "918023598938",145,,,"",0
... your modem's caller ID is detected as...
Post by leeenux
02/20 18:57:28 AM0 CND: found: 918023598938 ,145,,,
"918023598938 ,145,,,"

(and not only the "naked" number).
Post by leeenux
02/20 18:57:28 AM0 lock made
02/20 18:57:28 AM0 wfr: waiting for ``RING''
02/20 18:57:28 AM0 got: [0d][0a]RING[0d]
02/20 18:57:28 AM0 CND: RING
02/20 18:57:28 AM0 wfr: rc=0, drn=0
02/20 18:57:28 AM0 CND: check no: 'none'
02/20 18:57:28 AM0 CND: check vs: 918023598938
02/20 18:57:28 AM0 send: ATA[0d]
02/20 18:57:28 AM0 waiting for ``CONNECT''
02/20 18:57:28 AM0 got: ATA[0d]
"918023598938",145,,,"",0[0d]
... and the second problem is that you're not waiting long enough - the
modem is sending the caller ID between the first and second RING, but
you've instructed mgetty to pick up directly after the first RING, so the
CallerID information is not yet available.

So when it's checking ("CND: check no:...") it's checking the number
"none".

Set "rings 2" and see how far it will get you.

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de
leeenux
2006-11-23 14:18:31 UTC
Permalink
Hello Gert,
Yes the problem was with the ring.
But i still have this problem where the identifiation is
CND: +CLIP: "918023598938",145,,,"",0

is there a way to eliminate the unnecessary stuff and make it consider
the naked number for the checks
Thanks
Post by Gert Doering
Hi,
Post by leeenux
The dialin.config has just one entry as !918023398938
Well, one part of the problem is that
Post by leeenux
02/20 18:57:28 AM0 CND: +CLIP: "918023598938",145,,,"",0
... your modem's caller ID is detected as...
Post by leeenux
02/20 18:57:28 AM0 CND: found: 918023598938 ,145,,,
"918023598938 ,145,,,"
(and not only the "naked" number).
Post by leeenux
02/20 18:57:28 AM0 lock made
02/20 18:57:28 AM0 wfr: waiting for ``RING''
02/20 18:57:28 AM0 got: [0d][0a]RING[0d]
02/20 18:57:28 AM0 CND: RING
02/20 18:57:28 AM0 wfr: rc=0, drn=0
02/20 18:57:28 AM0 CND: check no: 'none'
02/20 18:57:28 AM0 CND: check vs: 918023598938
02/20 18:57:28 AM0 send: ATA[0d]
02/20 18:57:28 AM0 waiting for ``CONNECT''
02/20 18:57:28 AM0 got: ATA[0d]
"918023598938",145,,,"",0[0d]
... and the second problem is that you're not waiting long enough - the
modem is sending the caller ID between the first and second RING, but
you've instructed mgetty to pick up directly after the first RING, so the
CallerID information is not yet available.
So when it's checking ("CND: check no:...") it's checking the number
"none".
Set "rings 2" and see how far it will get you.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering
2006-11-23 15:43:38 UTC
Permalink
Hi,
Post by leeenux
Yes the problem was with the ring.
But i still have this problem where the identifiation is
CND: +CLIP: "918023598938",145,,,"",0
is there a way to eliminate the unnecessary stuff and make it consider
the naked number for the checks
"Get your modem to send proper data":

Besides this: adapt the mgetty source code - this stuff is in cnd.c

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

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
leeenux
2006-11-24 05:56:31 UTC
Permalink
Hi gert,
I changed the cnd.c in mgetty and things are working fine now as
expected.
Thank you.
Post by Gert Doering
Hi,
Post by leeenux
Yes the problem was with the ring.
But i still have this problem where the identifiation is
CND: +CLIP: "918023598938",145,,,"",0
is there a way to eliminate the unnecessary stuff and make it consider
Besides this: adapt the mgetty source code - this stuff is in cnd.c
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
--
Posted automagically by a mail2news gateway at muc.de e.V.
Brian J. McGovern
2006-11-27 16:07:58 UTC
Permalink
As Gert said in an earlier email, you'll have to edit cnd.c to strip off
the excess, as this caller ID format is not standard.
Post by leeenux
Hello Gert,
Yes the problem was with the ring.
But i still have this problem where the identifiation is
CND: +CLIP: "918023598938",145,,,"",0
is there a way to eliminate the unnecessary stuff and make it consider
the naked number for the checks
Thanks
Post by Gert Doering
Hi,
Post by leeenux
The dialin.config has just one entry as !918023398938
Well, one part of the problem is that
Post by leeenux
02/20 18:57:28 AM0 CND: +CLIP: "918023598938",145,,,"",0
... your modem's caller ID is detected as...
Post by leeenux
02/20 18:57:28 AM0 CND: found: 918023598938 ,145,,,
"918023598938 ,145,,,"
(and not only the "naked" number).
Post by leeenux
02/20 18:57:28 AM0 lock made
02/20 18:57:28 AM0 wfr: waiting for ``RING''
02/20 18:57:28 AM0 got: [0d][0a]RING[0d]
02/20 18:57:28 AM0 CND: RING
02/20 18:57:28 AM0 wfr: rc=0, drn=0
02/20 18:57:28 AM0 CND: check no: 'none'
02/20 18:57:28 AM0 CND: check vs: 918023598938
02/20 18:57:28 AM0 send: ATA[0d]
02/20 18:57:28 AM0 waiting for ``CONNECT''
02/20 18:57:28 AM0 got: ATA[0d]
"918023598938",145,,,"",0[0d]
... and the second problem is that you're not waiting long enough - the
modem is sending the caller ID between the first and second RING, but
you've instructed mgetty to pick up directly after the first RING, so the
CallerID information is not yet available.
So when it's checking ("CND: check no:...") it's checking the number
"none".
Set "rings 2" and see how far it will get you.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...