1SIP2NCID(8) System Manager's Manual SIP2NCID(8)
2
3
4
6 sip2ncid - Inject CID info by snooping SIP invites
7
9 sip2ncid [options]
10
11 Options:
12
13 [-C <filename> | --config <filename>]
14 [-D | --debug]
15 [-h | --help]
16 [-i <interface> | --interface <interface>]
17 [-l | --list]
18 [-L <filename> | --logfile <filename>]
19 [-n <[host][:port]> | --ncid <[host][:port>]
20 [-P <filename> | --pidfile <filename>]
21 [-r <dumpfile> | --readfile <dumpfile>]
22 [-s <[host][:port]> | --sip <[host][:port]>]
23 [-T | --testall]
24 [-t | --testudp]
25 [-u | --usage]
26 [-V | --version]
27 [-v <1-9> | --verbose <1-9>]
28 [-W <1/0> | --warn <1/0>]
29 [-w <dumpfile> | --writefile <dumpfile>]
30
32 Snoops SIP Invites via libpcap and injects the caller id information
33 found to the NCID server specified. Snoops only udp traffic on the
34 specified SIP host and port.
35
36 If /var/log/sip2ncid.log exists, it is used as a log file.
37
38 If a pid file is given, usually /var/run/sip2ncid.pid, then a pid file
39 used to store the process ID.
40
41 The configuration file for sip2ncid is /etc/ncid/sip2ncid.conf.
42
44 -C <filename> | --config <filename>
45 Configuration file.
46 Default: /etc/ncid/sip2ncid.conf
47
48 -D | --debug
49 Debug mode, sip2ncid stays attached to the terminal.
50
51 -h | --help
52 Prints this help
53
54 -i <interface> | --interface=<interface>
55 Specifies the network interface to snoop on. If this is not
56 specified then libpcap will pick a network interface. This will
57 generally be the first ethernet interface found.
58
59 -l | --listdevs
60 Returns a list of all network device names that can be used.
61
62 -L <filename> | --logfile=<filename>
63 Specifies the logfile name to use. The logfile must exist
64 before it is used.
65 Default log filename: /var/log/sip2ncid.log
66
67 -n <[host][:port]> | --ncid=<[host][:port]>
68 Specifies the NCID server to connect to. Port may be specified
69 by suffixing the hostname with <:port>, or if you only want to
70 change the port, just <:port>. By default it will connect to
71 port 3333 on "127.0.0.1".
72
73 -P <filename> | --pidfile=<filename>
74 Specifies the pidfile name to write. Set to /var/run/ncidd.pid
75 in a rc or init script when used as a service. The program will
76 still run if it does not have permission to write a pidfile.
77 There is no default. If pidfile is not set, no pid file will be
78 used.
79
80 -r <dumpfile> | --readfile <dumpfile>
81 Read packets from a libpcap capture file instead of the network.
82 This also sets the testudp option, verbose to level 3, and no
83 filter is applied. Mostly only useful for development and debug
84 purposes.
85
86 -s <[host][:port]> | --sip=<[host][:port]>
87 Specifies the hostname of the SIP devie to snoop. You may also
88 specify the UDP port by suffixing the hostname with :<port>, or
89 if no hostname is wanted, just <:port>. If you do not specify a
90 host, it defaults to the network interface. If you do not spec‐
91 ify a port, it defaults to <5061> (Vonage default). Other Von‐
92 age ports are 5060 and 10000. The new Vonage default appears to
93 be <10000>.
94
95 -T | --testall
96 Test for all packets. This option is used to check for IP pack‐
97 ets without starting the NCID server. It will display a packet
98 count and the packet type. It will not send any CID data to
99 NCID. It also sets the debug option.
100
101 -t | --testudp
102 Test for SIP packets. This option is used to check if SIP pack‐
103 ets exist without starting the NCID server. It will display the
104 Caller ID line generated when a call comes in, and a CANCEL line
105 if cancel was generated. It will not send any CID data to NCID.
106 It also sets the debug option. -u | --usage Prints this help
107
108 -V | --version
109 Displays the version
110
111 -v <1-9> | --verbose <1-9>
112 Verbose mode. Output information, used for the logfile and the
113 -D option. Set higher number for more information.
114 Default: verbose = 1
115 Most Useful: verbose = 3 (displays payload of all packets that
116 matched the libpcap filter.
117
118 -W <0/1> | --warn <0/1>
119 Send clients 'No SIP packets' messages
120 Default: warn = 0
121
122 -w <dumpfile> | --writefile <dumpfile>
123 Write packets to a libpcap capture file. This also sets the
124 debug option, verbose to level 3, and no filter is applied.
125 Mostly only useful for development and debug purposes.
126
128 /etc/ncid/sip2ncid.conf
129
131 CID: ###DATE<MMDDHHMM>...LINE<####>...NMBR<###########>...NAME<words>+++
132 CIDINFO: ###CANCEL...NMBR<###########>...DATE<MMDDHHMM+++
133 CIDINFO: ###BYE...NMBR<###########>...DATE<MMDDHHMM>+++
134
135 Example
136 CID: ###DATE05311233...LINE1122...NMBR13215551212...NAMEBig John+++
137
139 # run sip2ncid as root and view status and SIP packets:
140 sip2ncid -Dv3
141
142 # run sip2ncid as root and list all network device names:
143 sip2ncid --listdevs
144
145 # run sip2ncid as root in test mode to look for SIP packets.
146 sip2ncid --testudp
147
148 # run sip2ncid as root in test mode to look for any packets.
149 sip2ncid --testall
150
152 Return Code Meaning
153 ----------- -------
154 0 Successful
155 -100 Usage
156 -101 Invalid port number
157 -104 Configuration file error
158 -107 Invalid number
159 -110 PID file already exists
160 -? System error
161
163 sip2ncid.conf.5 ncidd.8, ncidd.conf.5 ncidd.alias.5
164
165
166
167 SIP2NCID(8)