NCID - Network Caller ID

Network Caller ID is distributing the Caller ID over a network to a
variety of devices and computers. The server, ncidd, monitors either a
modem, Caller ID device, or gateway for the CID data. The data is
collected and sent, via TCP, to one or more connected clients. The
server supports multiple gateways which can be used with or without a
modem or device.

I've tested this package on a WRT54GL running OpenWRT backfire with an
ordinary Linksys SIP gateway and a POTS connected to it and ncidd and
sip2ncid both run stable now for more than a month.
As clients I've tested a Dreambox TV settop box with NCID-Client
supplied by the Dream-community (obtained from
http://www.dream-multimedia-tv.de/board/index.php?page=Thread&threadID=13767)
and my Linux box running the official NCID client. There are a bunch
of other clients available e.g. for TiVO or other platforms
(http://ncid.sourceforge.net has more info). There is also an asterisk
plugin in the works.
I consider this package to be extremely useful to instantly retrieve
caller ID information on TV sets, computers or other devices, and I
therefore decided to build this package.
I had to replace the original init-scripts by basic scripts written by
myself and they seem to work. The ncid package comes with a bunch of
plugins which I could only test partly due to missing hardware (like
e.g. modems, certain TV settop boxes etc.) or entirely different
software installation requirements (e.g. Samba). However, I have
preconfigured sip2ncid to listen on the br-lan interface for Sipgate
VOIP standard configuration calls and ncidd to distribute the
information to the internal network, and both programs should start
automatically after installation and hopefully the package will fit
many needs as it is.
NCID can easily be customized for special needs following the
instructions from http://ncid.sourceforge.net/#Doumentation.
I hope this package is useful for anyone!
After installation, the package should appear in the Telephony submenu
of Network in Menuconfig.
This package compiles fine on OpenWRT/Trunk.
Note that this is my first message to this list and my first patch at
all, please forgive me if I didn't do everything right immediately.

Signed-off-by: Christopher Intemann <[email protected]>

net/ncid/Makefile                              | 102
++++++++++++++++++++++++++++++++++++
net/ncid/files/ncid-initmodem.init             |  14 +++++
net/ncid/files/ncid-mythtv.init                |  14 +++++
net/ncid/files/ncid-page.init                  |  14 +++++
net/ncid/files/ncid-speak.init                 |  14 +++++
net/ncid/files/ncid-yac.init                   |  14 +++++
net/ncid/files/ncid2ncid.init                  |  14 +++++
net/ncid/files/ncidd.conf                      | 276
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
net/ncid/files/ncidd.init                      |  14 +++++
net/ncid/files/ncidsip.init                    |  14 +++++
net/ncid/files/sip2ncid.conf                   |  91
++++++++++++++++++++++++++++++++
net/ncid/files/sip2ncid.init                   |  14 +++++
net/ncid/files/yac2ncid.init                   |  14 +++++
net/ncid/patches/001-openwrtcrosscompile.patch |  10 ++++
net/ncid/postinst                              |  27 ++++++++++
15 files changed, 646 insertions(+)


diff --git a/net/ncid/Makefile b/net/ncid/Makefile
new file mode 100644
index 0000000..48b878e
--- /dev/null
+++ b/net/ncid/Makefile
@@ -0,0 +1,102 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ncid
+PKG_VERSION:=0.84
+PKG_RELEASE:=0.1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+PKG_SOURCE:=ncid-$(PKG_VERSION)-src.tar.gz
+PKG_SOURCE_URL:=@SF/ncid
+PKG_MD5SUM:=4451cb67bd13899e3f98aeda8d8e4f40
+PKG_CAT:=zcat
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ncid
+  SECTION:=base
+  CATEGORY:=Network
+  SUBMENU:=Telephony
+  DEFAULT:=y
+  TITLE:=Network Caller ID utility
+  URL:=http://ncid.sourceforge.net/
+  MAINTAINER:=inte <[email protected]>
+  DEPENDS:=+libpcap
+endef
+
+define Package/ncid/description
+ Network Caller ID utility
+ Network Caller ID is distributing the Caller ID over a network to a
variety of devices and computers.
+ The server, ncidd, monitors either a modem, Caller ID device, or
gateway for the CID data. The data is collected and sent, via TCP, to
one or more connected clients. The server supports multiple gateways
which can be used with or without a modem or device.
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) OpenWRT
+endef
+
+
+define Package/ncid/conffiles
+/etc/ncid/ncidd.conf
+/etc/ncid/sip2ncid.conf
+/etc/ncid/ncidrotate.conf
+/etc/ncid/ncid.logrotate
+/etc/ncid/ncid.conf
+/etc/ncid/ncidmodules.conf
+/etc/ncid/ncid2ncid.conf
+/etc/ncid/ncidsip.conf
+/etc/ncid/sip2ncid.conf
+/etc/ncid/yac2ncid.conf
+/etc/ncid/ncidd.blacklist
+/etc/ncid/ncidd.alias
+endef
+
+define Package/ncid/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/ncidd $(1)/usr/sbin/ncidd
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cidgate/sip2ncid $(1)/usr/sbin/sip2ncid
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cidgate/ncidsip $(1)/usr/sbin/ncidsip
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/cidalias $(1)/usr/bin/cidalias
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/cidcall $(1)/usr/bin/cidcall
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/cidupdate $(1)/usr/bin/cidupdate
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/ncid $(1)/usr/bin/ncid
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cidgate/ncid2ncid $(1)/usr/bin/ncid2ncid
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cidgate/yac2ncid $(1)/usr/bin/yac2ncid
+       $(INSTALL_DIR) $(1)/etc/ncid
+       $(INSTALL_DATA) ./files/ncidd.conf $(1)/etc/ncid/ncidd.conf
+       $(INSTALL_DATA) ./files/sip2ncid.conf $(1)/etc/ncid/sip2ncid.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/ncidrotate.conf
$(1)/etc/ncid/ncidrotate.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/ncid.logrotate
$(1)/etc/ncid/ncid.logrotate
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/client/ncid.conf 
$(1)/etc/ncid/ncid.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ncidmodules.conf
$(1)/etc/ncid/ncidmodules.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/cidgate/ncid2ncid.conf
$(1)/etc/ncid/ncid2ncid.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/cidgate/ncidsip.conf
$(1)/etc/ncid/ncidsip.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/cidgate/sip2ncid.conf
$(1)/etc/ncid/sip2ncid.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/cidgate/yac2ncid.conf
$(1)/etc/ncid/yac2ncid.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/server/ncidd.blacklist
$(1)/etc/ncid/ncidd.blacklist
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/server/ncidd.alias 
$(1)/etc/ncid/ncidd.alias
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/ncidd.init $(1)/etc/init.d/ncidd
+       $(INSTALL_BIN) ./files/sip2ncid.init $(1)/etc/init.d/sip2ncid
+       $(INSTALL_BIN) ./files/ncid2ncid.init $(1)/etc/init.d/ncid2ncid
+       $(INSTALL_BIN) ./files/ncid-initmodem.init 
$(1)/etc/init.d/ncid-initmodem
+       $(INSTALL_BIN) ./files/ncid-mythtv.init $(1)/etc/init.d/ncid-mythtv
+       $(INSTALL_BIN) ./files/ncid-page.init $(1)/etc/init.d/ncid-page
+       $(INSTALL_BIN) ./files/ncidsip.init $(1)/etc/init.d/ncidsip
+       $(INSTALL_BIN) ./files/ncid-speak.init $(1)/etc/init.d/ncid-speak
+       $(INSTALL_BIN) ./files/ncid-yac.init $(1)/etc/init.d/ncid-yac
+       $(INSTALL_BIN) ./files/sip2ncid.init $(1)/etc/init.d/sip2ncid
+       $(INSTALL_BIN) ./files/yac2ncid.init $(1)/etc/init.d/yac2ncid
+       $(INSTALL_DIR) $(1)/usr/share/ncid
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-initmodem
$(1)/usr/share/ncid/ncid-initmodem
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-kpopup
$(1)/usr/share/ncid/ncid-kpopup
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-mythtv
$(1)/usr/share/ncid/ncid-mythtv
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-page
$(1)/usr/share/ncid/ncid-page
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-samba
$(1)/usr/share/ncid/ncid-samba
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/ncidrotate
$(1)/usr/share/ncid/ncidrotate
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-skel
$(1)/usr/share/ncid/ncid-skel
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-speak
$(1)/usr/share/ncid/ncid-speak
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-tivo
$(1)/usr/share/ncid/ncid-tivo
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/ncid-yac 
$(1)/usr/share/ncid/ncid-yac
+endef
+
+$(eval $(call BuildPackage,ncid))
diff --git a/net/ncid/files/ncid-initmodem.init
b/net/ncid/files/ncid-initmodem.init
new file mode 100755
index 0000000..ee5cc06
--- /dev/null
+++ b/net/ncid/files/ncid-initmodem.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncid-initmodem
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/ncid-mythtv.init b/net/ncid/files/ncid-mythtv.init
new file mode 100755
index 0000000..be02e9d
--- /dev/null
+++ b/net/ncid/files/ncid-mythtv.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncid-mythtv
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/ncid-page.init b/net/ncid/files/ncid-page.init
new file mode 100755
index 0000000..bcee513
--- /dev/null
+++ b/net/ncid/files/ncid-page.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncid-page
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/ncid-speak.init b/net/ncid/files/ncid-speak.init
new file mode 100755
index 0000000..2739e7f
--- /dev/null
+++ b/net/ncid/files/ncid-speak.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncid-speak
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/ncid-yac.init b/net/ncid/files/ncid-yac.init
new file mode 100755
index 0000000..52ed5d7
--- /dev/null
+++ b/net/ncid/files/ncid-yac.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncid-yac
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/ncid2ncid.init b/net/ncid/files/ncid2ncid.init
new file mode 100755
index 0000000..ee54d23
--- /dev/null
+++ b/net/ncid/files/ncid2ncid.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncid2ncid
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/ncidd.conf b/net/ncid/files/ncidd.conf
new file mode 100644
index 0000000..ed49e07
--- /dev/null
+++ b/net/ncid/files/ncidd.conf
@@ -0,0 +1,276 @@
+# NCID - Network CallerID Server Config File
+
+# File last changed: Tue Apr 26, 2011
+
+################################
+# Definitions and Line formats #
+################################
+
+# lines can be blank, or start with the words: send, set #
+#
+# A line is divided into words, separated by spaces
+#
+# A word is either a string of non-blank characters, everything
+# between double quotes, or an equal sign.
+#
+# SEND LINE FORMAT:
+#   send DATATYPE [DATATYPE] ...
+#        where DATATYPE = cidlog, cidinfo, callout
+#
+# SET LINE FORMAT:
+#   set ITEM = VALUE [ITEM = VALUE] ...
+#       where ITEM = cidalias, cidlog, cidlogmax, datalog, gencid, ignore1,
+#                    initcid, initstr, lineid, lockfile, nomodem, noserial,
+#                    pidfile, port, send, ttyclocal, ttyport, ttyspeed, verbose
+
+##########################
+# Log file verbose level #
+##########################
+
+# Set the verbose level
+# The default value is 1, the range is 1-7
+# verbose levels 8 and 9 are only for the command line
+# set verbose = 3
+
+############################
+# Log and Info for Clients #
+############################
+
+# Send the call log to a client when connected
+# The default is not to send the call log file
+#send cidlog
+
+# Send call info (LINE and RING) to a client at each ring
+# The default is not to send the call info line
+#send cidinfo
+
+#####################
+# NCID Network Port #
+#####################
+
+# The default TCP/IP port is 3333
+# set port = 3334
+
+############################
+# PID, Alias and Log Files #
+############################
+
+# Set pidfile to /var/run/ncidd.pid in rc and init scripts
+# The default is no PID file
+# set pidfile = /var/log/ncidd.pid
+
+# The default CID alias file: /etc/ncid/ncidd.alias
+# set cidalias = /etc/ncid/ncidd.alias
+
+# An alias that includes a telephone number depends on the number
+# received from a call.  In the US, a leading 1 is not always part
+# of the telephone number.  For instance, Vonage always includes
+# the 1 on incoming calls but on outgoing calls the 1 is optional.
+# If the ignore1 option is set, a leading 1 is not included in an
+# alias definition.
+# ignore1 = 0 default: the leading 1 may or may not be in a call
+# ignore1 = 1          ignore the leading 1 if it is in a call
+# set ignore1 = 1
+
+# The default CID call log file: /var/log/cidcall.log
+# (also make the change in /etc/logrotate.d/ncidd
+#  and also /etc/ncid/ncidrotate.conf)
+# set cidlog = /var/log/cidcall.log
+
+# Set the maximum size in bytes for the CID log file
+# The default is 110,000 bytes and the maximum is 100,000,000
+# Do not include commas when setting cidlogmax
+# set cidlogmax = 500000
+
+# The default tty data log file: /var/log/ciddata.log
+# the log file must exist, ncidd will not create it
+#  (also make the change in /etc/logrotate.d/ncidd
+#   and also /etc/ncid/ncidrotate.conf)
+# set datalog = /var/log/ciddata.log
+
+#########################
+# Automatic Call Hangup #
+#########################
+
+# The automatic call hangup requires a modem to hangup the call,
+# but works if ncidd is using either a modem or gateway to obtain
+# the Caller ID information.
+
+# Set hangup to a 1 if you would like ncidd to terminate a
+# call that has its name or number on a blacklist
+# hangup = 0 Default: do not terminate a call
+# hangup = 1          terminate a call based on the blacklist file
+# set hangup = 1
+
+# The default blacklist file: /etc/ncid/ncidd.blacklist
+# set blacklist = /etc/ncid/ncidd.blacklist
+
+#######################
+# Serial or No Serial #
+#######################
+
+# Normally a serial device is required to capture CID information.
+# If you are using one or more gateways and do not have a serial
+# device, set noserial to 1.
+
+# If noserial is set to 1 and hangup is set to 0, the TTY Configuration,
+# Modem, and Modem Initialization set commands are not used.
+
+#  NETWORK AND NO SERIAL: noserial = 1 (do not use a serial port)
+#  SERIAL AND NETWORK:    noserial = 0 (default - use a serial port)
+set noserial = 1
+
+## NOTE: if noserial is set to 1 and hangup is set to 0, nothing needs
+## to be configured beyond this point.
+
+#####################
+# TTY Configuration #
+#####################
+
+## Required if noserial is set to 0 or hangup is set to 1
+
+# The default tty port: /dev/modem
+# set ttyport = /dev/cu.modem # Macintosh OS X
+# set ttyport = /dev/ttyS0    # Linux Serial Port 0
+# set ttyport = /dev/ttyACM0  # Linux USB modem 0
+
+# The default tty port speed: 19200
+# The tty speed can be one of: 38400, 19200, 9600, 4800
+# set ttyspeed = 4800 # NetCallerID port speed
+
+# Ignore tty control signals for internal modems and 3 wire serial cables
+#   Disable tty control signals: ttyclocal = 1
+#   Enable tty control signals: ttyclocal = 0 (default)
+# set ttyclocal = 1
+
+# The lockfile name is generated automatically
+# If tty port is /dev/modem, the default lockfile is:
+#    Fedora : /var/lock/lockdev/LCK..modem
+#    FreeBSD: /var/spool/lock/LCK..modem
+#    Mac    : /var/spool/uucp/LCK..modem
+#    Ubuntu : /var/lock/LCK..modem
+#    Default: /var/lock/LCK..modem
+# set lockfile = /var/lock/lockdev/LCK..ttyS0
+#
+
+###################################################################
+## NOTE: if noserial is set to 1 and hangup is set to 0, nothing ##
+##       needs to be configured beyond this point.               ##
+###################################################################
+
+############################
+# Telephone Line Indicator #
+############################
+
+# Set the line indicator if you want it displayed for the modem.
+# or if you have more than one telephone line.  The default value
+# for lineid is '-' and is not displayed.  Setting it to any other
+# value will display it.
+#
+# You can set lineid to 'POTS' (Plain Old Telephone Service) to
+# have it displayed or the last 4 digits of your number if you
+# have more than one telephone line.
+# lineid default: -
+set lineid = POTS
+
+################################
+# Generate a generic Caller ID #
+################################
+
+# Generate a generic Caller ID at ring 2 if one is not received
+# from the modem either because the telco is not sending it or
+# because the modem does not support it.  This feature requires
+# the modem to indicate each time the modem rings.
+
+# gencid = 0          never generate a generic Caller ID
+# gencid = 1 default: generate a generic Caller ID when needed
+# set gencid = 0
+
+#####################
+# Modem or No Modem #
+#####################
+
+# Obtain CallerID from a CID device or a modem
+# The NetCallerID device is not a modem
+#  DEVICE: nomodem = 1 (do not send AT commands)
+#  MODEM:  nomodem = 0 (default - send AT commands)
+set nomodem = 1
+
+########################
+# Modem Initialization #
+########################
+
+# initstr is required if noserial is set to 0 and nomodem is set to 0
+# or hangup is set to 1
+
+# The default modem initialization is: "AT Z S0=0 E1 V1 Q0"
+# set initstr = "ATE1V1Q0"
+#
+# If minicom can talk to the modem but ncidd fails, use the Minicom init string
+# Minicom initialization string is "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0"
+# set initstr = "ATS7=45S0=0L1V1X4&c1E1Q0"
+#
+# Alternate modem initialization string
+# set initstr = "AT&FE1V1Q0+VIP"
+
+# Modem initialization string for the Mac Motorola UbiSoft modem
+# set initstr = "AT+FCLASS=8;+VCID=1" # Macintosh OS X
+
+# Modem initialization string for the US Robotics 5637, v.92 56k USB modem
+# set initstr = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
+
+# The U.S.Robotics USR5631 56K Faxmodem has a +GCI command to set the
+# country code to adjust parameters for a particular telephone network
+# (perhaps other modems do also).  See the following on how to set +GCI
+#   http://www.usr.com/support/5631/5631-ug/generic.htm
+#   doc/Modem-init (has a copy of the information needed to set +GCI)
+
+# Addon strings to set modem for Distinctive Ring:
+#   http://www.modemsite.com/56k/dring.asp
+#
+# 3Com/USR/TI chipset: ATS41=1
+#   Reported Ring Codes: RING A, RING B, RING C
+# Rockwell/Conexant chipset: AT-SDR=7
+#   Reported Ring Codes: RING 1, RING 2, RING 3
+# Lucent/Agere chipset: AT+VDR=1,0
+#   Reported DROF/DRON messages: DRON=5 DROF=11, DRON=5 DROF=34
+#
+# Example adds 3Com DR to the default modem initialization
+# set initstr = "ATE1V1Q0S41=1"
+
+# initcid is not required if noserial is set to 0 and hangup is set to 1
+
+# The default for ncidd is to try two CID strings to setup
+# CallerID: "AT+VCID=1" and if that fails: "AT#CID=1".
+# set initcid = "AT#CID=1"
+#
+# Alternate CID strings to try if default does not work:
+# set initcid = "AT+FCLASS=8;+VCID=1"
+# set initcid = "AT-STE=1;+VCID=1"
+# set initcid = "AT-STE=1;#CID=1"
+#
+# CID init string to skip sending any CID string to modem
+# Useful if NCID is used only as a visual call indicator
+# set initcid = ""
+
+#################
+# TiVo Settings #
+#################
+# set ttyclocal = 1 # TiVo requires CLOCAL
+#
+# set ttyport = /dev/ttyS1 # TiVo PPC Modem Port
+# set ttyport = /dev/ttyS3 # TiVo MIPS Modem Port
+#
+# set lockfile = /var/tmp/modemlock # TiVo Modem Lockfile
+#
+# To use a modem on the TiVo serial port
+#   Tivo (stereo mini jack) ->
+#   -> (stereo mini plug) TiVo serial cable (9-pin male) ->
+#   -> (9-pin Female) PC modem cable (25-pin Male) ->
+#   -> (25-pin Female) Modem
+# if the modem has switches, disable DTR
+# Use this string to set the modem before attaching it to the TiVo:
+#   AT&F0&D0&B1&W
+#
+# End TiVo Settings
+
diff --git a/net/ncid/files/ncidd.init b/net/ncid/files/ncidd.init
new file mode 100755
index 0000000..4d56ebd
--- /dev/null
+++ b/net/ncid/files/ncidd.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncidd
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/ncidsip.init b/net/ncid/files/ncidsip.init
new file mode 100755
index 0000000..6251d0e
--- /dev/null
+++ b/net/ncid/files/ncidsip.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=ncidsip
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/sip2ncid.conf b/net/ncid/files/sip2ncid.conf
new file mode 100644
index 0000000..6e3db8f
--- /dev/null
+++ b/net/ncid/files/sip2ncid.conf
@@ -0,0 +1,91 @@
+# sip2ncid configuration file
+
+# File last changed: Sun Sep 4, 2011
+
+################################
+# Definitions and Line formats #
+################################
+
+# lines can be blank, or start with the words: set, alias, #
+#
+# A line is divided into words, separated by spaces
+#
+# A word is either a string of non-blank characters, everything
+# between double quotes, or an equal sign.
+#
+# SET LINE FORMAT:
+#   set ITEM = VALUE [ITEM = VALUE] ...
+#       where ITEM = dumpfile, pidfile, verbose, warn, rmdups
+#                    ncidhost, ncidport, siphost, sipport
+
+##########################
+# Log file verbose level #
+##########################
+
+# Set the verbose level
+# The default value is 1, the range is 1-8
+# verbose levels 9 is only for the command line
+# set verbose = 3
+
+############
+# PID File #
+############
+
+# Set the PID file is set to /var/run/sip2ncid.pid for rc and init scripts
+# The default is no PID file
+# set pidfile = /var/run/sip2ncid.pid
+
+# ###################
+# Network Interface #
+# ###################
+
+# Set the network interface
+# pcap finds the network interface
+set interface = br-lan
+
+# ####################
+# NCID host and port #
+# ####################
+
+# Set the NCID host address
+# The default host address: 127.0.0.1
+# set ncidhost = 192.168.0.10
+
+# Set the NCID port
+# the defailt NCID port: 3333
+# set ncidport = 3334
+
+# ###################
+# SIP host and port #
+# ###################
+
+# Set the SIP host address
+# the default SIP address: none
+# set siphost = 192.168.0.1
+
+# Set the SIP port
+# Normal SIP ports are: 1061, 10000
+# the default SIP port: 10000
+set sipport = 5060
+
+###################
+# Warning Message #
+###################
+
+# Send clients "No SIP packets" and "SIP packets returned" messages
+# the default is no warning messages
+# do not send clients warning messages: warn = 0
+# send clients warning messages: warn = 1
+# default: warn = 0
+# set warn = 1
+
+###################################
+# Remove Duplicate INVITE packets #
+###################################
+
+# Phone Power duplicates SIP Invite packets, the duplicates
+# can be removed but a incoming call could be missed
+# do not remove duplicate INVITE packets; rmdups = 0
+# Remove duplicate INVITE packets; rmdups = 1
+# default: rmdups = 0
+# set rmdups = 1
diff --git a/net/ncid/files/sip2ncid.init b/net/ncid/files/sip2ncid.init
new file mode 100755
index 0000000..96d6584
--- /dev/null
+++ b/net/ncid/files/sip2ncid.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=sip2ncid
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/files/yac2ncid.init b/net/ncid/files/yac2ncid.init
new file mode 100755
index 0000000..d44cf9b
--- /dev/null
+++ b/net/ncid/files/yac2ncid.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+APP=yac2ncid
+PID_FILE=/var/run/$APP.pid
+
+start() {
+        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
+        }
+
+stop() {
+       start-stop-daemon -K -n $APP  -s TERM
+       rm -rf $PID_FILE
+}
diff --git a/net/ncid/patches/001-openwrtcrosscompile.patch
b/net/ncid/patches/001-openwrtcrosscompile.patch
new file mode 100644
index 0000000..834c638
--- /dev/null
+++ b/net/ncid/patches/001-openwrtcrosscompile.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+
+@@ -53,0 +53,1 @@ path-to-gcc
++OPENWRTCOMPILE = mipsel-openwrt-linux-uclibc-
+@@ -223,0 +223,4 @@ call OpenWRT gcc
++
++OpenWRT:
++      $(MAKE) package \
++      CC=$(OPENWRTCOMPILE)gcc
diff --git a/net/ncid/postinst b/net/ncid/postinst
new file mode 100644
index 0000000..c6dd6f6
--- /dev/null
+++ b/net/ncid/postinst
@@ -0,0 +1,27 @@
+define Package/ncid/postinst
+#!/bin/sh
+# check if we are on real system
+if [ -z "$${IPKG_INSTROOT}" ]; then
+        echo "Enabling rc.d symlink for ncidd"
+        /etc/init.d/ncidd enable
+fi
+if [ -z "$${IPKG_INSTROOT}" ]; then
+        echo "Enabling rc.d symlink for sip2ncid"
+        /etc/init.d/sip2ncid enable
+fi
+exit 0
+endef
+
+define Package/ncid/prerm
+#!/bin/sh
+# check if we are on real system
+if [ -z "$${IPKG_INSTROOT}" ]; then
+        echo "Removing rc.d symlink for ncidd"
+        /etc/init.d/ncidd disable
+fi
+if [ -z "$${IPKG_INSTROOT}" ]; then
+        echo "Removing rc.d symlink for sip2ncid"
+        /etc/init.d/sip2ncid disable
+fi
+exit 0
+endef
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to