ports/contrib (3.1): asterisk: Updated 1.8.26.1 -> 1.8.31.0 - Moved default config files to /etc/asterisk/default - Improved init script - Removed astcannary - Added aelparse
commit 34444c29b4d414786c113ec422f78bf04dd3cf1f Author: Alan Mizrahi <alan+crux@mizrahi.com.ve> Date: Fri Oct 24 17:53:32 2014 +0900 asterisk: Updated 1.8.26.1 -> 1.8.31.0 - Moved default config files to /etc/asterisk/default - Improved init script - Removed astcannary - Added aelparse diff --git a/asterisk/.footprint b/asterisk/.footprint index f7c0347..807bb0c 100644 --- a/asterisk/.footprint +++ b/asterisk/.footprint @@ -1,100 +1,99 @@ drwxr-xr-x root/root etc/ drwxr-x--- root/asterisk etc/asterisk/ --rw-r----- root/asterisk etc/asterisk/adsi.conf --rw-r----- root/asterisk etc/asterisk/agents.conf --rw-r----- root/asterisk etc/asterisk/ais.conf --rw-r----- root/asterisk etc/asterisk/alarmreceiver.conf --rw-r----- root/asterisk etc/asterisk/alsa.conf --rw-r----- root/asterisk etc/asterisk/amd.conf --rw-r----- root/asterisk etc/asterisk/app_mysql.conf --rw-r----- root/asterisk etc/asterisk/asterisk.adsi --rw-r----- root/asterisk etc/asterisk/asterisk.conf --rw-r----- root/asterisk etc/asterisk/calendar.conf --rw-r----- root/asterisk etc/asterisk/ccss.conf --rw-r----- root/asterisk etc/asterisk/cdr.conf --rw-r----- root/asterisk etc/asterisk/cdr_adaptive_odbc.conf --rw-r----- root/asterisk etc/asterisk/cdr_custom.conf --rw-r----- root/asterisk etc/asterisk/cdr_manager.conf --rw-r----- root/asterisk etc/asterisk/cdr_mysql.conf --rw-r----- root/asterisk etc/asterisk/cdr_odbc.conf --rw-r----- root/asterisk etc/asterisk/cdr_pgsql.conf --rw-r----- root/asterisk etc/asterisk/cdr_sqlite3_custom.conf --rw-r----- root/asterisk etc/asterisk/cdr_syslog.conf --rw-r----- root/asterisk etc/asterisk/cdr_tds.conf --rw-r----- root/asterisk etc/asterisk/cel.conf --rw-r----- root/asterisk etc/asterisk/cel_custom.conf --rw-r----- root/asterisk etc/asterisk/cel_odbc.conf --rw-r----- root/asterisk etc/asterisk/cel_pgsql.conf --rw-r----- root/asterisk etc/asterisk/cel_sqlite3_custom.conf --rw-r----- root/asterisk etc/asterisk/cel_tds.conf --rw-r----- root/asterisk etc/asterisk/chan_dahdi.conf --rw-r----- root/asterisk etc/asterisk/chan_mobile.conf --rw-r----- root/asterisk etc/asterisk/chan_ooh323.conf --rw-r----- root/asterisk etc/asterisk/cli.conf --rw-r----- root/asterisk etc/asterisk/cli_aliases.conf --rw-r----- root/asterisk etc/asterisk/cli_permissions.conf --rw-r----- root/asterisk etc/asterisk/codecs.conf --rw-r----- root/asterisk etc/asterisk/console.conf --rw-r----- root/asterisk etc/asterisk/dbsep.conf --rw-r----- root/asterisk etc/asterisk/dnsmgr.conf --rw-r----- root/asterisk etc/asterisk/dsp.conf --rw-r----- root/asterisk etc/asterisk/dundi.conf --rw-r----- root/asterisk etc/asterisk/enum.conf --rw-r----- root/asterisk etc/asterisk/extconfig.conf --rw-r----- root/asterisk etc/asterisk/extensions.ael --rw-r----- root/asterisk etc/asterisk/extensions.conf --rw-r----- root/asterisk etc/asterisk/extensions.lua --rw-r----- root/asterisk etc/asterisk/extensions_minivm.conf --rw-r----- root/asterisk etc/asterisk/features.conf --rw-r----- root/asterisk etc/asterisk/festival.conf --rw-r----- root/asterisk etc/asterisk/followme.conf --rw-r----- root/asterisk etc/asterisk/func_odbc.conf --rw-r----- root/asterisk etc/asterisk/gtalk.conf --rw-r----- root/asterisk etc/asterisk/h323.conf --rw-r----- root/asterisk etc/asterisk/http.conf --rw-r----- root/asterisk etc/asterisk/iax.conf --rw-r----- root/asterisk etc/asterisk/iaxprov.conf --rw-r----- root/asterisk etc/asterisk/indications.conf --rw-r----- root/asterisk etc/asterisk/jabber.conf --rw-r----- root/asterisk etc/asterisk/jingle.conf --rw-r----- root/asterisk etc/asterisk/logger.conf --rw-r----- root/asterisk etc/asterisk/manager.conf --rw-r----- root/asterisk etc/asterisk/meetme.conf --rw-r----- root/asterisk etc/asterisk/mgcp.conf --rw-r----- root/asterisk etc/asterisk/minivm.conf --rw-r----- root/asterisk etc/asterisk/misdn.conf --rw-r----- root/asterisk etc/asterisk/modules.conf --rw-r----- root/asterisk etc/asterisk/musiconhold.conf --rw-r----- root/asterisk etc/asterisk/muted.conf --rw-r----- root/asterisk etc/asterisk/osp.conf --rw-r----- root/asterisk etc/asterisk/oss.conf --rw-r----- root/asterisk etc/asterisk/phone.conf --rw-r----- root/asterisk etc/asterisk/phoneprov.conf --rw-r----- root/asterisk etc/asterisk/queuerules.conf --rw-r----- root/asterisk etc/asterisk/queues.conf --rw-r----- root/asterisk etc/asterisk/res_config_mysql.conf --rw-r----- root/asterisk etc/asterisk/res_config_sqlite.conf --rw-r----- root/asterisk etc/asterisk/res_curl.conf --rw-r----- root/asterisk etc/asterisk/res_fax.conf --rw-r----- root/asterisk etc/asterisk/res_ldap.conf --rw-r----- root/asterisk etc/asterisk/res_odbc.conf --rw-r----- root/asterisk etc/asterisk/res_pgsql.conf --rw-r----- root/asterisk etc/asterisk/res_pktccops.conf --rw-r----- root/asterisk etc/asterisk/res_snmp.conf --rw-r----- root/asterisk etc/asterisk/res_stun_monitor.conf --rw-r----- root/asterisk etc/asterisk/rtp.conf --rw-r----- root/asterisk etc/asterisk/say.conf --rw-r----- root/asterisk etc/asterisk/sip.conf --rw-r----- root/asterisk etc/asterisk/sip_notify.conf --rw-r----- root/asterisk etc/asterisk/skinny.conf --rw-r----- root/asterisk etc/asterisk/sla.conf --rw-r----- root/asterisk etc/asterisk/smdi.conf --rw-r----- root/asterisk etc/asterisk/telcordia-1.adsi --rw-r----- root/asterisk etc/asterisk/udptl.conf --rw-r----- root/asterisk etc/asterisk/unistim.conf --rw-r----- root/asterisk etc/asterisk/users.conf --rw-r----- root/asterisk etc/asterisk/voicemail.conf --rw-r----- root/asterisk etc/asterisk/vpb.conf +drwxr-x--- root/asterisk etc/asterisk/default/ +-rw-r----- root/asterisk etc/asterisk/default/adsi.conf +-rw-r----- root/asterisk etc/asterisk/default/agents.conf +-rw-r----- root/asterisk etc/asterisk/default/ais.conf +-rw-r----- root/asterisk etc/asterisk/default/alarmreceiver.conf +-rw-r----- root/asterisk etc/asterisk/default/alsa.conf +-rw-r----- root/asterisk etc/asterisk/default/amd.conf +-rw-r----- root/asterisk etc/asterisk/default/app_mysql.conf +-rw-r----- root/asterisk etc/asterisk/default/asterisk.conf +-rw-r----- root/asterisk etc/asterisk/default/calendar.conf +-rw-r----- root/asterisk etc/asterisk/default/ccss.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_adaptive_odbc.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_custom.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_manager.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_mysql.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_odbc.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_pgsql.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_sqlite3_custom.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_syslog.conf +-rw-r----- root/asterisk etc/asterisk/default/cdr_tds.conf +-rw-r----- root/asterisk etc/asterisk/default/cel.conf +-rw-r----- root/asterisk etc/asterisk/default/cel_custom.conf +-rw-r----- root/asterisk etc/asterisk/default/cel_odbc.conf +-rw-r----- root/asterisk etc/asterisk/default/cel_pgsql.conf +-rw-r----- root/asterisk etc/asterisk/default/cel_sqlite3_custom.conf +-rw-r----- root/asterisk etc/asterisk/default/cel_tds.conf +-rw-r----- root/asterisk etc/asterisk/default/chan_dahdi.conf +-rw-r----- root/asterisk etc/asterisk/default/chan_mobile.conf +-rw-r----- root/asterisk etc/asterisk/default/chan_ooh323.conf +-rw-r----- root/asterisk etc/asterisk/default/cli.conf +-rw-r----- root/asterisk etc/asterisk/default/cli_aliases.conf +-rw-r----- root/asterisk etc/asterisk/default/cli_permissions.conf +-rw-r----- root/asterisk etc/asterisk/default/codecs.conf +-rw-r----- root/asterisk etc/asterisk/default/console.conf +-rw-r----- root/asterisk etc/asterisk/default/dbsep.conf +-rw-r----- root/asterisk etc/asterisk/default/dnsmgr.conf +-rw-r----- root/asterisk etc/asterisk/default/dsp.conf +-rw-r----- root/asterisk etc/asterisk/default/dundi.conf +-rw-r----- root/asterisk etc/asterisk/default/enum.conf +-rw-r----- root/asterisk etc/asterisk/default/extconfig.conf +-rw-r----- root/asterisk etc/asterisk/default/extensions.ael +-rw-r----- root/asterisk etc/asterisk/default/extensions.conf +-rw-r----- root/asterisk etc/asterisk/default/extensions.lua +-rw-r----- root/asterisk etc/asterisk/default/extensions_minivm.conf +-rw-r----- root/asterisk etc/asterisk/default/features.conf +-rw-r----- root/asterisk etc/asterisk/default/festival.conf +-rw-r----- root/asterisk etc/asterisk/default/followme.conf +-rw-r----- root/asterisk etc/asterisk/default/func_odbc.conf +-rw-r----- root/asterisk etc/asterisk/default/gtalk.conf +-rw-r----- root/asterisk etc/asterisk/default/h323.conf +-rw-r----- root/asterisk etc/asterisk/default/http.conf +-rw-r----- root/asterisk etc/asterisk/default/iax.conf +-rw-r----- root/asterisk etc/asterisk/default/iaxprov.conf +-rw-r----- root/asterisk etc/asterisk/default/indications.conf +-rw-r----- root/asterisk etc/asterisk/default/jabber.conf +-rw-r----- root/asterisk etc/asterisk/default/jingle.conf +-rw-r----- root/asterisk etc/asterisk/default/logger.conf +-rw-r----- root/asterisk etc/asterisk/default/manager.conf +-rw-r----- root/asterisk etc/asterisk/default/meetme.conf +-rw-r----- root/asterisk etc/asterisk/default/mgcp.conf +-rw-r----- root/asterisk etc/asterisk/default/minivm.conf +-rw-r----- root/asterisk etc/asterisk/default/misdn.conf +-rw-r----- root/asterisk etc/asterisk/default/modules.conf +-rw-r----- root/asterisk etc/asterisk/default/musiconhold.conf +-rw-r----- root/asterisk etc/asterisk/default/muted.conf +-rw-r----- root/asterisk etc/asterisk/default/osp.conf +-rw-r----- root/asterisk etc/asterisk/default/oss.conf +-rw-r----- root/asterisk etc/asterisk/default/phone.conf +-rw-r----- root/asterisk etc/asterisk/default/phoneprov.conf +-rw-r----- root/asterisk etc/asterisk/default/queuerules.conf +-rw-r----- root/asterisk etc/asterisk/default/queues.conf +-rw-r----- root/asterisk etc/asterisk/default/res_config_mysql.conf +-rw-r----- root/asterisk etc/asterisk/default/res_config_sqlite.conf +-rw-r----- root/asterisk etc/asterisk/default/res_curl.conf +-rw-r----- root/asterisk etc/asterisk/default/res_fax.conf +-rw-r----- root/asterisk etc/asterisk/default/res_ldap.conf +-rw-r----- root/asterisk etc/asterisk/default/res_odbc.conf +-rw-r----- root/asterisk etc/asterisk/default/res_pgsql.conf +-rw-r----- root/asterisk etc/asterisk/default/res_pktccops.conf +-rw-r----- root/asterisk etc/asterisk/default/res_snmp.conf +-rw-r----- root/asterisk etc/asterisk/default/res_stun_monitor.conf +-rw-r----- root/asterisk etc/asterisk/default/rtp.conf +-rw-r----- root/asterisk etc/asterisk/default/say.conf +-rw-r----- root/asterisk etc/asterisk/default/sip.conf +-rw-r----- root/asterisk etc/asterisk/default/sip_notify.conf +-rw-r----- root/asterisk etc/asterisk/default/skinny.conf +-rw-r----- root/asterisk etc/asterisk/default/sla.conf +-rw-r----- root/asterisk etc/asterisk/default/smdi.conf +-rw-r----- root/asterisk etc/asterisk/default/udptl.conf +-rw-r----- root/asterisk etc/asterisk/default/unistim.conf +-rw-r----- root/asterisk etc/asterisk/default/users.conf +-rw-r----- root/asterisk etc/asterisk/default/voicemail.conf +-rw-r----- root/asterisk etc/asterisk/default/vpb.conf drwxr-xr-x root/root etc/rc.d/ -rwxr-xr-x root/root etc/rc.d/asterisk drwxr-xr-x root/root usr/ @@ -328,6 +327,7 @@ drwxr-xr-x root/root usr/lib/asterisk/modules/ -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_agent.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_alsa.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_bridge.so +-rwxr-xr-x root/root usr/lib/asterisk/modules/chan_console.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_dahdi.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_iax2.so -rwxr-xr-x root/root usr/lib/asterisk/modules/chan_local.so @@ -443,19 +443,15 @@ drwxr-xr-x root/root usr/lib/asterisk/modules/ -rwxr-xr-x root/root usr/lib/asterisk/modules/res_timing_dahdi.so -rwxr-xr-x root/root usr/lib/asterisk/modules/res_timing_pthread.so -rwxr-xr-x root/root usr/lib/asterisk/modules/res_timing_timerfd.so --rwxr-xr-x root/root usr/lib/asterisk/modules/test_astobj2_thrash.so --rwxr-xr-x root/root usr/lib/asterisk/modules/test_config.so --rwxr-xr-x root/root usr/lib/asterisk/modules/test_hashtab_thrash.so --rwxr-xr-x root/root usr/lib/asterisk/modules/test_linkedlists.so --rwxr-xr-x root/root usr/lib/asterisk/modules/test_xml_escape.so drwxr-xr-x root/root usr/man/ drwxr-xr-x root/root usr/man/man8/ +-rw-r--r-- root/root usr/man/man8/aelparse.8.gz -rw-r--r-- root/root usr/man/man8/asterisk.8.gz -rw-r--r-- root/root usr/man/man8/astgenkey.8.gz -rw-r--r-- root/root usr/man/man8/autosupport.8.gz -rw-r--r-- root/root usr/man/man8/safe_asterisk.8.gz drwxr-xr-x root/root usr/sbin/ --rwxr-xr-x root/root usr/sbin/astcanary +-rwxr-xr-x root/root usr/sbin/aelparse -rwxr-xr-x root/root usr/sbin/asterisk -rwxr-xr-x root/root usr/sbin/astgenkey -rwxr-xr-x root/root usr/sbin/autosupport @@ -465,10 +461,6 @@ drwxr-xr-x root/root var/ drwxr-xr-x root/root var/lib/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/agi-bin/ -drwxr-xr-x asterisk/asterisk var/lib/asterisk/documentation/ --rw-r--r-- asterisk/asterisk var/lib/asterisk/documentation/appdocsxml.dtd --rw-r--r-- asterisk/asterisk var/lib/asterisk/documentation/core-en_US.xml -drwxr-xr-x asterisk/asterisk var/lib/asterisk/documentation/thirdparty/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/firmware/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/firmware/iax/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/images/ @@ -477,12 +469,6 @@ drwxr-xr-x asterisk/asterisk var/lib/asterisk/images/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/keys/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/moh/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/phoneprov/ --rw-r--r-- asterisk/asterisk var/lib/asterisk/phoneprov/000000000000-directory.xml --rw-r--r-- asterisk/asterisk var/lib/asterisk/phoneprov/000000000000-phone.cfg --rw-r--r-- asterisk/asterisk var/lib/asterisk/phoneprov/000000000000.cfg --rw-r--r-- asterisk/asterisk var/lib/asterisk/phoneprov/polycom.xml --rw-r--r-- asterisk/asterisk var/lib/asterisk/phoneprov/polycom_line.xml --rw-r--r-- asterisk/asterisk var/lib/asterisk/phoneprov/snom-mac.xml drwxr-xr-x asterisk/asterisk var/lib/asterisk/sounds/ drwxr-xr-x asterisk/asterisk var/lib/asterisk/static-http/ -rw-r--r-- asterisk/asterisk var/lib/asterisk/static-http/ajamdemo.html @@ -506,4 +492,3 @@ drwxr-xr-x asterisk/asterisk var/spool/asterisk/monitor/ drwxr-xr-x asterisk/asterisk var/spool/asterisk/system/ drwxr-xr-x asterisk/asterisk var/spool/asterisk/tmp/ drwxr-xr-x asterisk/asterisk var/spool/asterisk/voicemail/ -drwxr-xr-x asterisk/asterisk var/spool/asterisk/voicemail/default/ diff --git a/asterisk/.md5sum b/asterisk/.md5sum index 695bb1f..a049b83 100644 --- a/asterisk/.md5sum +++ b/asterisk/.md5sum @@ -1,7 +1,8 @@ -0dd2d5e2536cb134bba2d7035e745d6e asterisk-1.8.26.1.tar.gz -e2c91938285958361eb37963a6da71a0 asterisk.rc -69940891ce39a2d14209f8c94d408311 build-disable-sounds-en-gsm.patch -8ded3aa36d9ebd42c88ebc995f4567dc build-disable-sounds-moh.patch -921ca0b9652076765330eb14cfd9436b build-enable-cdr-mysql.patch -1f176d857322c95edf82c59be650ccb6 build-enable-ilbc.patch -b2c16b1a24d47a4399329125eac8faf2 menuselect-tree +ef2783022bf4451c0bac4a64c8ec4a8b asterisk-1.8.31.0.tar.gz +0a336b92908bcff6cb87fe3797aea70c asterisk.rc +475ed32aea9a82aae020695be8b81ac4 build-disable-astcannary.patch +3b0bb1b1e4ef57e013b66f55db6c8417 build-disable-sounds-en-gsm.patch +cfe1e9763274e42ea911e9e0cae43588 build-disable-sounds-moh.patch +828227d0fd20bd8ca448970192bdf869 build-enable-aelparse.patch +2e0b5a273b8a2f7983c72f2eb1e08f0e build-enable-cdr-mysql.patch +4fe1dff21e048b79a15fdfa145403f6c build-enable-ilbc.patch diff --git a/asterisk/Pkgfile b/asterisk/Pkgfile index a5098e0..0447a5c 100644 --- a/asterisk/Pkgfile +++ b/asterisk/Pkgfile @@ -4,16 +4,17 @@ # Depends on: openssl ncurses name=asterisk -version=1.8.26.1 -release=3 +version=1.8.31.0 +release=4 source=( http://downloads.digium.com/pub/asterisk/releases/asterisk-$version.tar.gz asterisk.rc -menuselect-tree -build-enable-ilbc.patch -build-enable-cdr-mysql.patch +build-disable-astcannary.patch build-disable-sounds-en-gsm.patch build-disable-sounds-moh.patch +build-enable-aelparse.patch +build-enable-cdr-mysql.patch +build-enable-ilbc.patch ) build () { @@ -21,19 +22,17 @@ build () { ./configure \ --prefix=/usr \ + --mandir=/usr/man \ --with-ncurses \ --with-ssl \ --disable-xmldoc \ --with-sounds-cache=/tmp - # Normally this file is created by running the interactive menuselect program - cp $SRC/menuselect-tree . - - # Add support for ILBC - patch -p1 -i $SRC/build-enable-ilbc.patch + # Generate a menuselect-tree file + make menuselect-tree - # Add support for MySQL CDRs - patch -p1 -i $SRC/build-enable-cdr-mysql.patch + # Remove astcannary + patch -p1 -i $SRC/build-disable-astcannary.patch # Remove english gsm core sounds (sounds are in separate ports) patch -p1 -i $SRC/build-disable-sounds-en-gsm.patch @@ -41,26 +40,37 @@ build () { # Remove music on hold files patch -p1 -i $SRC/build-disable-sounds-moh.patch + # Add aelparse utility + patch -p1 -i $SRC/build-enable-aelparse.patch + + # Add support for ILBC + patch -p1 -i $SRC/build-enable-ilbc.patch + + # Add support for MySQL CDRs + patch -p1 -i $SRC/build-enable-cdr-mysql.patch + make # NOISY_BUILD=yes make DESTDIR=$PKG install - make DESTDIR=$PKG samples - mv $PKG/usr/share/man $PKG/usr + # Init script install -m 755 -D $SRC/asterisk.rc $PKG/etc/rc.d/asterisk - rmdir $PKG/usr/share - rm -rf $PKG/var/spool/asterisk/voicemail/default/1234 + + # This man page is missing + install -m 644 -D doc/aelparse.8 $PKG/usr/man/man8/aelparse.8 + + # Install default config files + install -d -m 750 -o root -g asterisk $PKG/etc/asterisk $PKG/etc/asterisk/default + for i in configs/*.sample; do + install -m 640 -o root -g asterisk $i $PKG/etc/asterisk/default/$(basename $i .sample) + done # Remove empty directory holders rm -rf $PKG/var/lib/asterisk/sounds/* - # change runtime dir - sed -i -e 's|^astrundir => .*|astrundir => /var/run/asterisk|' $PKG/etc/asterisk/asterisk.conf - mkdir -p $PKG/var/run/asterisk + # Remove documentation dir + rm -rf $PKG/var/lib/asterisk/documentation - # fix permissions - chown -R root:root $PKG + # Fix permissions chown -R asterisk:asterisk $PKG/var/{lib,log,run,spool}/asterisk - chown -R root:asterisk $PKG/etc/asterisk - chmod -R 640 $PKG/etc/asterisk - chmod 750 $PKG/etc/asterisk + } diff --git a/asterisk/asterisk.rc b/asterisk/asterisk.rc index 768449d..7034937 100644 --- a/asterisk/asterisk.rc +++ b/asterisk/asterisk.rc @@ -10,51 +10,63 @@ STOPCMD="/usr/sbin/asterisk -r -x 'core stop now'" STOPGRACECMD="/usr/sbin/asterisk -r -x 'core stop gracefully'" STOPTIMEOUT=300 -case $1 in -start) - [ -n "$RUNDIR" ] && (install -d -m 755 -o $USER $RUNDIR || exit 1) - if [ -f $PIDFILE ]; then - pid=$(< $PIDFILE) - if [ ! -d /proc/$pid ]; then - echo "$NAME: removing stale pidfile $PIDFILE" >&2 - rm -f $PIDFILE +function getpid() { + if [ -z "$PIDFILE" ]; then + pid="$(pgrep -xfn "$STARTCMD")" + else + if [ -f "$PIDFILE" ]; then + pid=$(< $PIDFILE) + if [ ! -d /proc/"$pid" ]; then + echo "$NAME: removing stale pidfile $PIDFILE" >&2 + rm -f "$PIDFILE" + unset pid + fi fi fi - if [ -f $PIDFILE ]; then + echo "$pid" +} + +case $1 in +start) + pid=$(getpid) + install -d -m 755 -o $USER $RUNDIR || exit 1 + if [ -n "$pid" ]; then echo "$NAME already running with pid $pid" >&2 exit 1 fi eval "$STARTCMD" ;; stop|stopnice) - if [ -f $PIDFILE ]; then - pid=$(< $PIDFILE) - if [ ! -d /proc/$pid ]; then - echo "$NAME: removing stale pidfile $PIDFILE" >&2 - rm -f $PIDFILE - else - if [ "$1" == "stop" ]; then + pid=$(getpid) + if [ -n "$pid" ]; then + if [ "$1" == "stop" ]; then + if [ -n "$STOPCMD" ]; then eval "$STOPCMD" else - eval "$STOPGRACECMD" + kill "$pid" fi - t=$(printf '%(%s)T' -1) - tend=$((t+STOPTIMEOUT)) - while [ -d /proc/$pid -a $t -lt $tend ]; do - sleep 0.5 - t=$(printf '%(%s)T' -1) - done - if [ -d /proc/$pid ]; then - echo "$NAME still running with pid $pid" >&2 - exit 1 + else + if [ -n "$STOPCMD" ]; then + eval "$STOPGRACECMD" else - rm -f $PIDFILE + echo "$NAME: $1 not implemented" + exit 1 fi fi + t=$(printf '%(%s)T' -1) + tend=$((t+STOPTIMEOUT)) + while [ -d /proc/$pid -a $t -lt $tend ]; do + sleep 0.5 + t=$(printf '%(%s)T' -1) + done + if [ -d /proc/"$pid" ]; then + echo "$NAME still running with pid $pid" >&2 + else + [ -n "$PIDFILE" ] && rm -f "$PIDFILE" + fi else echo "$NAME is not running" >&2 fi - exit 0 ;; restart) $0 stop && \ @@ -64,7 +76,16 @@ restartnice) $0 stopnice && \ $0 start ;; +status) + pid=$(getpid) + if [ -n "$pid" ]; then + echo "$NAME is running with pid $pid" + else + echo "$NAME is not running" + fi + ;; *) - echo "usage: $0 [start|stop|stopnice|restart|restartnice]" + echo "usage: $0 [start|stop|stopnice|restart|restartnice|status]" ;; esac + diff --git a/asterisk/build-disable-astcannary.patch b/asterisk/build-disable-astcannary.patch new file mode 100644 index 0000000..a2bb07e --- /dev/null +++ b/asterisk/build-disable-astcannary.patch @@ -0,0 +1,11 @@ +--- asterisk-1.8.31.0/menuselect-tree.orig 2014-10-03 15:03:35.319957528 +0900 ++++ asterisk-1.8.31.0/menuselect-tree 2014-10-03 15:22:39.708556897 +0900 +@@ -1172,7 +1172,7 @@ + <support_level>extended</support_level> + </member> + <member name="astcanary"> +- <defaultenabled>yes</defaultenabled> ++ <defaultenabled>no</defaultenabled> + <support_level>core</support_level> + </member> + <member name="astman"> diff --git a/asterisk/build-disable-sounds-en-gsm.patch b/asterisk/build-disable-sounds-en-gsm.patch index da0a4d2..5c429c9 100644 --- a/asterisk/build-disable-sounds-en-gsm.patch +++ b/asterisk/build-disable-sounds-en-gsm.patch @@ -1,10 +1,11 @@ ---- asterisk-1.8.5.0/menuselect-tree.orig 2011-07-20 14:50:02.591561383 +0900 -+++ asterisk-1.8.5.0/menuselect-tree 2011-07-20 14:54:47.151532938 +0900 -@@ -943,7 +943,6 @@ - <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format"> +--- asterisk-1.8.31.0/menuselect-tree.orig 2014-10-03 15:03:35.319957528 +0900 ++++ asterisk-1.8.31.0/menuselect-tree 2014-10-03 15:33:36.522661978 +0900 +@@ -1289,7 +1289,7 @@ + <support_level>core</support_level> </member> <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" > - <defaultenabled>yes</defaultenabled> ++ <defaultenabled>no</defaultenabled> + <support_level>core</support_level> </member> <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format"> - </member> diff --git a/asterisk/build-disable-sounds-moh.patch b/asterisk/build-disable-sounds-moh.patch index c4b346c..12b37e7 100644 --- a/asterisk/build-disable-sounds-moh.patch +++ b/asterisk/build-disable-sounds-moh.patch @@ -1,10 +1,11 @@ ---- asterisk-1.8.5.0/menuselect-tree.orig 2011-07-20 14:50:02.591561383 +0900 -+++ asterisk-1.8.5.0/menuselect-tree 2011-07-20 14:55:16.151530005 +0900 -@@ -1030,7 +1030,6 @@ +--- asterisk-1.8.31.0/menuselect-tree.orig 2014-10-03 15:03:35.319957528 +0900 ++++ asterisk-1.8.31.0/menuselect-tree 2014-10-03 15:35:08.282304114 +0900 +@@ -1499,7 +1499,7 @@ </category> <category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes"> <member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" > - <defaultenabled>yes</defaultenabled> ++ <defaultenabled>no</defaultenabled> + <support_level>core</support_level> </member> <member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" > - </member> diff --git a/asterisk/build-enable-aelparse.patch b/asterisk/build-enable-aelparse.patch new file mode 100644 index 0000000..50db312 --- /dev/null +++ b/asterisk/build-enable-aelparse.patch @@ -0,0 +1,11 @@ +--- asterisk-1.8.31.0/menuselect-tree.orig 2014-10-03 15:03:35.319957528 +0900 ++++ asterisk-1.8.31.0/menuselect-tree 2014-10-03 15:25:02.927998339 +0900 +@@ -1168,7 +1168,7 @@ + </category> + <category name="MENUSELECT_UTILS" displayname="Utilities" positive_output="yes"> + <member name="aelparse"> +- <defaultenabled>no</defaultenabled> ++ <defaultenabled>yes</defaultenabled> + <support_level>extended</support_level> + </member> + <member name="astcanary"> diff --git a/asterisk/build-enable-cdr-mysql.patch b/asterisk/build-enable-cdr-mysql.patch index c3bdd85..debabab 100644 --- a/asterisk/build-enable-cdr-mysql.patch +++ b/asterisk/build-enable-cdr-mysql.patch @@ -1,11 +1,11 @@ ---- asterisk-1.8.5.0/menuselect-tree.orig 2011-07-20 15:24:27.031354954 +0900 -+++ asterisk-1.8.5.0/menuselect-tree 2011-07-20 15:25:45.208013934 +0900 -@@ -11,7 +11,7 @@ +--- asterisk-1.8.31.0/menuselect-tree.orig 2014-10-03 15:03:35.319957528 +0900 ++++ asterisk-1.8.31.0/menuselect-tree 2014-10-03 15:06:26.925954929 +0900 +@@ -15,7 +15,7 @@ </member> <member name="cdr_mysql" displayname="MySQL CDR Backend" remove_on_change="addons/cdr_mysql.o addons/cdr_mysql.so"> <depend>mysqlclient</depend> - <defaultenabled>no</defaultenabled> + <defaultenabled>yes</defaultenabled> + <support_level>deprecated</support_level> + <replacement>cdr_adaptive_odbc</replacement> </member> - <member name="chan_mobile" displayname="Bluetooth Mobile Device Channel Driver" remove_on_change="addons/chan_mobile.o addons/chan_mobile.so"> - <depend>bluetooth</depend> diff --git a/asterisk/build-enable-ilbc.patch b/asterisk/build-enable-ilbc.patch index 729e089..e535b4a 100644 --- a/asterisk/build-enable-ilbc.patch +++ b/asterisk/build-enable-ilbc.patch @@ -1,11 +1,10 @@ ---- asterisk-1.8.5.0/menuselect-tree.orig 2011-07-20 14:50:02.591561383 +0900 -+++ asterisk-1.8.5.0/menuselect-tree 2011-07-20 14:51:18.321553873 +0900 -@@ -370,7 +370,7 @@ - <depend>dahdi</depend> +--- asterisk-1.8.31.0/menuselect-tree.orig 2014-10-03 15:03:35.319957528 +0900 ++++ asterisk-1.8.31.0/menuselect-tree 2014-10-03 15:07:28.723065654 +0900 +@@ -499,6 +499,7 @@ + <support_level>core</support_level> </member> <member name="codec_ilbc" displayname="iLBC Coder/Decoder" remove_on_change="codecs/codec_ilbc.o codecs/codec_ilbc.so"> -- <defaultenabled>no</defaultenabled> + <defaultenabled>yes</defaultenabled> + <support_level>core</support_level> </member> - <member name="codec_ulaw" displayname="mu-Law Coder/Decoder" remove_on_change="codecs/codec_ulaw.o codecs/codec_ulaw.so"> - </member> + <member name="codec_lpc10" displayname="LPC10 2.4kbps Coder/Decoder" remove_on_change="codecs/codec_lpc10.o codecs/codec_lpc10.so">
participants (1)
-
crux@crux.nu