Gentoo Archives: gentoo-commits

From: "Stefan Briesenick (sbriesen)" <sbriesen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/iaxmodem/files: iaxmodem.cfg iaxmodem.logrotated iaxmodem.initd iaxmodem.confd
Date: Tue, 14 Oct 2008 23:53:42
sbriesen    08/10/14 23:53:39

  Added:                iaxmodem.cfg iaxmodem.logrotated iaxmodem.initd
  initial commit, solving bug# 169151.
  (Portage version: 2.2_rc12/cvs/Linux 2.6.26-gentoo-r1 i686)

Revision  Changes    Path
1.1                  net-misc/iaxmodem/files/iaxmodem.cfg

file :

Index: iaxmodem.cfg
; 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!


; 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.

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.


; The "replay" entry causes the audio files to be replayed back.


; The "nojitterbuffer" entry disables the very simple iaxmodem jitterbuffer


; The "iax2debug" entry enables debugging output for IAX2.


; The "dspdebug" entry enables debugging output for the DSPs.


1.1                  net-misc/iaxmodem/files/iaxmodem.logrotated

file :

Index: iaxmodem.logrotated
/var/log/iaxmodem/* {
    size 1000k
	/etc/init.d/iaxmodem --ifstarted --quiet reload

1.1                  net-misc/iaxmodem/files/iaxmodem.initd

file :

Index: iaxmodem.initd
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/iaxmodem/files/iaxmodem.initd,v 1.1 2008/10/14 23:53:39 sbriesen Exp $

description_reload="Reread configuration file and make the appropriate changes"

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 

reload() {
	ebegin "Reloading ${description} configuration"
	start-stop-daemon --stop --signal HUP --pidfile "${pidfile}"
	eend ${?}

1.1                  net-misc/iaxmodem/files/iaxmodem.confd

file :

Index: iaxmodem.confd
# Configfile for /etc/init.d/iaxmodem

# Set the priority of the iaxmodem process
# Value: (highest) -20..19 (lowest)