sip2ncid (8) - Linux Manuals

sip2ncid: Inject CID info by snooping SIP invites

NAME

sip2ncid - Inject CID info by snooping SIP invites

SYNOPSIS

sip2ncid [options]

Options:

[-C <filename>      | --config <filename>]
[-D                 | --debug]
[-h                 | --help]
[-i <interface>     | --interface <interface>]
[-l                 | --list]
[-L <filename>      | --logfile <filename>]
[-n <[host][:port]> | --ncid <[host][:port>]
[-P <filename>      | --pidfile <filename>]
[-r <dumpfile>      | --readfile <dumpfile>]
[-s <[host][:port]> | --sip <[host][:port]>]
[-T                 | --testall]
[-t                 | --testudp]
[-u                 | --usage]
[-V                 | --version]
[-v <1-9>           | --verbose <1-9>]
[-w <dumpfile>      | --writefile <dumpfile>]

DESCRIPTION

Snoops SIP Invites via libpcap and injects the caller id information found to the NCID server specified. Snoops only udp traffic on the specified SIP host and port.

If /var/log/sip2ncid.log exists, it is used as a log file.

If a pid file is given, usually /var/run/sip2ncid.pid, then a pid file used to store the process ID.

The configuration file for sip2ncid is /etc/ncid/sip2ncid.conf.

OPTIONS

-C <filename> | --config <filename>
Configuration file.
Default: /etc/ncid/sip2ncid.conf
-D | --debug
Debug mode, sip2ncid stays attached to the terminal.
-h | --help
Prints this help
-i <interface> | --interface=<interface>
Specifies the network interface to snoop on. If this is not specified then libpcap will pick a network interface. This will generally be the first ethernet interface found.
-l | --listdevs
Returns a list of all network device names that can be used.
-L <filename> | --logfile=<filename>
Specifies the logfile name to use. The logfile must exist before it is used.
Default log filename: /var/log/sip2ncid.log
-n <[host][:port]> | --ncid=<[host][:port]>
Specifies the NCID server to connect to. Port may be specified by suffixing the hostname with <:port>, or if you only want to change the port, just <:port>. By default it will connect to port 3333 on "127.0.0.1".
-P <filename> | --pidfile=<filename>
Specifies the pidfile name to write. Set to /var/run/ncidd.pid in a rc or init script when used as a service. The program will still run if it does not have permission to write a pidfile. There is no default. If pidfile is not set, no pid file will be used.
-r <dumpfile> | --readfile <dumpfile>
Read packets from a libpcap capture file instead of the network. This also sets the testudp option, verbose to level 3, and no filter is applied. Mostly only useful for development and debug purposes.
-s <[host][:port]> | --sip=<[host][:port]>
Specifies the hostname of the SIP devie to snoop. You may also specify the UDP port by suffixing the hostname with :<port>, or if no hostname is wanted, just <:port>. If you do not specify a host, it defaults to the network interface. If you do not specify a port, it defaults to <5061> (Vonage default). Other Vonage ports are 5060 and 10000. The new Vonage default appears to be <10000>.
-T | --testall
Test for all packets. This option is used to check for IP packets without starting the NCID server. It will display a packet count and the packet type. It will not send any CID data to NCID. It also sets the debug option.
-t | --testudp
Test for SIP packets. This option is used to check if SIP packets exist without starting the NCID server. It will display the Caller ID line generated when a call comes in, and a CANCEL line if cancel was generated. It will not send any CID data to NCID. It also sets the debug option. -u | --usage Prints this help
-V | --version
Displays the version
-v <1-9> | --verbose <1-9>
Verbose mode. Output information, used for the logfile and the -D option. Set higher number for more information.
Default: verbose = 1
Most Useful: verbose = 3 (displays payload of all packets that matched the libpcap filter.
-w <dumpfile> | --writefile <dumpfile>
Write packets to a libpcap capture file. This also sets the debug option, verbose to level 3, and no filter is applied. Mostly only useful for development and debug purposes.

FILES

/etc/ncid/sip2ncid.conf

MESSAGES FORMAT

CID: ###DATE<MMDDHHMM>...LINE<####>...NMBR<###########>...NAME<words>+++
CIDINFO: ###CANCEL...NMBR<###########>...DATE<MMDDHHMM+++
CIDINFO: ###BYE...NMBR<###########>...DATE<MMDDHHMM>+++

Example

CID: ###DATE05311233...LINE1122...NMBR13215551212...NAMEBig John+++

EXAMPLES

# run sip2ncid as root and view status and SIP packets:
sip2ncid -Dv3

# run sip2ncid as root and list all network device names:
sip2ncid --listdevs

# run sip2ncid as root in test mode to look for SIP packets.
sip2ncid --testudp

# run sip2ncid as root in test mode to look for any packets.
sip2ncid --testall

DIAGNOSTICS

    Return Code    Meaning
    -----------    -------
         0         Successful
      -100         Usage
      -101         Invalid port number
      -104         Configuration file error
      -107         Invalid number
      -110         PID file already exists
        -?         System error

SEE ALSO

sip2ncid.conf.5 ncidd.8, ncidd.conf.5 ncidd.alias.5