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