HiGrahamGrahamHi
I had been using NCID on a raspberry pi successfully for a few years, and then it stopped working. I have just got around to looking at it and discovered the SD card was faulty. So a rebuild & re-install was necessary.
I'm not sure what the old version was, but it ran without a problem.
Now I'm using 1.11 and I'm having a bit of an issue with it doing something with the caller-id information.
A USB modem on the Raspberrry Pi is now connected to the phone line of a HT803, whereas before it was on a PSTN trunk.
During testing, I am connecting to the raspberry pi via telnet on port 3333.
I'm doing this command on the Raspberrry Pi:
sudo ncidd -C/etc/ncid/ncidd1.conf
I get this (for full stdout see ccidstdout.txt file attached):
+++++++++++++++++
Client 6 pos 2 from 10.1.1.11 [10.1.1.11] nodialout connected 10/05/2020 17:31:13
200 Server: ncidd [calleridpi:3333] (NCID) 1.11
210 API: 1.10 Feature Set 1 2 3 4 5
No client HELLO data received
254 Start of call log
Sent call log: /var/log/cidcall.log 22 lines
250 End of call log
Sent LineIDS to client: POTS
300 End of connection startup
RING
CIDINFO: LINEPOTSRING1TIME17:33:41*
NMBR = 0417997063
DATE = 1005
TIME = 0933
NAME = ©
04179970610050933
CID: DATEpc2020TIME 3LINEPOTSNMBRMESGNONENAMENO NAME
PuTTY
RING
CIDINFO: LINEPOTSRING2TIME17:33:43
RING
CIDINFO: LINEPOTSRING3TIME17:33:46*
RING
CIDINFO: LINEPOTSRING4TIME17:33:50*
RING
CIDINFO: LINEPOTSRING5TIME17:33:53*
RING
CIDINFO: LINEPOTSRING6TIME17:33:56*
RING
CIDINFO: LINEPOTSRING7TIME17:34:00
CIDINFO: LINEPOTSRING0TIME17:34:07
+++++++++++++++++++++++
On the telnet session I get:
200 Server: ncidd [calleridpi:3333] (NCID) 1.11
210 API: 1.10 Feature Set 1 2 3 4 5
254 Start of call log
...
300 End of connection startup
CIDINFO: LINEPOTSRING1TIME17:33:41
CID: DATE pc2020TIME 3LINEPOTSNMBRMESGNONENAMENO NAME CIDINFO: LINEPOTSRING2TIME17:33:43 CIDINFO: LINEPOTSRING3TIME17:33:46
CIDINFO: LINEPOTSRING4TIME17:33:50
CIDINFO: LINEPOTSRING5TIME17:33:53
CIDINFO: LINEPOTSRING6TIME17:33:56
CIDINFO: LINEPOTSRING7TIME17:34:00
CIDINFO: LINEPOTSRING0TIME17:34:07*
++++++++++++++++++
I guess I was expecting to see the 0417997063 number come through somewhere in the telnet session CID record...
Any idea what I am doing wrong?
BTW:I'm in Australia, and have a USB modem:CX93001-EIS_V0.2013-V92.
Regards
Graham
Anonymous
That's pretty wild. It didn't parse anything out of the caller ID sent by the modem.
Could you run it again with more verbose debug?
sudo ncidd -C/etc/ncid/ncidd1.conf -Dv7
I only need the full stdout from ncidd.
... but do clip out the part that shows the processing of your whitelist.
Thanks Ed
I noticed I didn't have a /usr/etc/ncid folder (some errors displayed). I created it and copied all the files from the /etc/ncid to it. I have not edited any files (whitelist, blacklist etc., apart from the ncidd1.conf file.)
I did the command as you said, with this stdout clip of whitelist processing:
+++++++++++++++++++
Using simple expressions for alias/blacklist/whitelist entries
Begin: Loading alias, blacklist and whitelist files [08:05:55]
Processed alias file: /etc/ncid/ncidd.alias
Alias Table:
Number of Entries: 0
Processed blacklist file: /etc/ncid/ncidd.blacklist
Blacklist Table:
Number of Entries: 19
SLOT ENTRY MATCH NAME
---- ----- ----------
000 "^1?999"
001 "^1?264"
002 "^1?268"
003 "^1?284"
004 "^1?273"
005 "^1?345"
006 "^1?441"
007 "^1?473"
008 "^1?649"
009 "^1?658"
010 "^1?664"
011 "^1?758"
012 "^1?767"
013 "^1?784"
014 "^1?876"
015 "^1?809"
016 "^1?829"
017 "^1?849"
018 "^1?900"
Processed whitelist file: /etc/ncid/ncidd.whitelist
Whitelist Table:
Number of Entries: 0
Leading 1 in call & alias/blacklist/whitelist not ignored
End: Loaded alias, blacklist and whitelist files [08:05:55]
CID logfile: /var/log/cidcall.log
CID logfile maximum size: 110000 bytes
Data logfile: /var/log/ciddata.log
+++++++++++++++
Regards
Graham
I may have phrased that badly.
Our forum posts are public, and I was suggesting that you remove the list of your friends and family.
I need to see the initial options processing, and the handling of a call.
One more thing: Before you start ncidd, could you create this log file and then send it after you've tried the call? It should accumulate the input from the modem.
sudo touch /var/log/ciddata.log
Hi Ed,
The whitelist and blacklist files are default (that I uploaded) - I was just showing that. There's nothing private in them. The only thing private is my calling number, but I'll have to live with that.
/var/log/ciddata.log was attached. I had already done:
sudo touch /var/log/ciddata.log
It has:
++++++++++++++++++++++++
RING
NMBR = 0417997063
DATE = 1005
TIME = 2332
NAME = ®
041799706310052332
RING
RING
RING
RING
NMBR = 0417997063
DATE = 1006
TIME = 0003
NAME = ´
041799706310060003
RING
RING
RING
RING
RING
NMBR = 0417997063
DATE = 1006
TIME = 0006
NAME = ±
041799706310060006
RING
RING
RING
++++++++++++++++++++++++
Is the modem returning a format ncidd doesn't understand?
I mean this:
NMBR = 0417997063
DATE = 1006
TIME = 0006
NAME = ±
041799706310060006
Is that the right format?
Graham
The modem often sends rubbish.
This should not bother it. I'll look into the logs.
Could you attach the logs here, rather than using copy-paste?
Never mind, found the ciddata.log up there in the earlier message.
Hi Graham,
Wild, indeed! Very interesting.
Using telnet to talk to the NCID server isn't supported nor recommended; NCID doesn't speak the telnet protocol so it is not surprising that the telnet example shows garbage.
(1) What is the make/model of your USB modem? If you happen to have a link to its manual that could be helpful.
(2) What is the modem's VID:PID? You can find it by examining the output of the
lsusb
command. Here's what I see on my RPi with a Lenovo USB modem -- vendor id is 17EF and product id is 7000.(3) I notice your modem is set for the US:
You might try setting it to 09 for Australia using minicom: AT+GCI=09
You only need to set it once. Some more info here.
I found the problem.
The extra line of rubbish that came from the modem after NAME started with 04 which caused the line to be parsed as though it had come from an XDMF modem. This messes up the previously parsed information.
Solution will take a few days.
Thanks Ed, that's great! Much appreciated.
Just for the record...
I was thinking about this overnight, and had decided to disconnect the Grandstream HT802 box supplied by my ISP iiNet as part of their BizPhone service, and connect my Archer 1600v phone line to the modem also supplied by iiNet which has an NBN phone line.
The result is it works:
++++++++++++++
End of startup: 10/07/2020 07:19:56
Serial fd 4 pos 0 sent 2 bytes 10/07/2020 07:20:22
Serial fd 4 pos 0 sent 6 bytes 10/07/2020 07:20:22
RING
Begin: userAlias() nmbr=0 name=0 line=POTS
End: userAlias() nmbr=0 name=0 line=POTS [07:20:22]
CIDINFO: LINEPOTSRING1TIME07:20:22
writeClients: CIDINFO: LINEPOTSRING1TIME07:20:22
Serial fd 4 pos 0 sent 2 bytes 10/07/2020 07:20:24
Serial fd 4 pos 0 sent 13 bytes 10/07/2020 07:20:24
DATE = 1007
Serial fd 4 pos 0 sent 13 bytes 10/07/2020 07:20:24
TIME = 0720
Serial fd 4 pos 0 sent 19 bytes 10/07/2020 07:20:24
NMBR = 0417997063
Serial fd 4 pos 0 sent 19 bytes 10/07/2020 07:20:24
NAME = 0417997063
received date, time, nmbr, name
Begin: userAlias() nmbr=0417997063 name=0417997063 line=POTS
End: userAlias() nmbr=0417997063 name=0417997063 line=POTS [07:20:24]
CID: DATE10072020TIME0720LINEPOTSNMBR0417997063MESGNONENAME0417997063
writeClients: CID: DATE10072020TIME0720LINEPOTSNMBR0417997063MESGNONENAME0417997063
Serial fd 4 pos 0 sent 2 bytes 10/07/2020 07:20:25
Serial fd 4 pos 0 sent 6 bytes 10/07/2020 07:20:25
RING
Begin: userAlias() nmbr=0 name=0 line=POTS
End: userAlias() nmbr=0 name=0 line=POTS [07:20:25]
CIDINFO: LINEPOTSRING2TIME07:20:25
writeClients: CIDINFO: LINEPOTSRING2TIME07:20:25
Serial fd 4 pos 0 sent 2 bytes 10/07/2020 07:20:29
Serial fd 4 pos 0 sent 6 bytes 10/07/2020 07:20:29
RING
Begin: userAlias() nmbr=0 name=0 line=POTS
End: userAlias() nmbr=0 name=0 line=POTS [07:20:29]
CIDINFO: LINEPOTSRING3TIME07:20:29
writeClients: CIDINFO: LINEPOTSRING3TIME07:20:29
ring: 3 timeout at: 07:20:36
Begin: userAlias() nmbr=0 name=0 line=POTS
End: userAlias() nmbr=0 name=0 line=POTS [07:20:36]
CIDINFO: LINEPOTSRING0TIME07:20:36
writeClients: CIDINFO: LINEPOTSRING0TIME07:20:36
++++++++++++++++++++++
So, in my mind, the HT802 is causing the issue or the BizPhone service is causing the issue.
The HT802 supplied by iiNet is password protected and doesn't have the http config/admin server enabled, and ssh is password protected. They don't want anyone touching it. Which is why I'm using NCID, because I would have liked to have gone directly to the HT802 to get the caller id info via the ethernet port, rather than using a modem - but that's life. I rang them up, and they don't provide a web service or any way at all of retrieving caller id info programatically. I find it amazing.
Thanks again Ed
Graham
I have a Nettalk device which gives ncidd a similar bunch of rubbish after NAME= but I havent had the accident of getting rubbish that was interpreted as something else from an SDMF modem.
We will do more in the future to address this.
The solution took longer than a few days. A small code change after months of thinking about it will appear in version 1.13.
NCID 1.13 was released 2022-04-30