summaryrefslogtreecommitdiff
path: root/net-misc/iaxmodem/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/iaxmodem/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/iaxmodem/files')
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.cfg88
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.confd6
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.initd42
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.logrotated9
4 files changed, 145 insertions, 0 deletions
diff --git a/net-misc/iaxmodem/files/iaxmodem.cfg b/net-misc/iaxmodem/files/iaxmodem.cfg
new file mode 100644
index 000000000000..8a30e912e58b
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.cfg
@@ -0,0 +1,88 @@
+; Sample Configuration for IAXmodem
+;
+; Comments can be placed into the IAXmodem configuration files by beginning
+; them with a semicolon (";").
+;
+; Copy this file to the /etc/iaxmodem directory with a unique file name.
+; The name of the file will serve as the identifier, if you choose to
+; launch iaxmodem in non-daemon mode.
+
+
+; The "nodaemon" entry exempts the modem from inclusion with daemon use.
+; Comment out this line, if you want to use this config in daemon mode!
+
+nodaemon
+
+; The "device" entry is the full name of the device that you will be using
+; in your modem application. If running multiple instances of iaxmodem then
+; you will need a different device for each instance.
+
+device /dev/ttyIAX
+
+; The "owner" entry (formatted "user:group") is the system user and group
+; that IAXmodem should use for the created device.
+
+owner uucp:uucp
+
+; The "mode" entry is the permissions mode for the created device.
+
+mode 660
+
+; The "port" entry refers to the preferred port number on which to listen
+; for communications from the Asterisk server (so if you're using more than
+; one IAXmodem on a single IP address you will need to have each IAXmodem
+; configuration use a different port). You should not use "4569" if Asterisk
+; is already listening on port 4569.
+
+port 4570
+
+; The "refresh" entry indicates the preference on how frequently to refresh
+; the registration with the Asterisk server. (However, the actual refresh
+; value that is used will be negotiated between IAXmodem and the Asterisk
+; server.) By setting this to a value of "0" (zero), IAXmodem will not
+; register with the server, and thus the server should be configured to
+; communicate with IAXmodem on a static address.
+
+refresh 300
+
+; The "server", "peername", and "secret" entries refer to the server name
+; (or address), the registered peer name for the IAXmodem client, and the
+; registered secret (password) for the IAXmodem client.
+
+server 127.0.0.1
+peername iaxmodem
+secret password
+
+; The entries "cidname" and "cidnumber" refer to the Caller*ID presentation
+; that will be made by IAXmodem to the Asterisk server.
+
+cidname John Doe
+cidnumber 8005551212
+
+; The "codec" entry refers to the preferred audio codec. This can be
+; "slinear", "alaw", or "ulaw".
+
+codec slinear
+;codec alaw
+;codec ulaw
+
+; The "record" entry causes audio files to be recorded.
+
+;record
+
+; The "replay" entry causes the audio files to be replayed back.
+
+;replay
+
+; The "nojitterbuffer" entry disables the very simple iaxmodem jitterbuffer
+
+;nojitterbuffer
+
+; The "iax2debug" entry enables debugging output for IAX2.
+
+;iax2debug
+
+; The "dspdebug" entry enables debugging output for the DSPs.
+
+;dspdebug
+
diff --git a/net-misc/iaxmodem/files/iaxmodem.confd b/net-misc/iaxmodem/files/iaxmodem.confd
new file mode 100644
index 000000000000..5998d8a36e96
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.confd
@@ -0,0 +1,6 @@
+# Configfile for /etc/init.d/iaxmodem
+
+# Set the priority of the iaxmodem process
+# Value: (highest) -20..19 (lowest)
+#
+#IAXMODEM_NICE="-5"
diff --git a/net-misc/iaxmodem/files/iaxmodem.initd b/net-misc/iaxmodem/files/iaxmodem.initd
new file mode 100644
index 000000000000..327b0843c922
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.initd
@@ -0,0 +1,42 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="IAXmodem"
+description_reload="Reread configuration file and make the appropriate changes"
+extra_started_commands="reload"
+command="/usr/sbin/iaxmodem"
+pidfile="/var/run/iaxmodem.pid"
+name="iaxmodem"
+
+depend() {
+ use asterisk
+ need net
+}
+
+start() {
+ ebegin "Starting ${description}"
+ start-stop-daemon --start --quiet --pidfile "${pidfile}" \
+ --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}"
+ eend ${?}
+}
+
+stop() {
+ local childs=""
+ ebegin "Stopping ${description}"
+ # start-stop-daemon doesn't kill childs reliable, so we
+ # use a combination of pgrep + start-stop-daemon + kill
+ [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}"))
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5
+ if eend ${?}; then
+ # if there're still childs running, kill them!
+ [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null
+ return 0
+ fi
+}
+
+reload() {
+ ebegin "Reloading ${description} configuration"
+ start-stop-daemon --stop --signal HUP --pidfile "${pidfile}"
+ eend ${?}
+}
diff --git a/net-misc/iaxmodem/files/iaxmodem.logrotated b/net-misc/iaxmodem/files/iaxmodem.logrotated
new file mode 100644
index 000000000000..037aa94ef9dd
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.logrotated
@@ -0,0 +1,9 @@
+/var/log/iaxmodem/* {
+ notifempty
+ missingok
+ size 1000k
+ sharedscripts
+ postrotate
+ /etc/init.d/iaxmodem --ifstarted --quiet reload
+ endscript
+}