1SIP2NCID(8) NCID SIP2NCID(8)
2
3
4
6 sip2ncid - SIP to NCID gateway, inject CID info into ncidd by snooping
7 SIP 'INVITE's
8
10 sip2ncid [options]
11
12 Options:
13
14 [-C <filename> | --config <filename>]
15 [-D | --debug]
16 [-h | --help]
17 [-H <0|1> | --hostname-flag <0|1>]
18 [-i <interface> | --interface <interface>]
19 [-l | --listdevs]
20 [-L <filename> | --logfile <filename>]
21 [-n <[host][:port]> | --ncid <[host][:port]>]
22 [-P <filename> | --pidfile <filename>]
23 [-r <dumpfile> | --readfile <dumpfile>]
24 [-s <[host][:port]> | --sip <[host][:port]>]
25 [-S <1-9> | --lineid-size <1-9>]
26 [-t | --testsip]
27 [-T | --testall]
28 [-v <1-9> | --verbose <1-9>]
29 [-V | --version]
30 [-w <dumpfile> | --writefile <dumpfile>]
31 [-W <0|1> | --warn <0|1>]
32 [--osx-launchd]
33
35 Snoops SIP Invites via libpcap and injects the caller id information
36 found to the NCID server specified. Snoops TCP and UDP traffic on the
37 specified SIP host and port.
38
39 The sip2ncid gateway uses the trailing digits of a phone line as the
40 lineid for each phone line monitored. The default number of trailing
41 digits is 4 unless changed by the extension-size option.
42
43 The log file is /var/log/sip2ncid.log.
44
45 If a pid file is given, usually /var/run/sip2ncid.pid, then a pid file
46 used to store the process ID.
47
48 The configuration file for sip2ncid is /etc/ncid/sip2ncid.conf.
49
51 -C <filename> | --config <filename>
52 Configuration file.
53
54 Default: /etc/ncid/sip2ncid.conf
55
56 -D | --debug
57 Debug mode, sip2ncid stays attached to the terminal.
58
59 -h | --help
60 Prints this help
61
62 -H <0|1> | --hostname-flag <0|1>
63 Sets the hosthame flag so the IDENT string sent to a server will
64 include the hostname with the program name.
65
66 Default: 0
67
68 -i <interface> | --interface <interface>
69 Specifies the network interface to snoop on. If this is not
70 specified then libpcap will pick a network interface. This will
71 generally be the first Ethernet interface found.
72
73 -l | --listdevs
74 Returns a list of all network device names that can be used.
75
76 -L <filename> | --logfile <filename>
77 Specifies the logfile name to use. The logfile must exist be‐
78 fore it is used.
79
80 Default log filename: /var/log/sip2ncid.log
81
82 -n <[host][:port]> | --ncid <[host][:port]>
83 Specifies the NCID server to connect to. Port may be specified
84 by suffixing the hostname with <:port>, or if you only want to
85 change the port, just <:port>. By default it will connect to
86 port 3333 on "127.0.0.1".
87
88 -P <filename> | --pidfile <filename>
89 Specifies the pidfile name to write. Set to /var/run/ncidd.pid
90 in a rc or init script when used as a service. The program will
91 still run if it does not have permission to write a pidfile.
92 There is no default. If pidfile is not set, no pid file will be
93 used.
94
95 -r <dumpfile> | --readfile <dumpfile>
96 Read packets from a libpcap capture file instead of the network.
97 This also sets the testsip option, verbose to level 3 and no
98 filter is applied. Mostly only useful for development and debug
99 purposes.
100
101 -s <[host][:port]> | --sip <[host][:port]>
102 Specifies the hostname of the SIP device to snoop. Both TCP and
103 UDP protocol packets are automatically monitored. You may also
104 specify the port by suffixing the hostname with :<port>, or if
105 no hostname is wanted, just <:port>. If you do not specify a
106 host, it defaults to the network interface. If you do not spec‐
107 ify a port, it defaults to <5061> (Vonage default). Other Von‐
108 age ports are 5060 and 10000. The new Vonage default appears to
109 be <10000>.
110
111 -S <1-9> | --lineid-size <1-9>
112 Specify the number of trailing digits from a phone number to be
113 used as the lineid. On a PBX, this usually represents the exten‐
114 sion number.
115
116 Default: 4
117
118 -t | --testsip
119 Test for SIP packets. This option is used to check if SIP pack‐
120 ets exist without starting the NCID server. It will display the
121 Caller ID line generated when a call comes in and a CANCEL line
122 if cancel was generated. It will not send any CID data to NCID.
123 It also sets the debug option.
124
125 -T | --testall
126 Test for all packets. This option is used to check for IP pack‐
127 ets without starting the NCID server. It will display a packet
128 count and the packet type. It will not send any CID data to
129 NCID. It also sets the debug option.
130
131 -v <1-9> | --verbose <1-9>
132 Verbose mode. Send information into the logfile and display in‐
133 formation for the -D option. Set a higher number for more in‐
134 formation.
135
136 To debug, try: verbose = 3
137
138 Default: verbose = 1
139
140 -V | --version
141 Displays the version
142
143 -w <dumpfile> | --writefile <dumpfile>
144 Write packets to a libpcap capture file. This also sets the de‐
145 bug option, verbose to level 3 and no filter is applied. Mostly
146 only useful for development and debug purposes.
147
148 -W <0|1> | --warn <0|1>
149 Send 'No SIP packets' or 'SIP packets returned' messages to
150 clients
151
152 Default: warn = 0
153
154 --osx-launchd
155 This option is only for Mac OSX when using launchd to control
156 sip2ncid. It prevents sip2ncid from entering daemon mode. It
157 is like debug mode, but nothing is printed to the screen.
158
160 /etc/ncid/sip2ncid.conf
161 /var/run/sip2ncid.pid
162 /var/log/sip2ncid.log
163
165 CALL: ###DATE<MMDDHHMM>...LINE<####>...NMBR<###########>...NAME<words>+++
166 CALLINFO: ###CANCEL...NMBR<###########>...DATE<MMDDHHMM+++
167 CALLINFO: ###BYE...NMBR<###########>...DATE<MMDDHHMM>+++
168
169 Example
170 CALL: ###DATE05311233...LINE1122...NMBR13215551212...NAMEBig John+++
171
173 # run sip2ncid as root and view status and SIP packets:
174 sip2ncid -Dv3
175
176 # run sip2ncid as root and list all network device names:
177 sip2ncid --listdevs
178
179 # run sip2ncid as root in test mode to look for SIP packets.
180 sip2ncid --testsip
181
182 # run sip2ncid as root in test mode to look for any packets.
183 sip2ncid --testall
184
186 Return Code Meaning
187 ----------- -------
188 0 Successful
189 -100 Usage
190 -101 Invalid port number
191 -104 Configuration file error
192 -107 Invalid number
193 -110 PID file already exists
194 -? System error
195
197 sip2ncid.conf.5, ncidd.8, ncidd.conf.5
198
199
200
201NCID 2022-11-8 SIP2NCID(8)