SIP2NCID(8)
π SIP2NCID β the sip2ncid(8) manual, but make it make sense
okay bestie, so this is sip2ncid(8) from the NCID section of your manual pages, and I'm gonna walk you through it like we're texting at 2am π¦
β¨ NAME β¨
sip2ncid β a SIP to NCID gateway, aka it injects CID info into ncidd by snooping SIP INVITEs πβ¨
πΈ SYNOPSIS πΈ
sip2ncid [options]
Options, bestie:
[-C <filename> | --config <filename>]
[-D | --debug]
[-h | --help]
[-H <0|1> | --hostname-flag <0|1>]
[-i <interface> | --interface <interface>]
[-l | --listdevs]
[-L <filename> | --logfile <filename>]
[-n <[host][:port]> | --ncid <[host][:port]>]
[-P <filename> | --pidfile <filename>]
[-r <dumpfile> | --readfile <dumpfile>]
[-s <[host][:port]> | --sip <[host][:port]>]
[-S <1-9> | --lineid-size <1-9>]
[-t | --testsip]
[-T | --testall]
[-v <1-9> | --verbose <1-9>]
[-V | --version]
[-w <dumpfile> | --writefile <dumpfile>]
[-W <0|1> | --warn <0|1>]
[--osx-launchd]
π DESCRIPTION π
So what it does: it snoops SIP Invites via libpcap and injects the caller id information it finds to the NCID server you specified. It snoops TCP and UDP traffic on the specified SIP host and port. no cap π«Ά
The sip2ncid gateway uses the trailing digits of a phone line as the lineid for each phone line monitored. The default number of trailing digits is 4, unless you change it with the extension-size option.
The log file is /var/log/sip2ncid.log.
If a pid file is given β usually /var/run/sip2ncid.pid β then a pid file used to store the process ID. (yes that's literally what it says, iconic π
)
The configuration file for sip2ncid is prefix3=/etc/ncid/sip2ncid.conf.
π OPTIONS π
-C <filename>,--config <filename>β the configuration file. Default:prefix3=/etc/ncid/sip2ncid.conf-D,--debugβ debug mode,sip2ncidstays attached to the terminal π₯οΈ-h,--helpβ prints this help-H <0|1>,--hostname-flag <0|1>β sets the hosthame flag so theIDENTstring sent to a server will include the hostname with the program name. Default:0-i <interface>,--interface <interface>β specifies the network interface to snoop on. If this is not specified thenlibpcapwill 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.pidin 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 alibpcapcapture file instead of the network. This also sets thetestsipoption, 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 device to snoop. Both TCP and UDP protocol packets are automatically monitored. You may also specify the 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>.-S <1-9>,--lineid-size <1-9>β specify the number of trailing digits from a phone number to be used as thelineid. On a PBX, this usually represents the extension number. Default:4-t,--testsipβ 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 aCANCELline if cancel was generated. It will not send any CID data to NCID. It also sets the debug option.-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.-v <1-9>,--verbose <1-9>β verbose mode. Send information into the logfile and display information for the-Doption. Set a higher number for more information. To debug, try:verbose = 3Default:verbose = 1-V,--versionβ displays the version β-w <dumpfile>,--writefile <dumpfile>β write packets to alibpcapcapture file. This also sets the debug option, verbose to level 3 and no filter is applied. Mostly only useful for development and debug purposes π οΈ-W <0|1>,--warn <0|1>β send'No SIP packets'or'SIP packets returned'messages to clients Default:warn = 0--osx-launchdβ this option is only for Mac OSX when usinglaunchdto controlsip2ncid. It preventssip2ncidfrom entering daemon mode. It is like debug mode, but nothing is printed to the screen. π
π FILES π
prefix3=/etc/ncid/sip2ncid.conf
/var/run/sip2ncid.pid
/var/log/sip2ncid.log
π MESSAGES FORMAT π
CALL: ###DATE<MMDDHHMM>...LINE<####>...NMBR<###########>...NAME<words>+++
CALLINFO: ###CANCEL...NMBR<###########>...DATE<MMDDHHMM+++
CALLINFO: ###BYE...NMBR<###########>...DATE<MMDDHHMM>+++
β¨ Example β¨
CALL: ###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 --testsip
# run sip2ncid as root in test mode to look for any packets.
sip2ncid --testall
π DIAGNOSTICS π
Return codes, bestie β here's the whole lineup:
0β Successful β-100β Usage-101β Invalid port number-104β Configuration file error-107β Invalid number-110β PID file already exists-?β System error
(the original spells this out as a little table withReturn CodeandMeaningcolumns, but we're keeping the same numbers, same order, same meanings π)
π¦ SEE ALSO π¦
sip2ncid.conf.5, ncidd.8, ncidd.conf.5
and that's the whole page, bestie, you ate it up π
β¨ This lil slice of NCID lore is from 2022-11-8, and it's living in the NCID manual β so if you forget everything else, remember: it snoops SIP INVITEs, it talks to ncidd, and it's lowkey iconic ππ«Ά
π¦ where this page comes from
- fedora 43: ncid-gateways 1.18-4.fc43 Β· GPL-3.0-or-later
- fedora 44: ncid-gateways 1.18-5.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms