diff --git a/version_1.8.2/README.md b/version_1.8.2/README.md new file mode 100644 index 0000000..99eab76 --- /dev/null +++ b/version_1.8.2/README.md @@ -0,0 +1,102 @@ + + +# Configuração do PABX versão 1.8 no docker + +Inicie a aplicação PABX de maneira fácil e sincronizada. + +## Preparando o ambiente no Windows + +### Configurando o WSL + +- Certifique-se de que o WSL2 está instalado no Windows. Caso não esteja, siga a documentação para realizar a instalação: [Instalação do WSL2](https://learn.microsoft.com/pt-br/windows/wsl/install). + +Após a instalação do WSL2, instale uma distribuição Linux. + +* Recomendamos a utilização do Debian. Para isso, execute o seguinte comando no PowerShell: +```bash +wsl --install -d Debian +``` + +* Em seguida, digite o seguinte comando no PowerShell para entrar em uma instância do Debian: +```bash +wsl -d Debian +``` +### Desabilite o Firewall e o Defender do Windows +Para conseguir realizar o download de alguns repositórios. + + + +## Clonando o repositório + +* Clone o projeto: docker-pabx-app. +```bash +git clone http://192.168.115.233:3000/SimplesIP/docker-pabx-app.git +``` + +## Deploy + +* Entre no diretório que contém os arquivos de inicialização do container. +```bash +cd docker-pabx-app/debian +``` + +Crie uma cópia do arquivo 'env-example' com o nome de '.env'. +```bash +cp env-example .env +``` + +Defina as variáveis dentro do arquivo .env: +- pasta_do_projeto - a pasta onde se encontra o projeto PABX. +- pasta_do_postgresql11 - onde deverá sincronizar o banco de dados. +- postgresql_version - por agora, não deve mudar o valor. + +### Execute o container com o docker-compose: +```bash +sudo docker-compose up -d +``` +Esse comando tentará compilar e levantar container. + +## FAQ + +* ### Configurar rota do endereço SIP? + Acesse a página `:8080/config-docker.php`. Essa página vai configurar o IP no arquivo `/etc/sip_generera.conf` e carregá-lo no Asterisk. Não deve usar "localhost", pois o endereço será do container. É necessário usar o endereço do host para acessar esta página config-docker.php. + +* ### Para que serve o arquivo `.env` ? + +Serve para definir variáveis a serem usadas no compose. Leia o arquivo '.env-example' para mais informações. + +* ### Quais arquivos estão sicronizados ? + + Grande parte dos arquivos do projeto estão sincronizados, porém existe os arquivos que não estão sincronizados. Os arquivos não sincronizados serão apagados quando seu container for encerrado e reescritos pelos arquivos da imagem quando o container for iniciado. + + Não sincronizados: + - `/etc/asterisk` - Sem sincronização na pasta + - `/etc/init.d/cnvrtd` - sem sincronização no arquivo + - `/etc/init.d/rtabd` - sem sincronização no arquivo + - `/etc/init.d/supervisor` - sem sincronização no arquivo + + Sincronizados: + - `/var/lib/postgresql/data` - Sincronizado os arquivo do banco de dados + - `/var/www/html/aplicativo` - Sincronizado + - `/var/www/html/include` - sincronizado + - `/var/lib/asterisk/` - sincronizado + - `/hdaux/utilitarios/scripts` - sincronizado + + Obs: + - `/projeto/base` será replicado no container postgres `/base` para poder puxar o banco de dados. + + +### É necessário executar algo depois da build? + + Não, todo o processo é automático. Porém, é preciso acessar `:8080/config-docker.php`, que fará o reconhecimento do IP e irá defini-lo para o protocolo SIP. + +* ### Qual as portas ? + + - `8080` - apache (web) + - `5432` - postgresql + - `5038` - asterisk (ami) + - `5060` - asterisk (sip) + - `10000-10030` - asterisk (RTP) + +* ### Se o pabx criar arquivos que não estão no projeto gitea? + Coloque em `.gitignore` e mande a correção. \ No newline at end of file diff --git a/version_1.8.2/docker-compose.yml b/version_1.8.2/docker-compose.yml new file mode 100644 index 0000000..57b3f28 --- /dev/null +++ b/version_1.8.2/docker-compose.yml @@ -0,0 +1,66 @@ +version: '3.7' +networks: + working: + driver: bridge +services: + postgres: + build: + context: postgres-13 + args: + # definir o id do usuário para ter acesso ao volume + - ID_USER_VOLUME=${id_user} + container_name: v1.8.1-webrtc-pg + restart: always + environment: + - POSTGRES_USER=contacte + - POSTGRES_PASSWORD=ctepgSQL + - POSTGRES_DB=pbx + ports: + - 5432:5432 + networks: + - working + volumes: + # copiar a pasta /projeto/base do pabx + - ${pasta_do_projeto}/projeto/base:/base + # copiar a pasta /var/lib/pgsql/data + - ${pasta_do_postgresql}:/var/lib/postgresql/data + aplicativo: + build: + context: pabx + args: + # usar para compilar dockerfile + # DB_HOST DB_PORT DB_BASE - necessário para colocar no crontab + # environment compose é para depois do dockerfile + - DB_HOST=postgres + - DB_PORT=5432 + - DB_BASE=pbx + - ID_USER_VOLUME=${id_user} + restart: always + container_name: v1.8.1-webrtc + working_dir: /var/www/html/ + ports: + - 8080:80 + - 5038:5038 + - "5060:5060/tcp" + - "5060:5060/udp" + - "5061:5061/tcp" + - "5061:5061/udp" + - "8088:8088/tcp" + - "10000-10030:10000-10030/udp" + - 4443:443 + - 8089:8089 + privileged: true + depends_on: + - postgres + networks: + - working + links: + - postgres + volumes: + - ./pabx/etc/asterisk/:/etc/asterisk + - ./pabx/certificados/:/usr/src/certificates + - ${pasta_do_projeto}:/var/www/html/aplicativo + - ${pasta_do_projeto}/include:/var/www/html/include + - ${pasta_do_projeto}/asterisk/var_lib_asterisk/:/var/lib/asterisk/ + - ${pasta_do_projeto}/asterisk/hdaux_utilitarios_scripts/:/hdaux/utilitarios/scripts + diff --git a/version_1.8.2/env_example b/version_1.8.2/env_example new file mode 100644 index 0000000..89faa8d --- /dev/null +++ b/version_1.8.2/env_example @@ -0,0 +1,26 @@ + + +# Pasta aonde está o projeto pabx para ser sincronizado no container +# +# Exemplo: +#pasta_do_projeto=/home/user/source_pabx +#pasta_do_projeto=c://Usuario/User/source_pabx +pasta_do_projeto="" + + +# Pasta do host para sincronizar a pasta /var/lib/pgsql/data (versão 13) +# Isso será usada para manter o banco de dados caso queira levantar +# outra instância. +# +# Essa pasta pode ser enviado ao repositório caso queira compartilhar +# o banco +pasta_do_postgresql="" + + +# ID do usuário para ter acesso ao volume +# Esse id_user é para poder ter acesso ao volume sem a necessidade de se tornar root +# Será modificado o id dos usuários postgres e pbx +# Para saber seu id é o comando 'id -u'. +id_user="1000" + + diff --git a/version_1.8.2/pabx/Dockerfile b/version_1.8.2/pabx/Dockerfile new file mode 100755 index 0000000..40ced00 --- /dev/null +++ b/version_1.8.2/pabx/Dockerfile @@ -0,0 +1,83 @@ +FROM debian:bullseye-slim + +# Compose manda os valores para conectar ao banco de dados +# Esses valores são usado para crontab +# crontab não limpa variáveis de ambiente para chamar script +# Logo printenv | sed 's/^\(.*\)$/export \1/g' > /env_to_crontab.sh +# defini as variáveis que vão ser chamado em cada script crontab +ARG DB_HOST +ARG DB_PORT +ARG DB_BASE +ARG ID_USER_VOLUME + +ENV ASTERISK_VERSION 13.38-cert3 +ENV ASTERISK_ADDONS_VERSION 13.18-cert3 +ENV ASTERISK_USER pbx +ENV ASTERISK_GID pbx +ENV VERSION_SIMPLESIP v1.8 +ENV APACHE_RUN_USER pbx +ENV APACHE_RUN_GROUP pbx +ENV DB_HOST $DB_HOST +ENV DB_PORT $DB_PORT +ENV DB_BASE $DB_BASE +ENV ID_USER_VOLUME $ID_USER_VOLUME + +RUN mkdir -p /var/lock/subsys/ + +# Instalação do asterisk e do PHP 8.2 e asterisk 13.38 +COPY build-asterisk_php.sh / +RUN chmod 755 /build-asterisk_php.sh +RUN /build-asterisk_php.sh $ID_USER_VOLUME + +COPY etc/asterisk/* /etc/asterisk + +# definir as variáveis de ambiente para o cron +RUN printenv | sed 's/^\(.*\)$/\1/g' > /etc/environment +COPY crontab.sh / +RUN bash /crontab.sh +RUN crontab /etc/crontab + +# Script chamado quando acessar a página web ip:8080/config-docker.php +COPY /config_network / +RUN chmod 755 /config_network +RUN chown pbx:pbx /config_network + +# apache +COPY etc/apache2/sites-available/pabx_simples.conf /etc/apache2/sites-available/pabx_simples.conf +RUN rm -rf /etc/apache2/sites-enabled/* +RUN ln -s /etc/apache2/sites-available/pabx_simples.conf /etc/apache2/sites-enabled/pabx_simples.conf + + +# colocar os arquivos include_pat do php +RUN sed -i '745 s/^[;]\? *include_path = .*/include_path = \".:\/var\/www\/html\/include\"/g' /etc/php/8.2/cli/php.ini +RUN sed -i '745 s/^[;]\? *include_path = .*/include_path = \".:\/var\/www\/html\/include\"/g' /etc/php/8.2/apache2/php.ini + +# Executar o apache no usuário pbx +RUN sed -i 's/APACHE_RUN_USER=.*/APACHE_RUN_USER=pbx/g' /etc/apache2/envvars +RUN sed -i 's/APACHE_RUN_GROUP=.*/APACHE_RUN_GROUP=pbx/g' /etc/apache2/envvars + +COPY docker-entrypoint.sh / +COPY supervisord.conf /etc/supervisor/supervisord.conf + +#RUN sed -i "s/rtpend=.*/rtpend=10030/g" /etc/asterisk/rtp.conf +#RUN sed -i "s/hostname=.*/hostname=postgres/g" /etc/asterisk/cdr_pgsql.conf +#RUN sed -i "s/;nocolor = .*/nocolor = yes/g" /etc/asterisk/asterisk.conf + +COPY etc/init.d/cnvrtd /etc/init.d/ +COPY etc/init.d/rtabd /etc/init.d/ +COPY etc/init.d/supervisor /etc/init.d/ +COPY etc/init.d/functions /etc/init.d/ + +COPY config-docker.php /var/www/html/ + +RUN chmod 755 /etc/init.d/rtabd +RUN chmod 755 /etc/init.d/cnvrtd +RUN chmod 755 /etc/init.d/supervisor + +ENTRYPOINT ["/docker-entrypoint.sh"] + + +CMD ["supervisord","-n","-c","/etc/supervisor/supervisord.conf"] + +#docker run -it -d --name v1712 -p 8080:80/tcp -p 5038:5038/tcp -p 5060:5060/udp -p 10000-10050:10000-10050/udp aplicativo + diff --git a/version_1.8.2/pabx/asterisk/var_lib_asterisk/astdb.sqlite3 b/version_1.8.2/pabx/asterisk/var_lib_asterisk/astdb.sqlite3 new file mode 100644 index 0000000..8cb2e98 Binary files /dev/null and b/version_1.8.2/pabx/asterisk/var_lib_asterisk/astdb.sqlite3 differ diff --git a/version_1.8.2/pabx/build-asterisk_php.sh b/version_1.8.2/pabx/build-asterisk_php.sh new file mode 100644 index 0000000..49d5a0a --- /dev/null +++ b/version_1.8.2/pabx/build-asterisk_php.sh @@ -0,0 +1,238 @@ +#!/bin/bash +PROGNAME=$(basename $0) + +if test -z ${ASTERISK_VERSION}; then + echo "${PROGNAME}: ASTERISK_VERSION required" >&2 + exit 1 +fi + +set -ex + + +/usr/sbin/groupadd "pbx" +/usr/sbin/useradd -u $1 -s "/bin/bash" -d '/var/lib/asterisk/' 'pbx' -g 'pbx' + +/usr/sbin/groupadd "aplicacao" +/usr/sbin/useradd -s "/bin/bash" -d '/tmp' 'aplicacao' -g 'aplicacao' + +/usr/sbin/groupadd "simples" +/usr/sbin/useradd -s "/bin/bash" -m 'simples' -g 'simples' + + +#Remover o source.list e colocar o padrão +[ -f /etc/apt/sources.list ] && /bin/rm -f /etc/apt/sources.list +#[ -d /etc/apt/sources.list.d ] && /bin/rm -rf /etc/apt/souces.list.d/* +echo "#Principal repositório de Debian" > /etc/apt/sources.list +echo "deb http://deb.debian.org/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list +echo "deb-src http://deb.debian.org/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list +echo "" >> /etc/apt/sources.list +echo "deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list +echo "deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list +echo "" >> /etc/apt/sources.list +echo "# bullseye-updates, to get updates before a point release is made" >> /etc/apt/sources.list +echo "# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports" >> /etc/apt/sources.list +echo "deb http://deb.debian.org/debian-security bullseye-security main" >> /etc/apt/sources.list +echo "deb-src http://deb.debian.org/debian-security bullseye-security main" >> /etc/apt/sources.list + +apt-get -y update + +apt-get install lsb-release apt-transport-https ca-certificates software-properties-common -y +apt-get install wget + +wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg +sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' + +apt-get -y update + + +apt-get install -y \ + supervisor \ + cron \ + curl \ + daemon \ + libcurl4-openssl-dev \ + libncurses-dev \ + libssl-dev \ + tar \ + curl \ + bison \ + git \ + vim \ + apache2 \ + libjansson-dev \ + ffmpeg \ + build-essential \ + libedit-dev \ + libsqlite3-dev \ + uuid-dev \ + libxml2-dev \ + libspeex-dev \ + libspeexdsp-dev \ + libogg-dev \ + libvorbis-dev \ + libasound2-dev \ + portaudio19-dev \ + libcurl4-openssl-dev \ + xmlstarlet \ + bison \ + flex \ + libpq-dev \ + unixodbc-dev \ + libneon27-dev \ + libgmime-3.0-dev \ + liblua5.2-dev \ + liburiparser-dev \ + libxslt1-dev \ + libssl-dev \ + libmariadb-dev-compat \ + libmariadb-dev \ + libbluetooth-dev \ + libradcli-dev \ + freetds-dev \ + libosptk-dev \ + libjack-jackd2-dev \ + libcap-dev \ + libsnmp-dev \ + libiksemel-dev \ + libcorosync-common-dev \ + libcpg-dev \ + libcfg-dev \ + libnewt-dev \ + libpopt-dev \ + libical-dev \ + libspandsp-dev \ + libresample1-dev \ + libc-client2007e-dev \ + binutils-dev \ + libsrtp2-dev \ + libgsm1-dev \ + graphviz \ + sudo \ + zlib1g-dev \ + libldap2-dev \ + bzip2 \ + libsrtp2-dev \ + libopus-dev \ + libvpx-dev \ + patch \ + php8.2 \ + php8.2-cli \ + php8.2-common \ + php8.2-dev \ + php8.2-gd \ + php8.2-mbstring \ + php8.2-mysql \ + php8.2-common \ + php8.2-snmp \ + php8.2-soap \ + php8.2-xml \ + php8.2-xmlrpc \ + php8.2-pgsql \ + php8.2-curl + +a2enmod proxy +a2enmod proxy_wstunnel +a2enmod ssl +a2enmod rewrite + +### INSTALL CENTRAL SIMPLES IP ### +mkdir -p /usr/src/asterisk + +cd /usr/src/asterisk +curl -vsL https://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-13.38.3.tar.gz | tar --strip-components 1 -xz + +# 1.5 jobs per core works out okay +: ${JOBS:=$(( $(nproc) + $(nproc) / 2 ))} + +mkdir -p /etc/asterisk/ \ + /var/spool/asterisk/fax + +./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-srtp=/usr/include/srtp2 +make menuselect/menuselect menuselect-tree menuselect.makeopts + +menuselect/menuselect --disable chan_pjsip menuselect.makeopts +menuselect/menuselect --enable chan_sip menuselect.makeopts +menuselect/menuselect --enable cdr_csv menuselect.makeopts +menuselect/menuselect --enable func_cdr menuselect.makeopts +menuselect/menuselect --enable cdr_pgsql menuselect.makeopts +menuselect/menuselect --enable codec_opus menuselect.makeopts +menuselect/menuselect --enable res_format_attr_opus menuselect.makeopts +menuselect/menuselect --enable res_crypto menuselect.makeopts +menuselect/menuselect --enable res_http_websocket menuselect.makeopts +menuselect/menuselect --enable res_ari menuselect.makeopts +menuselect/menuselect --enable res_stasis menuselect.makeopts +menuselect/menuselect --enable res_stun_monitor menuselect.makeopts +menuselect/menuselect --enable res_phoneprov menuselect.makeopts +menuselect/menuselect --enable res_odbc menuselect.makeopts +menuselect/menuselect --enable res_srtp menuselect.makeopts + +# we don't need any sounds in docker, they will be mounted as volume +menuselect/menuselect --disable-category MENUSELECT_CORE_SOUNDS menuselect.makeopts +menuselect/menuselect --disable-category MENUSELECT_MOH menuselect.makeopts +menuselect/menuselect --disable-category MENUSELECT_EXTRA_SOUNDS menuselect.makeopts + +make -j ${JOBS} all +make install + +# copy default configs +# cp /usr/src/asterisk/configs/basic-pbx/*.conf /etc/asterisk/ +make dist-clean +chown -R pbx:pbx /var/*/asterisk \ + /usr/*/asterisk \ + /usr/lib64/asterisk +chmod -R 750 /var/spool/asterisk + +cd / + + +#sed -i 's/;nocolor = yes/nocolor = yes/g' /etc/asterisk/asterisk.conf + +echo "/usr/lib64/" > /etc/ld.so.conf.d/local.conf +ldconfig + +apt-get clean +apt-get autoremove -y + + +### CONFIGURANDO O PHP ### +sed -i 's/^error_reporting = .*/error_reporting = E_ALL | E_STRICT/g' /etc/php/8.2/cli/php.ini +sed -i 's/^error_reporting = .*/error_reporting = E_ALL | E_STRICT/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/display_errors = .*/display_errors = Off/g' /etc/php/8.2/cli/php.ini +sed -i 's/display_errors = .*/display_errors = Off/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/^display_startup_errors = .*/display_startup_errors = Off/g' /etc/php/8.2/cli/php.ini +sed -i 's/^display_startup_errors = .*/display_startup_errors = Off/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/^upload_max_filesize = .*/upload_max_filesize = 100M/g' /etc/php/8.2/cli/php.ini +sed -i 's/^upload_max_filesize = .*/upload_max_filesize = 100M/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/memory_limit = .*/memory_limit = -1/g' /etc/php/8.2/cli/php.ini +sed -i 's/memory_limit = .*/memory_limit = 256M/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/;error_log = php_errors.*/error_log = \/var\/log\/aplsimples.log/g' /etc/php/8.2/cli/php.ini +sed -i 's/;error_log = php_errors.*/error_log = \/var\/log\/aplsimples.log/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/^default_charset = .*/default_charset = "iso-8859-1"/g' /etc/php/8.2/cli/php.ini +sed -i 's/^default_charset = .*/default_charset = "iso-8859-1"/g' /etc/php/8.2/apache2/php.ini + +sed -i '745s/^;include_path = .*/include_path = \".:\/var\/www\/html\/include::\/usr\/share\/pear:\/var\/www\/html\/include\/core\"/g' /etc/php/8.2/cli/php.ini +sed -i '745 s/^;include_path = .*/include_path = \".:\/var\/www\/html\/include::\/usr\/share\/pear:\/var\/www\/html\/include\/core\"/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/^;date.timezone =.*/date.timezone = "America\/Cuiaba"/g' /etc/php/8.2/cli/php.ini +sed -i 's/^;date.timezone =.*/date.timezone = "America\/Cuiaba"/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/^;openssl.cafile=.*/openssl.cafile = \/usr\/src\/certificates\/RootCA.pem/g' /etc/php/8.2/cli/php.ini +sed -i 's/^;openssl.capath=.*/openssl.capath = \/usr\/src\/certificates/g' /etc/php/8.2/cli/php.ini + +sed -i 's/^;openssl.cafile=.*/openssl.cafile = \/usr\/src\/certificates\/RootCA.pem/g' /etc/php/8.2/apache2/php.ini +sed -i 's/^;openssl.capath=.*/openssl.capath = \/usr\/src\/certificates/g' /etc/php/8.2/apache2/php.ini + +sed -i 's/^export APACHE_RUN_USER=.*/export APACHE_RUN_USER=pbx/g' /etc/apache2/envvars +sed -i 's/^export APACHE_RUN_GROUP=.*/export APACHE_RUN_GROUP=pbx/g' /etc/apache2/envvars + +echo "export DB_HOST=${DB_HOST}" >> /etc/apache2/envvars + +cd /var/www/html/ + +exec rm -f /build-asterisk.sh diff --git a/version_1.8.2/pabx/certificados/RootCA.crt b/version_1.8.2/pabx/certificados/RootCA.crt new file mode 100644 index 0000000..2cfc265 --- /dev/null +++ b/version_1.8.2/pabx/certificados/RootCA.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDMTCCAhmgAwIBAgIUfwDYeruX8TSBfeO3MBY7/p6MuKEwDQYJKoZIhvcNAQEL +BQAwKDELMAkGA1UEBhMCQlIxGTAXBgNVBAMMEFNpbXBsZXNpcC1XZWJydGMwHhcN +MjQwNTI0MTU1NjUzWhcNMjcwMzE0MTU1NjUzWjAoMQswCQYDVQQGEwJCUjEZMBcG +A1UEAwwQU2ltcGxlc2lwLVdlYnJ0YzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAO7PBUAHkpEz14HuK5WqtPVi+7YALsUQbalU1RGJ4MtSBC/OZCl+VuuG +rs4mTxil4XNcdSUjlCDxEoP078lwodMRmdyRA7mcyqjSt51AORnoMca7LYVCNSjw +hu7S8iBIGXRtaIFRnMmBz7IerdSpnxIDTnN0/VxBrTAH1V6U/8TT7Eb+rIQoQizP +CrOR4HnnTYgKpLKw97dsPA55tk3zLrDNU4lzXTK8E8ZVnx5B1meBa039R1kdhEWO +yYAJmyMOqh6Vw8BmjY8b6g25TRbbWTeAEWXkXqR/MZ6m4h1Xx/ff65dJm+POWQjr +YBXNfXfH5vUaM6QX7dlJngKMTCecya8CAwEAAaNTMFEwHQYDVR0OBBYEFG0L3bmP +JQd9PjReRfsSkpBWrqbTMB8GA1UdIwQYMBaAFG0L3bmPJQd9PjReRfsSkpBWrqbT +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHqhBMDZHeb8lRDR +7+XNNLopBfCxQMTwNYjjz3w+kySrAkNOZdctgnhPvTXWnjuoe8fWQZKtp7Y627U1 +bn0zYNJTF0Er53XD+20gyLecD1SSZyyGSUUZBe9dOCI7QVDKNsAIr2ldMZXIl8Fk +iWJ2wfa0CHvrnlcEDIySXpPMzj+QCr/hPFFovDTSEFVgeWoEyUZTCPex0xpnDbde +Zg4I462fg9drKLDSGkNS/dLlGXI2TRPpjBTnI03KlSZBSR4oT/N1On/NDf9P9NNb +yaKD/l5z2DOa0wfN9MXKaFY1mMWG2a35SYTZRvo5lsgpOe1oo+2PPlQPXdZsFHBG +QmN8i9g= +-----END CERTIFICATE----- diff --git a/version_1.8.2/pabx/certificados/RootCA.key b/version_1.8.2/pabx/certificados/RootCA.key new file mode 100644 index 0000000..49bcdc7 --- /dev/null +++ b/version_1.8.2/pabx/certificados/RootCA.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDuzwVAB5KRM9eB +7iuVqrT1Yvu2AC7FEG2pVNURieDLUgQvzmQpflbrhq7OJk8YpeFzXHUlI5Qg8RKD +9O/JcKHTEZnckQO5nMqo0redQDkZ6DHGuy2FQjUo8Ibu0vIgSBl0bWiBUZzJgc+y +Hq3UqZ8SA05zdP1cQa0wB9VelP/E0+xG/qyEKEIszwqzkeB5502ICqSysPe3bDwO +ebZN8y6wzVOJc10yvBPGVZ8eQdZngWtN/UdZHYRFjsmACZsjDqoelcPAZo2PG+oN +uU0W21k3gBFl5F6kfzGepuIdV8f33+uXSZvjzlkI62AVzX13x+b1GjOkF+3ZSZ4C +jEwnnMmvAgMBAAECggEBAI7FS+E85b5TnRr71ijTdv5hoBTuRQfhy335zqx+nttP +fFtMbAt2keabjbSHqLAWtBOxCgQbIjsThTtI23a2FLlIg5EfTXfRqkOGPuoPdFPt +wpyKWSubKocATdtIWCM+l6FIq7rsnOzH4/EccFZ81jIBsgxKvBJE3ZKijEjQkZ0M +4kDmLXOHxmYaLcwViQREs/JMABkzFAtwZPVu3ipjeICKx1hLf4/BDGeVRwVDb6W+ +AnKhs7CDkm8MBfrhFt1/vvahL6mVkysZ0qY0Moy9h2SE2K0u28Z0iD0OcrOG2CKI +ez3eVlxTFJ/nzRWKRPN3UR+zfoF2QdSnTrEAhwFp1kECgYEA+oUk+DWwAUwO6AcR +HAhU0RdwTr7o9Zn4mBtj+NNeJuuO0Ppy1/L5Qdp9tYmNTOyrkdXLlRyOwqsalyw+ +JzvcZqhQQSeasOZIcEvb7qN67ZEgPx5TO4+zKrbYxYOKoF3Su/neS1XC1I6gd+Nm +13XwiKEVU3TcywcfpHWJ+R2Ajw8CgYEA9AhLd9ufwCZ0pRLC0RF0o21KZHMNNmNw +TjvpW9sgrXKLV2i3EZYiMvaeo9DxlSyTc7VPY+HO6xa62/bnTtOcURohleSCGo5b +mHCSi7Q8qQclAMe/6aJbF7TerSrXV9M7KmloEonXRGapj9ui+L1YjpmCHtFNjYZR +pvY6RegwG2ECgYEAo6MEmvy2kqJTukujaWQnwsxEl6ssEAEa2IBLtOSbw2BqUSbG +jTgwiEtngYTvvyd4ijHUYPneZlnNbKGBl68KMCQRB/4OlS5WcsOaTS6LxVHedlwg +ke8zYNs+jQV3L3kZhZ+ZDCxgruba+nSXYHWxQA24GGNlNVjZ2lrMXORgbRECgYEA +nboqxSp/45s3c2Zf4u+MWwENv0UZuhilgvt4RjWotlK9u15kTQqjyhrayHkJXGi2 +WWhMCvvtWMeVOQ0pzio587WXFaHfcbinfSztmzyApKOIiCuTYDfe9sCh2H1DOHG/ +4RbF/I15RK2yVNgaSvlfHrQbhT21CY9SgT7OxVZgmaECgYBD7N5Qan7sHa5erbbG +BRhoyTUieKHpPZik3EXWwhhJPkc5+hsJLLJvhH2By2FwOn0kCN21SkLgcvruFS4K +EGa6CuNA5oCEGqoiIVnbz1oqByaYRv3YDxxNDZMH+DNpmvbmKNOvaUBX1HEbMJtG +PSbAALwrxsh7o6bLnyfK4fcgIQ== +-----END PRIVATE KEY----- diff --git a/version_1.8.2/pabx/certificados/RootCA.pem b/version_1.8.2/pabx/certificados/RootCA.pem new file mode 100644 index 0000000..2cfc265 --- /dev/null +++ b/version_1.8.2/pabx/certificados/RootCA.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDMTCCAhmgAwIBAgIUfwDYeruX8TSBfeO3MBY7/p6MuKEwDQYJKoZIhvcNAQEL +BQAwKDELMAkGA1UEBhMCQlIxGTAXBgNVBAMMEFNpbXBsZXNpcC1XZWJydGMwHhcN +MjQwNTI0MTU1NjUzWhcNMjcwMzE0MTU1NjUzWjAoMQswCQYDVQQGEwJCUjEZMBcG +A1UEAwwQU2ltcGxlc2lwLVdlYnJ0YzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAO7PBUAHkpEz14HuK5WqtPVi+7YALsUQbalU1RGJ4MtSBC/OZCl+VuuG +rs4mTxil4XNcdSUjlCDxEoP078lwodMRmdyRA7mcyqjSt51AORnoMca7LYVCNSjw +hu7S8iBIGXRtaIFRnMmBz7IerdSpnxIDTnN0/VxBrTAH1V6U/8TT7Eb+rIQoQizP +CrOR4HnnTYgKpLKw97dsPA55tk3zLrDNU4lzXTK8E8ZVnx5B1meBa039R1kdhEWO +yYAJmyMOqh6Vw8BmjY8b6g25TRbbWTeAEWXkXqR/MZ6m4h1Xx/ff65dJm+POWQjr +YBXNfXfH5vUaM6QX7dlJngKMTCecya8CAwEAAaNTMFEwHQYDVR0OBBYEFG0L3bmP +JQd9PjReRfsSkpBWrqbTMB8GA1UdIwQYMBaAFG0L3bmPJQd9PjReRfsSkpBWrqbT +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHqhBMDZHeb8lRDR +7+XNNLopBfCxQMTwNYjjz3w+kySrAkNOZdctgnhPvTXWnjuoe8fWQZKtp7Y627U1 +bn0zYNJTF0Er53XD+20gyLecD1SSZyyGSUUZBe9dOCI7QVDKNsAIr2ldMZXIl8Fk +iWJ2wfa0CHvrnlcEDIySXpPMzj+QCr/hPFFovDTSEFVgeWoEyUZTCPex0xpnDbde +Zg4I462fg9drKLDSGkNS/dLlGXI2TRPpjBTnI03KlSZBSR4oT/N1On/NDf9P9NNb +yaKD/l5z2DOa0wfN9MXKaFY1mMWG2a35SYTZRvo5lsgpOe1oo+2PPlQPXdZsFHBG +QmN8i9g= +-----END CERTIFICATE----- diff --git a/version_1.8.2/pabx/certificados/RootCA.srl b/version_1.8.2/pabx/certificados/RootCA.srl new file mode 100644 index 0000000..8052178 --- /dev/null +++ b/version_1.8.2/pabx/certificados/RootCA.srl @@ -0,0 +1 @@ +346E4E2447EF354E42823606159D8A94EEC09982 diff --git a/version_1.8.2/pabx/certificados/domains.ext b/version_1.8.2/pabx/certificados/domains.ext new file mode 100644 index 0000000..051a49a --- /dev/null +++ b/version_1.8.2/pabx/certificados/domains.ext @@ -0,0 +1,7 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names +[alt_names] +DNS.1 = localhost +DNS.2 = 192.168.115.179 diff --git a/version_1.8.2/pabx/certificados/localhost.crt b/version_1.8.2/pabx/certificados/localhost.crt new file mode 100644 index 0000000..7c6f016 --- /dev/null +++ b/version_1.8.2/pabx/certificados/localhost.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDjDCCAnSgAwIBAgIUNG5OJEfvNU5CgjYGFZ2KlO7AmYIwDQYJKoZIhvcNAQEL +BQAwKDELMAkGA1UEBhMCQlIxGTAXBgNVBAMMEFNpbXBsZXNpcC1XZWJydGMwHhcN +MjQwNTI0MTU1OTI3WhcNMjcwMzE0MTU1OTI3WjB0MQswCQYDVQQGEwJCUjETMBEG +A1UECAwKTWF0b0dyb3NzbzEPMA0GA1UEBwwGQ3VpYWJhMSUwIwYDVQQKDBxTaW1w +bGVzaXAtd2VicnRjLWNlcnRpZmljYXRlMRgwFgYDVQQDDA9sb2NhbGhvc3QubG9j +YWwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCdzuMBCNHuBNR9jcT1 +ZFzXUKc/q1kGe/yJ25SBBgpfgRtgLoM1GV8LONIF2gVeS7amzp7Lxzhcm+G2EJBY +e9G+NotQhpE3t07nTp4tSp/sbwp159tkhqJwD4nouic4vwiNXpSsbIkVhVQRdSdw +sS0nG2hPUw9aM5PWSe29hCuGRMmaspmoXRInLZ1QgyRmI42oFxJ8bc6mNp7uBMF6 +NbNfLLItiq9Zj65777zXjjtDL3wpmN/x8eaN0jqaGPHQyjMjrbEyrfOeZ71VCa2I +vI+qehrgAAXM583Krc5c/0SurEXWG5xIV+ysjUKBsw5AKeWg/T8rTvI0Hc1pFARt +28n7AgMBAAGjYjBgMB8GA1UdIwQYMBaAFG0L3bmPJQd9PjReRfsSkpBWrqbTMAkG +A1UdEwQCMAAwCwYDVR0PBAQDAgTwMCUGA1UdEQQeMByCCWxvY2FsaG9zdIIPMTky +LjE2OC4xMTUuMTc5MA0GCSqGSIb3DQEBCwUAA4IBAQCDiGyLu4e+gFVdSx2+pcdU +EgjCqoulBfeLhEi0s/N7ewWQGsTf7h5Ay6jhQGWcbJaMW2MV3UhfmrREWGLhWBD9 +gJ9zqU2hTlD0ImXnsz4WEdltzWdP8VNhnWiXOH6lHIQaSHnMw+18JShuCIajBico +71ZWxnu0g3yTuTGEYnI4Ataqgn7JQzt+xSFXjjOfFdgYLRIn9gRjoA3W1tPYgfU0 +hLF/ZCqY3DxmROvy1pUKS23CkwAcdg+EP5Vmpk1piCn0e/n+kRuGV4uqpqyoODtw +lN2Fw5aFEgCC79LnSbaGYFCvWY+OLzwtj8BD5UhE/LNDT765mPQFUETPgRYWLSzn +-----END CERTIFICATE----- diff --git a/version_1.8.2/pabx/certificados/localhost.csr b/version_1.8.2/pabx/certificados/localhost.csr new file mode 100644 index 0000000..0c5d931 --- /dev/null +++ b/version_1.8.2/pabx/certificados/localhost.csr @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICuTCCAaECAQAwdDELMAkGA1UEBhMCQlIxEzARBgNVBAgMCk1hdG9Hcm9zc28x +DzANBgNVBAcMBkN1aWFiYTElMCMGA1UECgwcU2ltcGxlc2lwLXdlYnJ0Yy1jZXJ0 +aWZpY2F0ZTEYMBYGA1UEAwwPbG9jYWxob3N0LmxvY2FsMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEAnc7jAQjR7gTUfY3E9WRc11CnP6tZBnv8iduUgQYK +X4EbYC6DNRlfCzjSBdoFXku2ps6ey8c4XJvhthCQWHvRvjaLUIaRN7dO506eLUqf +7G8KdefbZIaicA+J6LonOL8IjV6UrGyJFYVUEXUncLEtJxtoT1MPWjOT1kntvYQr +hkTJmrKZqF0SJy2dUIMkZiONqBcSfG3Opjae7gTBejWzXyyyLYqvWY+ue++81447 +Qy98KZjf8fHmjdI6mhjx0MozI62xMq3znme9VQmtiLyPqnoa4AAFzOfNyq3OXP9E +rqxF1hucSFfsrI1CgbMOQCnloP0/K07yNB3NaRQEbdvJ+wIDAQABoAAwDQYJKoZI +hvcNAQELBQADggEBAEc7RJzFLFr/S/k7XV2CRaH4vRyrD3eo41EhkJtOkvle82bB +A4zrGnmg5ss2jgyv4RPTPxc/6+FXD1sFD8PH0H9aBqrOD2HWEHV+AhBhD3/nY9P/ +PRcqcO0TS+6Xdft8GC9KHHGnwKROkrrgOAHj1JFdnmUVSi7kU0qkrqoNivXeqMry +kvgJf6+arSxNJBTDzuAdjA/BmJs6ocIpnLXMo4T7zN02mt92cFDkqQZbS89EBSiD +heyREeZZgauh04TbCgVf2nf98mBAupgBXFMAvT3i4+pa5S+brBZQNKQ1oDPC77at +hhwyV8AksnlBk8rBX83TCxNGTqE1Q1ljfFgSpvQ= +-----END CERTIFICATE REQUEST----- diff --git a/version_1.8.2/pabx/certificados/localhost.key b/version_1.8.2/pabx/certificados/localhost.key new file mode 100644 index 0000000..755805d --- /dev/null +++ b/version_1.8.2/pabx/certificados/localhost.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdzuMBCNHuBNR9 +jcT1ZFzXUKc/q1kGe/yJ25SBBgpfgRtgLoM1GV8LONIF2gVeS7amzp7Lxzhcm+G2 +EJBYe9G+NotQhpE3t07nTp4tSp/sbwp159tkhqJwD4nouic4vwiNXpSsbIkVhVQR +dSdwsS0nG2hPUw9aM5PWSe29hCuGRMmaspmoXRInLZ1QgyRmI42oFxJ8bc6mNp7u +BMF6NbNfLLItiq9Zj65777zXjjtDL3wpmN/x8eaN0jqaGPHQyjMjrbEyrfOeZ71V +Ca2IvI+qehrgAAXM583Krc5c/0SurEXWG5xIV+ysjUKBsw5AKeWg/T8rTvI0Hc1p +FARt28n7AgMBAAECggEABGCq12qBOFMV+e2m2w/Pq4FnQlLkg1OJK+HVesbKHuAb +/E0OArkTc+I9oT/tCjKbfIEa0phSLe99EWngNzQoG1i0AKXa/WquW6hIpwT87rgd +2Ct4YI+DjgxATR5s3BwghptrEGVqYBh0vo87atrfX8hY2mp5cI0hur4OREWYV38h +18rILsATZHRSB4+h9oLHOPIcGpUV2Vr0mCUXU/OUdDLcCXBakB1U+npeacy1MKzL +5sb+hK5W2Xu2qWwYMSmFzbpmxNuUPDES7LSD8mL7jiBcKWO4pnh7EMwqO8Sf1BfO +B1smTSDymAd6QduvzhJPCzUOy3px/ZuSL/rNFLExAQKBgQDQtuM96Yh0OQX0lMbY +i2TJVaR08DkmpDMKsxOFgyTh4mR+LWhpaBmOLD/0prwcFZl/ZMkwCdeMEUoAo5x2 +PFTaKXWSYgq632XQiojtQESICW/nKWhx0X0+MYsTmjjN0ZtBqPDPcr2id6wE+0T9 +hbr9UbnxxynrFBZ8umtC+ImROwKBgQDBj4PithBNT1tpGiDnkxt1yWOKlMTKBdfv +CovsHhWMhQvCvnWiiG3OGkTrXtmWHLCpL2wXBz4vtDcY2jeJxBf+HfUF2ropSfKP +UlOZSpdMeMdqYmbZzIG4QRgqA23O6YJ+zYeBCYctn+Nz+Q98WCEFYq5SGncOcKLN +gb26fSseQQKBgQCe3IXMyyNkqz6gMlnD2x3ErV42793gTpzXKQTT28VH9YTeEXvm +tyi0cXPgqMSHb91c/P6xhNw+ra4xHFdsG3HOeD4YRG28XWvmtnuQchl3ng9B2N+5 +umVk4Frmeb2A02kkKg3ZKJG0xvf09rhFa/Ou+vTYVerPFoQjPdWErR4wnwKBgQCA +WSrp7TIYIZQKuHGzPP/LdfQUk5t+HqvV7VdlBXniiOKIiwSz9uVg8lha/rUnbfTS +6wgwqPPabBTQ3PpQ1v/V2IV+EVC6SjeWQ8/9aNG0uq345DExIQOvazKbwVRSDNMk +RCMjNG83mLsZTsCvAj07NflDphrmL1g1D2AAxjkOQQKBgCDXz/EXXMDpEU02kYpV +ovVGQ0qUH2oZ+ATax34hNvsLEuzENkcUFzIqQjXxoxwylddFvaIhK0KWACy3WJDe +rhp89NJjvycKrzlYbs8sd5BdGfeqAKhXQxF8H4w+BBShRKzMA1iBr07hsn2gA1H7 +tU9hcLllm+PQpHOHb5T9gR8P +-----END PRIVATE KEY----- diff --git a/version_1.8.2/pabx/config-docker.php b/version_1.8.2/pabx/config-docker.php new file mode 100644 index 0000000..fd17405 --- /dev/null +++ b/version_1.8.2/pabx/config-docker.php @@ -0,0 +1,18 @@ +:8080/config-docker.php + +$ip = explode(":", $_SERVER['HTTP_HOST'])[0]; +$result_system=system("/config_network $ip", $qwe); +//echo "$result_system"; + + +?> \ No newline at end of file diff --git a/version_1.8.2/pabx/config_network b/version_1.8.2/pabx/config_network new file mode 100755 index 0000000..379080d --- /dev/null +++ b/version_1.8.2/pabx/config_network @@ -0,0 +1,40 @@ +#!/bin/bash + +IP_HOST="$1" +if [[ -z $IP_HOST ]];then + echo "Sem argumento IP. ERROR" + exit; +fi + + +if [[ -n "$(grep "externaddr=" /etc/asterisk/sip_general_customizado.conf )" ]] +then + sed -i "s/;\?externaddr=.*/externaddr=${IP_HOST}/g" /etc/asterisk/sip_general_customizado.conf +else + echo -e "\nexternaddr=${IP_HOST}" >> /etc/asterisk/sip_general_customizado.conf +fi +[[ $? -eq 0 ]] && echo "

[ok] - definido externaddr=${IP_HOST}

" || echo "

[false] - externaddr nao definido

" + + +if [[ -n "$(grep "localnet=" /etc/asterisk/sip_general_customizado.conf )" ]] +then + sed -i "s/;\?localnet=.*/localnet=0.0.0.0\/32/g" /etc/asterisk/sip_general_customizado.conf +else + echo "localnet=0.0.0.0/32" >> /etc/asterisk/sip_general_customizado.conf +fi +[[ $? -eq 0 ]] && echo "

[ok] - definido localnet=0.0.0.0/32

" || echo "

[false] - localnet nao definido

" + + +if [[ -n "$(grep "media_address=" /etc/asterisk/sip_general_customizado.conf)" ]] +then + sed -i "s/;\?media_address=.*/media_address=${IP_HOST}/g" /etc/asterisk/sip_general_customizado.conf +else + echo "media_address=${IP_HOST}" >> /etc/asterisk/sip_general_customizado.conf +fi +[[ $? -eq 0 ]] && echo "

[ok] - definido media_address=${IP_HOST}

" || echo "

[false] - media_address nao definido

" + +asterisk -rx "sip reload" +[[ $? -eq 0 ]] && echo "

[ok] - asterisk atualizado

" || echo "

[false] - nao carregado no asterisk

" + +echo "

Concluido

" + diff --git a/version_1.8.2/pabx/crontab.sh b/version_1.8.2/pabx/crontab.sh new file mode 100644 index 0000000..48bfb46 --- /dev/null +++ b/version_1.8.2/pabx/crontab.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +echo "#Servicos Auxiliares" >> /etc/crontab +echo "0 0 * * * root /var/lib/asterisk/scripts/callcenter/reload.sh" >> /etc/crontab +echo "0 1 * * * root /hdaux/utilitarios/scripts/hd.sh " >> /etc/crontab +echo "*/1 * * * * root /var/lib/asterisk/scripts/callcenter/queue_log.php" >> /etc/crontab +echo "*/1 * * * * root /var/lib/asterisk/scripts/callcenter/monitora_agentes.php" >> /etc/crontab +echo "*/1 * * * * root /var/lib/asterisk/scripts/manutencaoDB/importaBilhetes.php" >> /etc/crontab +echo "*/30 * * * * root /var/lib/asterisk/scripts/portabilidade/atualiza_cliente.php" >> /etc/crontab +echo "*/1 * * * * root /var/lib/asterisk/scripts/workflow/workflowSender.php" >> /etc/crontab +echo "0 2 * * * root /var/lib/asterisk/scripts/manutencaoDB/manutencaodb.php" >> /etc/crontab +echo "#*/1 * * * * root /var/lib/asterisk/scripts/integracao/encerraChamada.php" >> /etc/crontab +echo "*/1 * * * * root /var/lib/asterisk/scripts/callcenter/atualizar-dacs.php" >> /etc/crontab +echo "*/1 * * * * root sleep 15 && /var/lib/asterisk/scripts/callcenter/atualizar-dacs.php" >> /etc/crontab +echo "*/1 * * * * root sleep 30 && /var/lib/asterisk/scripts/callcenter/atualizar-dacs.php" >> /etc/crontab +echo "*/1 * * * * root sleep 45 && /var/lib/asterisk/scripts/callcenter/atualizar-dacs.php" >> /etc/crontab +echo "#Transbordo Assistido" >> /etc/crontab +echo "*/1 * * * * root /var/lib/asterisk/scripts/callcenter/transbordo.php" >> /etc/crontab +echo "*/1 * * * * root sleep 15 && /var/lib/asterisk/scripts/callcenter/transbordo.php" >> /etc/crontab +echo "*/1 * * * * root sleep 30 && /var/lib/asterisk/scripts/callcenter/transbordo.php" >> /etc/crontab +echo "*/1 * * * * root sleep 45 && /var/lib/asterisk/scripts/callcenter/transbordo.php" >> /etc/crontab +echo "#Backup" >> /etc/crontab +echo "*/10 * * * * root /var/lib/asterisk/scripts/backup/backup.php" >> /etc/crontab +echo "#Backup - Shell" >> /etc/crontab +echo "0 1 * * * root /hdaux/utilitarios/scripts/backup.sh config,bd" >> /etc/crontab +echo "#VPN" >> /etc/crontab +echo "*/1 * * * * root /bin/sip_teste_vpn.sh" >> /etc/crontab +echo "#Remove Caixa Postal" >> /etc/crontab +echo "0 1 * * * root find /var/spool/asterisk/voicemail/default/ -iname *.WAV -mtime +10 -exec rm -rf {} \\;" >> /etc/crontab +echo "0 1 * * * root find /var/spool/asterisk/voicemail/default/ -iname *.txt -mtime +10 -exec rm -rf {} \\;" >> /etc/crontab +echo "#Limpa Maildrop" >> /etc/crontab +echo "0 6 * * * root for i in \$(ls -1 /var/spool/postfix/maildrop/) ; do /bin/rm -rf /var/spool/postfix/maildrop/\$i ; done" >> /etc/crontab +echo "#Bloqueio - SIP" >> /etc/crontab +echo "*/1 * * * * root /hdaux/utilitarios/scripts/bloqueia_autenticacao.sh" >> /etc/crontab +echo "#NTP" >> /etc/crontab +echo "*/15 * * * * root /hdaux/utilitarios/scripts/ntp.sh" >> /etc/crontab +echo "#Logrotate" >> /etc/crontab +echo "59 23 * * * root /hdaux/utilitarios/scripts/logrotate.sh --force" >> /etc/crontab +echo "57 23 * * * root /hdaux/utilitarios/scripts/temporizador_de_dados.sh" >> /etc/crontab + diff --git a/version_1.8.2/pabx/docker-entrypoint.sh b/version_1.8.2/pabx/docker-entrypoint.sh new file mode 100755 index 0000000..06d500c --- /dev/null +++ b/version_1.8.2/pabx/docker-entrypoint.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# run as user asterisk by default +ASTERISK_USER=${ASTERISK_USER:-asterisk} + +if [ "$1" = "" ]; then + COMMAND="/usr/sbin/asterisk -T -W -U ${ASTERISK_USER} -p -vvvdddf" +else + COMMAND="$@" +fi + +if [ "${ASTERISK_UID}" != "" ] && [ "${ASTERISK_GID}" != "" ]; then + # recreate user and group for asterisk + # if they've sent as env variables (i.e. to macth with host user to fix permissions for mounted folders + + deluser asterisk && \ + adduser --gecos "" --no-create-home --uid ${ASTERISK_UID} --disabled-password ${ASTERISK_USER} \ + || exit +fi + +mkdir -p /var/run/asterisk + +chown -R ${ASTERISK_USER}: /var/log/asterisk \ + /var/lib/asterisk \ + /var/run/asterisk \ + /var/spool/asterisk; \ + +cp /var/www/html/config-docker.php /var/www/html/aplicativo/ +/hdaux/utilitarios/scripts/permissoes_atualizacao.sh + +exec ${COMMAND} \ No newline at end of file diff --git a/version_1.8.2/pabx/etc/apache2/sites-available/pabx_simples.conf b/version_1.8.2/pabx/etc/apache2/sites-available/pabx_simples.conf new file mode 100644 index 0000000..aab2dbd --- /dev/null +++ b/version_1.8.2/pabx/etc/apache2/sites-available/pabx_simples.conf @@ -0,0 +1,100 @@ + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html/aplicativo + + SSLEngine on + SSLCertificateFile /usr/src/certificates/localhost.crt + SSLCertificateKeyFile /usr/src/certificates/localhost.key + #SSLCertificateFile /etc/asterisk/keys/asterisk.crt + #SSLCertificateKeyFile /etc/asterisk/keys/asterisk.key + + + Alias /gravacoes "/var/spool/asterisk/monitor" + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Require all granted + Allow from 127.0.0.1 + + + Alias /agenda "/var/www/html/agenda" + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Require all granted + Allow from all + + + Alias /downloads "/hdaux/downloads" + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Require all granted + Allow from all + + + Alias /ferramentas "/hdaux/utilitarios/ferramentas" + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Require all granted + Allow from all + + + Alias /manuais "/hdaux/utilitarios/manuais" + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Require all granted + Allow from all + + + + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + + + +ServerAdmin webmaster@localhost +ServerName localhost +DocumentRoot /var/www/html + +SSLEngine on +SSLCertificateFile /usr/src/certificates/localhost.crt +SSLCertificateKeyFile /usr/src/certificates/localhost.key +#SSLCertificateFile /etc/asterisk/keys/asterisk.crt +#SSLCertificateKeyFile /etc/asterisk/keys/asterisk.key +ErrorLog ${APACHE_LOG_DIR}/error.log +CustomLog ${APACHE_LOG_DIR}/access.log combined + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/version_1.8.2/pabx/etc/asterisk/-R b/version_1.8.2/pabx/etc/asterisk/-R new file mode 100644 index 0000000..5f42f76 Binary files /dev/null and b/version_1.8.2/pabx/etc/asterisk/-R differ diff --git a/version_1.8.2/pabx/etc/asterisk/acl.conf b/version_1.8.2/pabx/etc/asterisk/acl.conf new file mode 100644 index 0000000..b052606 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/acl.conf @@ -0,0 +1,80 @@ +; +; Named Access Control Lists (ACLs) +; +; A convenient way to share acl definitions +; +; This configuration file is read on startup +; +; CLI Commands +; ----------------------------------------------------------- +; acl show Show all named ACLs configured +; acl show Show contents of a particular named ACL +; reload acl Reload configuration file +; +; Any configuration that uses ACLs which has been made to be able to use named +; ACLs will specify a named ACL with the 'acl' option in its configuration in +; a similar fashion to the usual 'permit' and 'deny' options. Example: +; acl=my_named_acl +; +; Multiple named ACLs can be applied by either comma separating the arguments or +; just by adding additional ACL lines. Example: +; acl=my_named_acl +; acl=my_named_acl2 +; +; or +; +; acl=my_named_acl,my_named_acl2 +; +; ACLs specified by name are evaluated independently from the ACL specified via +; permit/deny. In order for an address to pass a given ACL, it must pass both +; the ACL specified by permit/deny for a given item as well as any named ACLs +; that were specified. +; +;[example_named_acl1] +;deny=0.0.0.0/0.0.0.0 +;permit=209.16.236.0 +;permit=209.16.236.1 +; +;[example_named_acl2] +;permit=0.0.0.0/0.0.0.0 +;deny=10.24.20.171 +;deny=10.24.20.103 +;deny=209.16.236.1 +; +; example_named_acl1 above shows an example of whitelisting. When whitelisting, the +; named ACLs should follow a deny that blocks everything (like deny=0.0.0.0/0.0.0.0) +; The following example explains how combining the ACLs works: +; +; [example_item_with_acl] +; acl=example_named_acl1 +; acl=example_named_acl2 +; +; Suppose 209.16.236.0 tries to communicate and the ACL for that example is applied to it... +; First, example_named_acl1 is evaluated. The address is allowed by that ACL. +; Next, example_named_acl2 is evaluated. The address isn't blocked by example_named_acl2 +; either, so it passes. +; +; Suppose instead 209.16.236.1 tries to communicate and the same ACL is applied. +; First, example_named_acl1 is evaluated and the address is allowed. +; However, it is blocked by example_named_acl2, so the address is blocked from the combined +; ACL. +; +; Similarly, the permits/denies in specific configurations that make up an ACL definition +; are also treated as a separate ACL for evaluation. So if we change the example above to: +; +; [example_item_with_acl] +; acl=example_named_acl1 +; acl=example_named_acl2 +; deny=209.16.236.0 +; +; Then 209.16.236.0 will be rejected by the non-named component of the combined ACL even +; though it passes the two named components. +; +; +; Named ACLs can use ipv6 addresses just like normal ACLs. +;[ipv6_example_1] +;deny = :: +;permit = ::1/128 +; +;[ipv6_example_2] +;permit = fe80::21d:bad:fad:2323 diff --git a/version_1.8.2/pabx/etc/asterisk/adsi.conf b/version_1.8.2/pabx/etc/asterisk/adsi.conf new file mode 100644 index 0000000..0f36f80 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/adsi.conf @@ -0,0 +1,8 @@ +; +; Sample ADSI Configuration file +; +[intro] +alignment = center +greeting => Welcome to the +greeting => Asterisk +greeting => Open Source PBX diff --git a/version_1.8.2/pabx/etc/asterisk/adtranvofr.conf b/version_1.8.2/pabx/etc/asterisk/adtranvofr.conf new file mode 100644 index 0000000..dc7bcfc --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/adtranvofr.conf @@ -0,0 +1,39 @@ +; +; Voice over Frame Relay (Adtran style) +; +; Configuration file + +[interfaces] +; +; Default language +; +;language=en +; +; Lines for which we are the user termination. They accept incoming +; and outgoing calls. We use the default context on the first 8 lines +; used by internal phones. +; +context=default +;user => voice00 +;user => voice01 +;user => voice02 +;user => voice03 +;user => voice04 +;user => voice05 +;user => voice06 +;user => voice07 +; Calls on 16 and 17 come from the outside world, so they get +; a little bit special treatment +context=remote +;user => voice16 +;user => voice17 +; +; Next we have lines which we only accept calls on, and typically +; do not send outgoing calls on (i.e. these are where we are the +; network termination) +; +;network => voice08 +;network => voice09 +;network => voice10 +;network => voice11 +;network => voice12 diff --git a/version_1.8.2/pabx/etc/asterisk/agents.conf b/version_1.8.2/pabx/etc/asterisk/agents.conf new file mode 100644 index 0000000..7a045d3 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/agents.conf @@ -0,0 +1,6 @@ +[general] +#include agents_general.conf +#include agents_general_customizado.conf +#include agents_adicional.conf +#include agents_usuarios.conf +#include agents_usuarios_customizado.conf diff --git a/version_1.8.2/pabx/etc/asterisk/agents_adicional.conf b/version_1.8.2/pabx/etc/asterisk/agents_adicional.conf new file mode 100644 index 0000000..5567d84 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/agents_adicional.conf @@ -0,0 +1,16 @@ +[agents](!) +;maxlogintries=5 +autologoff=0 +;autologoffunavail=no +ackcall=no +;endcall=no +wrapuptime=0 +musiconhold=agentes +;goodbye= +;updatecdr=no +;group=1 +recordagentcalls=no +;recordformat= +;urlprefix= +;savecallsin= +custom_beep=beep diff --git a/version_1.8.2/pabx/etc/asterisk/agents_general.conf b/version_1.8.2/pabx/etc/asterisk/agents_general.conf new file mode 100644 index 0000000..9f668a3 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/agents_general.conf @@ -0,0 +1,2 @@ +;persistentagents=no +;multiplelogin=no diff --git a/version_1.8.2/pabx/etc/asterisk/agents_general_customizado.conf b/version_1.8.2/pabx/etc/asterisk/agents_general_customizado.conf new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/agents_general_customizado.conf @@ -0,0 +1 @@ + diff --git a/version_1.8.2/pabx/etc/asterisk/agents_usuarios.conf b/version_1.8.2/pabx/etc/asterisk/agents_usuarios.conf new file mode 100644 index 0000000..61b3a56 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/agents_usuarios.conf @@ -0,0 +1,4 @@ +[1000](agents) +fullname=admin +[1001](agents) +fullname=administrador diff --git a/version_1.8.2/pabx/etc/asterisk/agents_usuarios_customizado.conf b/version_1.8.2/pabx/etc/asterisk/agents_usuarios_customizado.conf new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/agents_usuarios_customizado.conf @@ -0,0 +1 @@ + diff --git a/version_1.8.2/pabx/etc/asterisk/alarmreceiver.conf b/version_1.8.2/pabx/etc/asterisk/alarmreceiver.conf new file mode 100644 index 0000000..e4815a9 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/alarmreceiver.conf @@ -0,0 +1,91 @@ +; +; alarmreceiver.conf +; +; Sample configuration file for the Asterisk alarm receiver application. +; + + +[general] + +; +; Specify a timestamp format for the metadata section of the event files +; Default is %a %b %d, %Y @ %H:%M:%S %Z + +timestampformat = %a %b %d, %Y @ %H:%M:%S %Z + +; +; Specify a command to execute when the caller hangs up +; +; Default is none +; + +;eventcmd = yourprogram -yourargs ... + +; +; Specify a spool directory for the event files. This setting is required +; if you want the app to be useful. Event files written to the spool +; directory will be of the template event-XXXXXX, where XXXXXX is a random +; and unique alphanumeric string. +; +; Default is none, and the events will be dropped on the floor. +; + +eventspooldir = /tmp + +; +; The alarmreceiver app can either log the events one-at-a-time to individual +; files in the spool directory, or it can store them until the caller +; disconnects and write them all to one file. +; +; The default setting for logindividualevents is no. +; + +logindividualevents = no + +; +; The timeout for receiving the first DTMF digit is adjustable from 1000 msec. +; to 10000 msec. The default is 2000 msec. Note: if you wish to test the +; receiver by entering digits manually, set this to a reasonable time out +; like 10000 milliseconds. + +fdtimeout = 2000 + +; +; The timeout for receiving subsequent DTMF digits is adjustable from +; 110 msec. to 4000 msec. The default is 200 msec. Note: if you wish to test +; the receiver by entering digits manually, set this to a reasonable time out +; like 4000 milliseconds. +; + +sdtimeout = 200 + +; +; Wait for the connection to settle post-answer. Adjustable from 500 msec. to 10000 msec. +; The default is 1250 msec. +; + +answait = 1250 + +; When logging individual events it may be desirable to skip grouping of metadata + +;no_group_meta = yes + +; +; The loudness of the ACK and Kissoff tones is adjustable from 100 to 8192. +; The default is 8192. This shouldn't need to be messed with, but is included +; just in case there are problems with signal levels. +; + +loudness = 8192 + +; +; The db-family setting allows the user to capture statistics on the number of +; calls, and the errors the alarm receiver sees. The default is for no +; db-family name to be defined and the database logging to be turned off. +; + +;db-family = yourfamily: + +; +; End of alarmreceiver.conf +; diff --git a/version_1.8.2/pabx/etc/asterisk/alsa.conf b/version_1.8.2/pabx/etc/asterisk/alsa.conf new file mode 100644 index 0000000..3e61710 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/alsa.conf @@ -0,0 +1,77 @@ +; +; Open Sound System Console Driver Configuration File +; +[general] +; +; Automatically answer incoming calls on the console? Choose yes if +; for example you want to use this as an intercom. +; +autoanswer=yes +; +; Default context (is overridden with @context syntax) +; +context=local +; +; Default extension to call +; +extension=s +; +; Default language +; +;language=en +; +; Default Music on Hold class to use when this channel is placed on hold in +; the case that the music class is not set on the channel with +; Set(CHANNEL(musicclass)=whatever) in the dialplan and the peer channel +; putting this one on hold did not suggest a class to use. +; +;mohinterpret=default +; +; Silence suppression can be enabled when sound is over a certain threshold. +; The value for the threshold should probably be between 500 and 2000 or so, +; but your mileage may vary. Use the echo test to evaluate the best setting. +;silencesuppression = yes +;silencethreshold = 1000 +; +; To set which ALSA device to use, change this parameter +;input_device=hw:0,0 +;output_device=hw:0,0 + +; +; Default mute state (can also be toggled via CLI) +;mute=true + +; +; If enabled, no audio capture device will be opened. This is useful on +; systems where there will be no return audio path, such as overhead pagers. +;noaudiocapture=true + +; ----------------------------- JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an + ; ALSA channel. Defaults to "no". An enabled jitterbuffer will + ; be used only if the sending side can create and the receiving + ; side can not accept jitter. The ALSA channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive ALSA side will always + ; be used if the sending side can create jitter. + +; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. + +; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is + ; resynchronized. Useful to improve the quality of the voice, with + ; big jumps in/broken timestamps, usually sent from exotic devices + ; and programs. Defaults to 1000. + +; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) and "adaptive" (with + ; variable size, actually the new jb of IAX2). Defaults to fixed. + +; jbtargetextra = 40 ; This option only affects the jb when 'jbimpl = adaptive' is set. + ; The option represents the number of milliseconds by which the new + ; jitter buffer will pad its size. the default is 40, so without + ; modification, the new jitter buffer will set its size to the jitter + ; value plus 40 milliseconds. increasing this value may help if your + ; network normally has low jitter, but occasionally has spikes. + +; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". +; ---------------------------------------------------------------------------------- diff --git a/version_1.8.2/pabx/etc/asterisk/amd.conf b/version_1.8.2/pabx/etc/asterisk/amd.conf new file mode 100644 index 0000000..84b391c --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/amd.conf @@ -0,0 +1,31 @@ +; +; Answering Machine Detection Configuration +; + +[general] +total_analysis_time = 5000 ; Maximum time allowed for the algorithm to decide + ; on whether the audio represents a HUMAN, or a MACHINE +silence_threshold = 256 ; If the average level of noise in a sample does not reach + ; this value, from a scale of 0 to 32767, then we will consider + ; it to be silence. + +; Greeting ; +initial_silence = 2500 ; Maximum silence duration before the greeting. + ; If exceeded, then the result is detection as a MACHINE. +after_greeting_silence = 800 ; Silence after detecting a greeting. + ; If exceeded, then the result is detection as a HUMAN +greeting = 1500 ; Maximum length of a greeting. If exceeded, then the + ; result is detection as a MACHINE. + +; Word detection ; +min_word_length = 100 ; Minimum duration of Voice to considered as a word +maximum_word_length = 5000 ; Maximum duration of a single Voice utterance allowed. +between_words_silence = 50 ; Minimum duration of silence after a word to consider + ; the audio what follows as a new word + +maximum_number_of_words = 3 ; Maximum number of words in the greeting + ; If REACHED, then the result is detection as a MACHINE + ; WARNING: Releases prior to January 1 2016 documented + ; maximum_number_of_words as 'if exceeded, then MACHINE', + ; which did not reflect the true functionality. In Asterisk 14, + ; this functionality will change to reflect the variables' name. diff --git a/version_1.8.2/pabx/etc/asterisk/app_mysql.conf b/version_1.8.2/pabx/etc/asterisk/app_mysql.conf new file mode 100644 index 0000000..fafd4f7 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/app_mysql.conf @@ -0,0 +1,24 @@ +; Configuration file for the MYSQL app addon + +[general] +; +; Nullvalue governs how NULL values are returned from the database. In +; previous versions, the special NULL value was returned as the "NULL" +; string. We now provide an option for the behavior, configured globally. +; nullstring - the string "NULL" +; emptystring - the string "" +; null - unset the variable +; +; WARNING: setting nullvalue=null may have undesireable consequences, in +; particular if you use subroutines in AEL or the LOCAL() variable construct. +; You have been warned. Don't complain if you use that setting in combination +; with Gosub or AEL and get buggy behavior. +; +nullvalue = nullstring + +; If set, autoclear will destroy allocated statement and connection resources +; when the channel ends. For most usage of the MYSQL app, this is what you +; want, but it's conceivable that somebody is sharing MYSQL connections across +; multiple channels, in which case, this should be set to 'no'. Defaults to +; 'no', as this was the original behavior. +autoclear=yes diff --git a/version_1.8.2/pabx/etc/asterisk/app_skel.conf b/version_1.8.2/pabx/etc/asterisk/app_skel.conf new file mode 100644 index 0000000..ada8461 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/app_skel.conf @@ -0,0 +1,27 @@ +[general] +games=3 +cheat=no + +[sounds] +prompt=please-enter-your,number,queue-less-than +wrong_guess=vm-pls-try-again +right_guess=auth-thankyou +too_high=high +too_low=low +lose=vm-goodbye + +[easy] +max_number=10 +max_guesses=4 + +[medium] +max_number=100 +max_guesses=6 + +[hard] +max_number=1000 +max_guesses=7 + +[nightmare] +max_number=1000 +max_guesses=1 diff --git a/version_1.8.2/pabx/etc/asterisk/applyzap.conf b/version_1.8.2/pabx/etc/asterisk/applyzap.conf new file mode 100644 index 0000000..e69de29 diff --git a/version_1.8.2/pabx/etc/asterisk/ari.conf b/version_1.8.2/pabx/etc/asterisk/ari.conf new file mode 100644 index 0000000..4cd74a5 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/ari.conf @@ -0,0 +1,30 @@ +[general] +enabled = yes ; When set to no, ARI support is disabled. +;pretty = no ; When set to yes, responses from ARI are +; ; formatted to be human readable. +;allowed_origins = ; Comma separated list of allowed origins, for +; ; Cross-Origin Resource Sharing. May be set to * to +; ; allow all origins. +;auth_realm = ; Realm to use for authentication. Defaults to Asterisk +; ; REST Interface. +; +; Default write timeout to set on websockets. This value may need to be adjusted +; for connections where Asterisk must write a substantial amount of data and the +; receiving clients are slow to process the received information. Value is in +; milliseconds; default is 100 ms. +;websocket_write_timeout = 100 + +;[username] +;type = user ; Specifies user configuration +;read_only = no ; When set to yes, user is only authorized for +; ; read-only requests. +; +;password = ; Crypted or plaintext password (see password_format). +; +; password_format may be set to plain (the default) or crypt. When set to crypt, +; crypt(3) is used to validate the password. A crypted password can be generated +; using mkpasswd -m sha-512. +; +; When set to plain, the password is in plaintext. +; +;password_format = plain diff --git a/version_1.8.2/pabx/etc/asterisk/ast_debug_tools.conf b/version_1.8.2/pabx/etc/asterisk/ast_debug_tools.conf new file mode 100644 index 0000000..f26626b --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/ast_debug_tools.conf @@ -0,0 +1,57 @@ +# +# This file is used by the Asterisk debug tools. +# Unlike other Asterisk config files, this one is +# "sourced" by bash and must adhere to bash semantics. +# + +# A list of coredumps and/or coredump search patterns. +# Bash extended globs are enabled and any resulting files +# that aren't actually coredumps are silently ignored +# so you can be liberal with the globs. +# +# If your patterns contains spaces be sure to only quote +# the portion of the pattern that DOESN'T contain wildcard +# expressions. If you quote the whole pattern, it won't +# be expanded and the glob characters will be treated as +# literals. +# +# The exclusion of files ending ".txt" is just for +# demonstration purposes as non-coredumps will be ignored +# anyway. +COREDUMPS=(/tmp/core[-._]asterisk!(*.txt) /tmp/core[-._]$(hostname)!(*.txt)) + +# Date command for the "running" coredump and tarballs. +# DATEFORMAT will be executed to get the timestamp. +# Don't put quotes around the format string or they'll be +# treated as literal characters. Also be aware of colons +# in the output as you can't upload files with colons in +# the name to Jira. +# +# Unix timestamp +#DATEFORMAT='date +%s.%N' +# +# Unix timestamp on *BSD/MacOS after installing coreutils +#DATEFORMAT='gdate +%s.%N' +# +# Readable GMT +#DATEFORMAT='date -u +%FT%H-%M-%S%z' +# +# Readable Local time +DATEFORMAT='date +%FT%H-%M-%S%z' + +# A list of log files and/or log file search patterns using the +# same syntax as COREDUMPS. +# +LOGFILES=(/var/log/asterisk/messages* /var/log/asterisk/queue* \ + /var/log/asterisk/debug* /var/log/asterisk/security*) + +# ast_loggrabber converts POSIX timestamps to readable format +# using this Python strftime format string. If not specified +# or an empty string, no format covnersion is done. +LOG_DATEFORMAT="%m/%d-%H:%M:%S.%f" + +# The timezone to use when converting POSIX timestamps to +# readable format. It can be specified in "/" +# format or in abbreviation format such as "CST6CDT". If not +# specified, the "local" timezone is used. +# LOG_TIMEZONE= diff --git a/version_1.8.2/pabx/etc/asterisk/asterisk.adsi b/version_1.8.2/pabx/etc/asterisk/asterisk.adsi new file mode 100644 index 0000000..904b33a --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/asterisk.adsi @@ -0,0 +1,158 @@ +; +; Asterisk default ADSI script +; +; +; Begin with the preamble requirements +; +DESCRIPTION "Asterisk PBX" ; Name of vendor +VERSION 0x00 ; Version of stuff +;SECURITY "_AST" ; Security code +SECURITY 0X9BDBF7AC ; Security code +FDN 0x0000000F ; Descriptor number + +; +; Flags +; +FLAG "nocallwaiting" + +; +; Predefined strings +; +DISPLAY "titles" IS "** Asterisk PBX **" +DISPLAY "talkingto" IS "Call active." JUSTIFY LEFT +DISPLAY "callname" IS "$Call1p" JUSTIFY LEFT +DISPLAY "callnum" IS "$Call1s" JUSTIFY LEFT +DISPLAY "incoming" IS "Incoming call!" JUSTIFY LEFT +DISPLAY "ringing" IS "Calling... " JUSTIFY LEFT +DISPLAY "callended" IS "Call ended." JUSTIFY LEFT +DISPLAY "missedcall" IS "Missed call." JUSTIFY LEFT +DISPLAY "busy" IS "Busy." JUSTIFY LEFT +DISPLAY "reorder" IS "Reorder." JUSTIFY LEFT +DISPLAY "cwdisabled" IS "Callwait disabled" +DISPLAY "empty" IS "asdf" + +; +; Begin soft key definitions +; +KEY "callfwd" IS "CallFwd" OR "Call Forward" + OFFHOOK + VOICEMODE + WAITDIALTONE + SENDDTMF "*60" + GOTO "offHook" +ENDKEY + +KEY "vmail_OH" IS "VMail" OR "Voicemail" + OFFHOOK + VOICEMODE + WAITDIALTONE + SENDDTMF "8500" +ENDKEY + +KEY "vmail" IS "VMail" OR "Voicemail" + SENDDTMF "8500" +ENDKEY + +KEY "backspace" IS "BackSpc" OR "Backspace" + BACKSPACE +ENDKEY + +KEY "cwdisable" IS "CWDsble" OR "Disable Call Wait" + SENDDTMF "*70" + SETFLAG "nocallwaiting" + SHOWDISPLAY "cwdisabled" AT 4 + TIMERCLEAR + TIMERSTART 1 +ENDKEY + +KEY "cidblock" IS "CIDBlk" OR "Block Callerid" + SENDDTMF "*67" + SETFLAG "nocallwaiting" +ENDKEY + +; +; Begin main subroutine +; + +SUB "main" IS + IFEVENT NEARANSWER THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "talkingto" AT 2 NOUPDATE + SHOWDISPLAY "callname" AT 3 + SHOWDISPLAY "callnum" AT 4 + GOTO "stableCall" + ENDIF + IFEVENT OFFHOOK THEN + CLEAR + CLEARFLAG "nocallwaiting" + CLEARDISPLAY + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "vmail" + SHOWKEYS "cidblock" + SHOWKEYS "cwdisable" UNLESS "nocallwaiting" + GOTO "offHook" + ENDIF + IFEVENT IDLE THEN + CLEAR + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "vmail_OH" + ENDIF + IFEVENT CALLERID THEN + CLEAR +; SHOWDISPLAY "titles" AT 1 NOUPDATE +; SHOWDISPLAY "incoming" AT 2 NOUPDATE + SHOWDISPLAY "callname" AT 3 NOUPDATE + SHOWDISPLAY "callnum" AT 4 + ENDIF + IFEVENT RING THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "incoming" AT 2 + ENDIF + IFEVENT ENDOFRING THEN + SHOWDISPLAY "missedcall" AT 2 + CLEAR + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "vmail_OH" + ENDIF + IFEVENT TIMER THEN + CLEAR + SHOWDISPLAY "empty" AT 4 + ENDIF +ENDSUB + +SUB "offHook" IS + IFEVENT FARRING THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "ringing" AT 2 NOUPDATE + SHOWDISPLAY "callname" at 3 NOUPDATE + SHOWDISPLAY "callnum" at 4 + ENDIF + IFEVENT FARANSWER THEN + CLEAR + SHOWDISPLAY "talkingto" AT 2 + GOTO "stableCall" + ENDIF + IFEVENT BUSY THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "busy" AT 2 NOUPDATE + SHOWDISPLAY "callname" at 3 NOUPDATE + SHOWDISPLAY "callnum" at 4 + ENDIF + IFEVENT REORDER THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "reorder" AT 2 NOUPDATE + SHOWDISPLAY "callname" at 3 NOUPDATE + SHOWDISPLAY "callnum" at 4 + ENDIF +ENDSUB + +SUB "stableCall" IS + IFEVENT REORDER THEN + SHOWDISPLAY "callended" AT 2 + ENDIF +ENDSUB diff --git a/version_1.8.2/pabx/etc/asterisk/asterisk.conf b/version_1.8.2/pabx/etc/asterisk/asterisk.conf new file mode 100644 index 0000000..cc94ac0 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/asterisk.conf @@ -0,0 +1,114 @@ +[directories](!) +astetcdir => /etc/asterisk +astmoddir => /usr/lib/asterisk/modules +astvarlibdir => /var/lib/asterisk +astdbdir => /var/lib/asterisk +astkeydir => /var/lib/asterisk +astdatadir => /var/lib/asterisk +astagidir => /var/lib/asterisk/agi-bin +astspooldir => /var/spool/asterisk +astrundir => /var/run/asterisk +astlogdir => /var/log/asterisk +astsbindir => /usr/sbin + +[options] +verbose = 45 +;debug = 3 +;alwaysfork = yes ; Same as -F at startup. +;nofork = yes ; Same as -f at startup. +;quiet = yes ; Same as -q at startup. +;timestamp = yes ; Same as -T at startup. +;execincludes = yes ; Support #exec in config files. +;console = yes ; Run as console (same as -c at startup). +;highpriority = yes ; Run realtime priority (same as -p at + ; startup). +;initcrypto = yes ; Initialize crypto keys (same as -i at + ; startup). +nocolor = yes ; Disable console colors. +;dontwarn = yes ; Disable some warnings. +;dumpcore = yes ; Dump core on crash (same as -g at startup). +;languageprefix = yes ; Use the new sound prefix path syntax. +;systemname = my_system_name ; Prefix uniqueid with a system name for + ; Global uniqueness issues. +;autosystemname = yes ; Automatically set systemname to hostname, + ; uses 'localhost' on failure, or systemname if + ; set. +;mindtmfduration = 80 ; Set minimum DTMF duration in ms (default 80 ms) + ; If we get shorter DTMF messages, these will be + ; changed to the minimum duration +;maxcalls = 10 ; Maximum amount of calls allowed. +;maxload = 0.9 ; Asterisk stops accepting new calls if the + ; load average exceed this limit. +;maxfiles = 1000 ; Maximum amount of openfiles. +;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if + ; the amount of free memory falls below this + ; watermark. +;cache_record_files = yes ; Cache recorded sound files to another + ; directory during recording. +;record_cache_dir = /tmp ; Specify cache directory (used in conjunction + ; with cache_record_files). +;transmit_silence = yes ; Transmit silence while a channel is in a + ; waiting state, a recording only state, or + ; when DTMF is being generated. Note that the + ; silence internally is generated in raw signed + ; linear format. This means that it must be + ; transcoded into the native format of the + ; channel before it can be sent to the device. + ; It is for this reason that this is optional, + ; as it may result in requiring a temporary + ; codec translation path for a channel that may + ; not otherwise require one. +;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of + ; directly. +runuser = pbx ; The user to run as. +rungroup = pbx ; The group to run as. +;lightbackground = yes ; If your terminal is set for a light-colored + ; background. +;forceblackbackground = yes ; Force the background of the terminal to be + ; black, in order for terminal colors to show + ; up properly. +;defaultlanguage = en ; Default language +documentation_language = en_US ; Set the language you want documentation + ; displayed in. Value is in the same format as + ; locale names. +;hideconnect = yes ; Hide messages displayed when a remote console + ; connects and disconnects. +;lockconfdir = no ; Protect the directory containing the + ; configuration files (/etc/asterisk) with a + ; lock. +;stdexten = gosub ; How to invoke the extensions.conf stdexten. + ; macro - Invoke the stdexten using a macro as + ; done by legacy Asterisk versions. + ; gosub - Invoke the stdexten using a gosub as + ; documented in extensions.conf.sample. + ; Default gosub. +;live_dangerously = no ; Enable the execution of 'dangerous' dialplan + ; functions from external sources (AMI, + ; etc.) These functions (such as SHELL) are + ; considered dangerous because they can allow + ; privilege escalation. + ; Default no +;entityid=00:11:22:33:44:55 ; Entity ID. + ; This is in the form of a MAC address. + ; It should be universally unique. + ; It must be unique between servers communicating + ; with a protocol that uses this value. + ; This is currently is used by DUNDi and + ; Exchanging Device and Mailbox State + ; using protocols: XMPP, Corosync and PJSIP. +;rtp_pt_dynamic = 96 ; Normally the Dynamic RTP Payload Type numbers + ; are 96-127, which allow 32 formats. When you + ; use more and receive the message "No Dynamic + ; RTP mapping available", extend the dynamic + ; range by going for 35 (or 0) instead of 96. + ; This allows 29 (or 64) more formats. 96 is the + ; default because any number below might be + ; rejected by a remote implementation; although + ; no such broken implementation is known, yet. + +; Changing the following lines may compromise your security. +;[files] +;astctlpermissions = 0660 +;astctlowner = root +;astctlgroup = apache +;astctl = asterisk.ctl diff --git a/version_1.8.2/pabx/etc/asterisk/calendar.conf b/version_1.8.2/pabx/etc/asterisk/calendar.conf new file mode 100644 index 0000000..8c73361 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/calendar.conf @@ -0,0 +1,109 @@ +;[calendar1] +;type = ical ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://example.com/home/jdoe/Calendar/ ; URL to shared calendar (Zimbra example) +;user = jdoe ; web username +;secret = supersecret ; web password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +; The following fields are available from the ${CALENDAR_EVENT()} dialplan function: +; +; summary : The VEVENT Summary property or Exchange subject +; description : The text description of the vent +; organizer : The organizer of the event +; location : The location field of the event +; calendar : The name of the calendar tied to the event +; uid : The unique ID for this event +; start : Start time of the event +; end : The end time of the event +; busystate : 0=FREE, 1=TENTATIVE, 2=BUSY +; +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/60001 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 123 ; Extension to connect to on answer +; +; or +; +;app = Playback ; Application to execute on answer (instead of context/extension) +;appdata = tt-weasels ; Data part of application to execute on answer +; +;waittime = 30 ; How long to wait for an answer, defaults to 30 seconds +; +; Channel variables can be set on the notification channel. The format is +; setvar=name=value. Variable subsitution is done on the value to allow the use of dialplan +; functions like CALENDAR_EVENT. The variables are set in order, so one can use the value +; of earlier variables in the definition of later ones. +; +;setvar = CALLERID(name)=${CALENDAR_EVENT(summary)} + +;[calendar2] +; Note: Support for Exchange Server 2003 +; +;type = exchange ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://example.com/exchange/jdoe ; URL to MS Exchange OWA for user (usually includes exchange/user) +;user = jdoe ; Exchange username +;secret = mysecret ; Exchange password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/1234 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 1234 ; Extension to connect to on answer +; +; or +; +;[calendar3] +; Note: Support for Exchange Server 2007+ +; +;type = ews ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://example.com/ews/Exchange.asmx ; URL to MS Exchange EWS +;user = jdoe ; Exchange username +;secret = mysecret ; Exchange password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/1234 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 1234 ; Extension to connect to on answer +; +; or +; +;app = Playback ; Application to execute on answer (instead of context/extension) +;appdata = tt-weasels ; Data part of application to execute on answer +; +;waittime = 30 ; How long to wait for an answer, defaults to 30 seconds + +;[calendar4] +;type = caldav ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://www.google.com/calendar/dav/username@gmail.com/events/ ; Main GMail calendar (the trailing slash is significant!) +;user = jdoe@gmail.com ; username +;secret = mysecret ; password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/1234 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 1234 ; Extension to connect to on answer +; +; or +; +;app = Playback ; Application to execute on answer (instead of context/extension) +;appdata = tt-weasels ; Data part of application to execute on answer +; +;waittime = 30 ; How long to wait for an answer, defaults to 30 seconds diff --git a/version_1.8.2/pabx/etc/asterisk/ccss.conf b/version_1.8.2/pabx/etc/asterisk/ccss.conf new file mode 100644 index 0000000..7b3fe7d --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/ccss.conf @@ -0,0 +1,205 @@ +; +; --- Call Completion Supplementary Services --- +; +; For more information about CCSS, see the CCSS user documentation +; https://wiki.asterisk.org/wiki/display/AST/Call+Completion+Supplementary+Services+(CCSS) +; + +[general] +; The cc_max_requests option is a global limit on the number of +; CC requests that may be in the Asterisk system at any time. +; +;cc_max_requests = 20 +; +; The cc_STATE_devstate variables listed below can be used to change the +; default mapping of the internal state machine tracking the state of +; call completion to an Asterisk Device State value. The acceptable values +; that can be provided are as follows, with a description of what the +; equivalent device BLF that this maps to: +; +; UNKNOWN ; Device is valid but channel didn't know state +; NOT_INUSE ; Device is not used +; INUSE ; Device is in use +; BUSY ; Device is busy +; INVALID ; Device is invalid +; UNAVAILABLE ; Device is unavailable +; RINGING ; Device is ringing +; RINGINUSE ; Device is ringing *and* in use +; ONHOLD ; Device is on hold +; +; These states are used to generate DEVICE_STATE information that can be +; included with Asterisk hints for phones to subscribe to the state information +; or dialplan to check the state using the EXTENSION_STATE() function or +; the DEVICE_STATE() function. +; +; The states are in the format of: "ccss:TECH/ID" so an example of device +; SIP/3000 making a CallCompletionRequest() could be checked by looking at +; DEVICE_STATE(ccss:SIP/3000) or an Asterisk Hint could be generated such as +; +; [hint-context] +; exten => *843000,hint,ccss:SIP/3000 +; +; and then accessed with EXTENSION_STATE(*843000@hint-context) +; or subscribed to with a BLF button on a phone. +; +; The available state mapping and default values are: +; +; cc_available_devstate = NOT_INUSE +; cc_offered_devstate = NOT_INUSE +; cc_caller_requested_devstate = NOT_INUSE +; cc_active_devstate = INUSE +; cc_callee_ready_devstate = INUSE +; cc_caller_busy_devstate = ONHOLD +; cc_recalling_devstate = RINGING +; cc_complete_devstate = NOT_INUSE +; cc_failed_devstate = NOT_INUSE + +; +;============================================ +; PLEASE READ THIS!!! +; The options described below should NOT be +; set in this file. Rather, they should be +; set per-device in a channel driver +; configuration file. +; PLEASE READ THIS!!! +;=========================================== +; +; -------------------------------------------------------------------- +; Timers +; -------------------------------------------------------------------- +;There are three configurable timers for all types of CC: the +;cc_offer_timer, the ccbs_available_timer, and the ccnr_available_timer. +;In addition, when using a generic agent, there is a fourth timer, +;the cc_recall_timer. All timers are configured in seconds, and the +;values shown below are the defaults. +; +;When a caller is offered CCBS or CCNR, the cc_offer_timer will +;be started. If the caller does not request CC before the +;cc_offer_timer expires, then the caller will be unable to request +;CC for this call. +; +;cc_offer_timer = 20 +; +;Once a caller has requested CC, then either the ccbs_available_timer +;or the ccnr_available_timer will run, depending on the service +;requested. The reason why there are two separate timers for CCBS +;and CCNR is that it is reasonable to want to have a shorter timeout +;configured for CCBS than for CCNR. If the available timer expires +;before the called party becomes available, then the CC attempt +;will have failed and monitoring of the called party will stop. +; +;ccbs_available_timer = 4800 +;ccnr_available_timer = 7200 +; +; When using a generic agent, the original caller is called back +; when one of the original called parties becomes available. The +; cc_recall_timer tells Asterisk how long it should let the original +; caller's phone ring before giving up. Please note that this parameter +; only affects operation when using a generic agent. +; +;cc_recall_timer = 20 +; -------------------------------------------------------------------- +; Policies +; -------------------------------------------------------------------- +; Policy settings tell Asterisk how to behave and what sort of +; resources to allocate in order to facilitate CC. There are two +; settings to control the actions Asterisk will take. +; +; The cc_agent_policy describes the behavior that Asterisk will +; take when communicating with the caller during CC. There are +; three possible options. +; +;never: Never offer CC to the caller. Setting the cc_agent_policy +; to this value is the way to disable CC for a call. +; +;generic: A generic CC agent is one which uses no protocol-specific +; mechanisms to offer CC to the caller. Instead, the caller +; requests CC using a dialplan function. Due to internal +; restrictions, you should only use a generic CC agent on +; phones (i.e. not "trunks"). If you are using phones which +; do not support a protocol-specific method of using CC, then +; generic CC agents are what you should use. +; +;native: A native CC agent is one which uses protocol-specific +; signaling to offer CC to the caller and accept CC requests +; from the caller. The supported protocols for native CC +; agents are SIP, ISDN ETSI PTP, ISDN ETSI PTMP, and Q.SIG +;cc_agent_policy=never +; +; The cc_monitor_policy describes the behavior that Asterisk will +; take when communicating with the called party during CC. There +; are four possible options. +; +;never: Analogous to the cc_agent_policy setting. We will never +; attempt to request CC services on this interface. +; +;generic: Analogous to the cc_agent_policy setting. We will monitor +; the called party's progress using protocol-agnostic +; capabilities. Like with generic CC agents, generic CC +; monitors should only be used for phones. +; +;native: Analogous to the cc_agent_policy setting. We will use +; protocol-specific methods to request CC from this interface +; and to monitor the interface for availability. +; +;always: If an interface is set to "always," then we will accept +; protocol-specific CC offers from the caller and use +; a native CC monitor for the remainder of the CC transaction. +; However, if the interface does not offer protocol-specific +; CC, then we will fall back to using a generic CC monitor +; instead. This is a good setting to use for phones for which +; you do not know if they support protocol-specific CC +; methodologies. +;cc_monitor_policy=never +; +; +; -------------------------------------------------------------------- +; Limits +; -------------------------------------------------------------------- +; +; The use of CC requires Asterisk to potentially use more memory than +; some administrators would like. As such, it is a good idea to limit +; the number of CC requests that can be in the system at a given time. +; The values shown below are the defaults. +; +; The cc_max_agents setting limits the number of outstanding CC +; requests a caller may have at any given time. Please note that due +; to implementation restrictions, this setting is ignored when using +; generic CC agents. Generic CC agents may only have one outstanding +; CC request. +; +;cc_max_agents = 5 +; +; The cc_max_monitors setting limits the number of outstanding CC +; requests can be made to a specific interface at a given time. +; +;cc_max_monitors = 5 +; +; -------------------------------------------------------------------- +; Other +; -------------------------------------------------------------------- +; +; When using a generic CC agent, the caller who requested CC will be +; called back when a called party becomes available. When the caller +; answers his phone, the administrator may opt to have a macro run. +; What this macro does is up to the administrator. By default there +; is no callback macro configured. +; +;cc_callback_macro= +; +; Alternatively, the administrator may run a subroutine. By default +; there is no callback subroutine configured. The subroutine should +; be specified in the format: [[context,]exten,]priority +; +;cc_callback_sub= +; +; When using an ISDN phone and a generic CC agent, Asterisk is unable +; to determine the dialstring that should be used when calling back +; the original caller. Furthermore, if you desire to use any dialstring- +; specific options, such as distinctive ring, you must set this +; configuration option. For non-ISDN phones, it is not necessary to +; set this, since Asterisk can determine the dialstring to use since +; it is identical to the name of the calling device. By default, there +; is no cc_agent_dialstring set. +; +;cc_agent_dialstring= diff --git a/version_1.8.2/pabx/etc/asterisk/cdr.conf b/version_1.8.2/pabx/etc/asterisk/cdr.conf new file mode 100644 index 0000000..cb3f24c --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr.conf @@ -0,0 +1,167 @@ +; +; Asterisk Call Detail Record engine configuration +; +; CDR is Call Detail Record, which provides logging services via a variety of +; pluggable backend modules. Detailed call information can be recorded to +; databases, files, etc. Useful for billing, fraud prevention, compliance with +; Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more. +; + +[general] + +; Define whether or not to use CDR logging. Setting this to "no" will override +; any loading of backend CDR modules. Default is "yes". +;enable=yes + +; Define whether or not to log unanswered calls that don't involve an outgoing +; party. Setting this to "yes" will make calls to extensions that don't answer +; and don't set a B side channel (such as by using the Dial application) +; receive CDR log entries. If this option is set to "no", then those log +; entries will not be created. Unanswered Calls which get offered to an +; outgoing line will always receive log entries regardless of this option, and +; that is the intended behaviour. +;unanswered = no +unanswered = yes + +; Define whether or not to log congested calls. Setting this to "yes" will +; report each call that fails to complete due to congestion conditions. Default +; is "no". +;congestion = no + +; Normally, CDR's are not closed out until after all extensions are finished +; executing. By enabling this option, the CDR will be ended before executing +; the "h" extension and hangup handlers so that CDR values such as "end" and +; "billsec" may be retrieved inside of of this extension. +; The default value is "no". +;endbeforehexten=no + +; Normally, the 'billsec' field logged to the backends (text files or databases) +; is simply the end time (hangup time) minus the answer time in seconds. Internally, +; asterisk stores the time in terms of microseconds and seconds. By setting +; initiatedseconds to 'yes', you can force asterisk to report any seconds +; that were initiated (a sort of round up method). Technically, this is +; when the microsecond part of the end time is greater than the microsecond +; part of the answer time, then the billsec time is incremented one second. +; The default value is "no". +;initiatedseconds=no + +; Define the CDR batch mode, where instead of posting the CDR at the end of +; every call, the data will be stored in a buffer to help alleviate load on the +; asterisk server. Default is "no". +; +; WARNING WARNING WARNING +; Use of batch mode may result in data loss after unsafe asterisk termination +; ie. software crash, power failure, kill -9, etc. +; WARNING WARNING WARNING +; +;batch=no + +; Define the maximum number of CDRs to accumulate in the buffer before posting +; them to the backend engines. 'batch' must be set to 'yes'. Default is 100. +;size=100 + +; Define the maximum time to accumulate CDRs in the buffer before posting them +; to the backend engines. If this time limit is reached, then it will post the +; records, regardless of the value defined for 'size'. 'batch' must be set to +; 'yes'. Note that time is in seconds. Default is 300 (5 minutes). +;time=300 + +; The CDR engine uses the internal asterisk scheduler to determine when to post +; records. Posting can either occur inside the scheduler thread, or a new +; thread can be spawned for the submission of every batch. For small batches, +; it might be acceptable to just use the scheduler thread, so set this to "yes". +; For large batches, say anything over size=10, a new thread is recommended, so +; set this to "no". Default is "no". +;scheduleronly=no + +; When shutting down asterisk, you can block until the CDRs are submitted. If +; you don't, then data will likely be lost. You can always check the size of +; the CDR batch buffer with the CLI "cdr status" command. To enable blocking on +; submission of CDR data during asterisk shutdown, set this to "yes". Default +; is "yes". +;safeshutdown=yes + +; +; +; CHOOSING A CDR "BACKEND" (what kind of output to generate) +; +; To choose a backend, you have to make sure either the right category is +; defined in this file, or that the appropriate config file exists, and has the +; proper definitions in it. If there are any problems, usually, the entry will +; silently ignored, and you get no output. +; +; Also, please note that you can generate CDR records in as many formats as you +; wish. If you configure 5 different CDR formats, then each event will be logged +; in 5 different places! In the example config files, all formats are commented +; out except for the cdr-csv format. +; +; Here are all the possible back ends: +; +; csv, custom, manager, odbc, pgsql, radius, sqlite, tds +; (also, mysql is available via the asterisk-addons, due to licensing +; requirements) +; (please note, also, that other backends can be created, by creating +; a new backend module in the source cdr/ directory!) +; +; Some of the modules required to provide these backends will not build or install +; unless some dependency requirements are met. Examples of this are pgsql, odbc, +; etc. If you are not getting output as you would expect, the first thing to do +; is to run the command "make menuselect", and check what modules are available, +; by looking in the "2. Call Detail Recording" option in the main menu. If your +; backend is marked with XXX, you know that the "configure" command could not find +; the required libraries for that option. +; +; To get CDRs to be logged to the plain-jane /var/log/asterisk/cdr-csv/Master.csv +; file, define the [csv] category in this file. No database necessary. The example +; config files are set up to provide this kind of output by default. +; +; To get custom csv CDR records, make sure the cdr_custom.conf file +; is present, and contains the proper [mappings] section. The advantage to +; using this backend, is that you can define which fields to output, and in +; what order. By default, the example configs are set up to mimic the cdr-csv +; output. If you don't make any changes to the mappings, you are basically generating +; the same thing as cdr-csv, but expending more CPU cycles to do so! +; +; To get manager events generated, make sure the cdr_manager.conf file exists, +; and the [general] section is defined, with the single variable 'enabled = yes'. +; +; For odbc, make sure all the proper libs are installed, that "make menuselect" +; shows that the modules are available, and the cdr_odbc.conf file exists, and +; has a [global] section with the proper variables defined. +; +; For pgsql, make sure all the proper libs are installed, that "make menuselect" +; shows that the modules are available, and the cdr_pgsql.conf file exists, and +; has a [global] section with the proper variables defined. +; +; For logging to radius databases, make sure all the proper libs are installed, that +; "make menuselect" shows that the modules are available, and the [radius] +; category is defined in this file, and in that section, make sure the 'radiuscfg' +; variable is properly pointing to an existing radiusclient.conf file. +; +; For logging to sqlite databases, make sure the 'cdr.db' file exists in the log directory, +; which is usually /var/log/asterisk. Of course, the proper libraries should be available +; during the 'configure' operation. +; +; For tds logging, make sure the proper libraries are available during the 'configure' +; phase, and that cdr_tds.conf exists and is properly set up with a [global] category. +; +; Also, remember, that if you wish to log CDR info to a database, you will have to define +; a specific table in that databse to make things work! See the doc directory for more details +; on how to create this table in each database. +; + +[csv] +usegmtime=yes ; log date/time in GMT. Default is "no" +loguniqueid=yes ; log uniqueid. Default is "no" +loguserfield=yes ; log user field. Default is "no" +accountlogs=yes ; create separate log file for each account code. Default is "yes" +newcdrcolumns=yes ; Enable logging of post-1.8 CDR columns (peeraccount, linkedid, sequence). + ; Default is "no". + +;[radius] +;usegmtime=yes ; log date/time in GMT +;loguniqueid=yes ; log uniqueid +;loguserfield=yes ; log user field +; Set this to the location of the radiusclient-ng configuration file +; The default is /etc/radiusclient-ng/radiusclient.conf +;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_adaptive_odbc.conf b/version_1.8.2/pabx/etc/asterisk/cdr_adaptive_odbc.conf new file mode 100644 index 0000000..2daa983 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_adaptive_odbc.conf @@ -0,0 +1,59 @@ +; The point of this module is to allow you log whatever you like in terms of +; the CDR variables. Do you want to log uniqueid? Then simply ensure that +; your table has that column. If you don't want the column, ensure that it +; does not exist in the table structure. If you'd like to call uniqueid +; something else in your table, simply provide an alias in the configuration +; file that maps the standard CDR field name (uniqueid) to whatever column +; name you like. Perhaps you'd like some extra CDR values logged that aren't +; in the standard repertoire of CDR variables (some that come to mind are +; certain values used for LCR: route, per_minute_cost, and per_minute_price). +; Simply set those CDR variables in your dialplan, i.e. Set(CDR(route)=27), +; ensure that a corresponding column exists in your table, and cdr_adaptive_odbc +; will do the rest. +; +; This configuration defines the connections and tables for which CDRs may +; be populated. Each context specifies a different CDR table to be used. +; +; The columns in the tables should match up word-for-word (case-insensitive) +; to the CDR variables set in the dialplan. The natural advantage to this +; system is that beyond setting up the configuration file to tell you what +; tables to look at, there isn't anything more to do beyond creating the +; columns for the fields that you want, and populating the corresponding +; CDR variables in the dialplan. For the builtin variables only, you may +; create aliases for the real column name. +; +; Please note that after adding columns to the database, it is necessary to +; reload this module to get the new column names and types read. +; +; Warning: if you specify two contexts with exactly the same connection and +; table names, you will get duplicate records in that table. So be careful. +; + +;[first] +;connection=mysql1 +;table=cdr + +;[second] +;connection=mysql1 +;table=extracdr + +;[third] +;connection=sqlserver +;table=AsteriskCDR +;schema=public ; for databases which support schemas +;usegmtime=yes ; defaults to no +;alias src => source +;alias channel => source_channel +;alias dst => dest +;alias dstchannel => dest_channel +; +; Any filter specified MUST match exactly or the CDR will be discarded +;filter accountcode => somename +;filter src => 123 +; Negative filters are also now available +;filter src != 456 +; +; Additionally, we now support setting static values per column. The reason +; for this is to allow different sections to specify different values for +; a certain named column, presumably separated by filters. +;static "Some Special Value" => identifier_code diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_custom.conf b/version_1.8.2/pabx/etc/asterisk/cdr_custom.conf new file mode 100644 index 0000000..a7bf0f6 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_custom.conf @@ -0,0 +1,16 @@ +; +; Mappings for custom config file +; +; To get your CSV output in a format tailored to your liking, uncomment the +; following lines and look for the output in the cdr-custom directory (usually +; in /var/log/asterisk). Depending on which mapping you uncomment, you may see +; Master.csv, Simple.csv, or both. +; +[mappings] +Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)},${CSV_QUOTE(${CDR(direcao)})},${CSV_QUOTE(${CDR(ramal_origem)})},${CSV_QUOTE(${CDR(fora_horario)})} + + +; +; High Resolution Time for billsec and duration fields +;Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration,f)})},${CSV_QUOTE(${CDR(billsec,f)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)} +;Simple.csv => ${CSV_QUOTE(${EPOCH})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})} diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_manager.conf b/version_1.8.2/pabx/etc/asterisk/cdr_manager.conf new file mode 100644 index 0000000..b95038c --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_manager.conf @@ -0,0 +1,6 @@ +; +; Asterisk Call Management CDR +; +[general] +enabled = yes + diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_mysql.conf b/version_1.8.2/pabx/etc/asterisk/cdr_mysql.conf new file mode 100644 index 0000000..a1f7d38 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_mysql.conf @@ -0,0 +1,62 @@ +; +; Note - if the database server is hosted on the same machine as the +; asterisk server, you can achieve a local Unix socket connection by +; setting hostname=localhost +; +; port and sock are both optional parameters. If hostname is specified +; and is not "localhost" (you can use address 127.0.0.1 instead), then +; cdr_mysql will attempt to connect to the port specified or use the +; default port. If hostname is not specified or if hostname is +; "localhost", then cdr_mysql will attempt to connect to the socket file +; specified by sock or otherwise use the default socket file. +; +;[global] +;hostname=database.host.name +;dbname=asteriskcdrdb +;table=cdr +;password=password +;user=asteriskcdruser +;port=3306 +;sock=/tmp/mysql.sock +; By default CDRs are logged in the system's time zone +;cdrzone=UTC ; log CDRs with UTC +;usegmtime=yes ;log date/time in GMT. Default is "no" +;cdrzone=America/New_York ; or use a specific time zone +; +; If your system's locale differs from mysql database character set, +; cdr_mysql can damage non-latin characters in CDR variables. Use this +; option to protect your data. +;charset=koi8r +; +; Older versions of cdr_mysql set the calldate field to whenever the +; record was posted, rather than the start date of the call. This flag +; reverts to the old (incorrect) behavior. Note that you'll also need +; to comment out the "start=calldate" alias, below, to use this. +;compat=no +; +; ssl connections (optional) +;ssl_ca= +;ssl_cert= +;ssl_key= +; +; You may also configure the field names used in the CDR table. +; +[columns] +;static "" => +;alias => +alias start => calldate +;alias clid => +;alias src => +;alias dst => +;alias dcontext => +;alias channel => +;alias dstchannel => +;alias lastapp => +;alias lastdata => +;alias duration => +;alias billsec => +;alias disposition => +;alias amaflags => +;alias accountcode => +;alias userfield => +;alias uniqueid => diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_odbc.conf b/version_1.8.2/pabx/etc/asterisk/cdr_odbc.conf new file mode 100644 index 0000000..663ce09 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_odbc.conf @@ -0,0 +1,12 @@ +; +; cdr_odbc.conf +; + +;[global] +;dsn=MySQL-test +;loguniqueid=yes +;dispositionstring=yes +;table=cdr ;"cdr" is default table name +;usegmtime=no ; set to "yes" to log in GMT +;hrtime=yes ;Enables microsecond accuracy with the billsec and duration fields +;newcdrcolumns=yes ; Enable logging of post-1.8 CDR columns (peeraccount, linkedid, sequence) diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_pgsql.conf b/version_1.8.2/pabx/etc/asterisk/cdr_pgsql.conf new file mode 100644 index 0000000..11f4df7 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_pgsql.conf @@ -0,0 +1,8 @@ +[global] +hostname=postgres +port=5432 +dbname=pbx +password=ctepgSQL +user=contacte +table=ast_bilhetes +encoding=LATIN1 diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_sqlite3_custom.conf b/version_1.8.2/pabx/etc/asterisk/cdr_sqlite3_custom.conf new file mode 100644 index 0000000..0d5dc09 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_sqlite3_custom.conf @@ -0,0 +1,10 @@ +; +; Mappings for custom config file +; +[master] ; currently, only file "master.db" is supported, with only one table at a time. +;table => cdr +;columns => calldate, clid, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield, test +;values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}','${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration)}','${CDR(billsec)}','${CDR(disposition)}','${CDR(amaflags)}','${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}','${CDR(test)}' + +;Enable High Resolution Times for billsec and duration fields +;values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}','${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration,f)}','${CDR(billsec,f)}','${CDR(disposition)}','${CDR(amaflags)}','${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}','${CDR(test)}' diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_syslog.conf b/version_1.8.2/pabx/etc/asterisk/cdr_syslog.conf new file mode 100644 index 0000000..3a619be --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_syslog.conf @@ -0,0 +1,83 @@ +; +; Asterisk Call Detail Records (CDR) - Syslog Backend +; + +; The cdr_syslog module writes CDRs using the facilities provided by syslog. +; +; Not only must you configure cdr_syslog from this file (cdr_syslog.conf) but +; you will also need to make changes to your /etc/syslog.conf before CDRs will +; be written to syslog. +; +; As an example, you can add the following to /etc/syslog.conf: +; +; local4.info /var/log/asterisk-cdr.log +; +; And then instruct syslogd to re-read the configuration file by sending it a +; HUP signal. On Linux this can be done like this: +; +; kill -HUP `cat /var/run/syslogd.pid` +; +; Finally, you will need to uncomment the [cdr-simple] section below, and restart +; Asterisk. When calls are placed, you should start seeing records appear in +; /var/log/asterisk-cdr.log. + +[general] +; Facility +; +; The 'facility' keyword specifies the syslog facility to use when writing out +; CDRs. +; +; Accepted values: One of the following: +; user, local0, local1, local2, local3, local4, local5, local6 +; and local7. +; +; Note: Depending on your platform, the following may also be +; available: +; auth, authpriv, cron, daemon, ftp, kern, lpr, mail, +; news, syslog, and uucp. +; +; Default value: local4 + +;facility=local0 + +; Priority +; +; Use the 'priority' keyword to select which of the syslog priority levels to +; use when logging CDRs. +; +; Accepted values: One of the following: +; alert, crit, debug, emerg, err, info, notice, warning +; Default value: info + +;priority=warn + +; Note: The settings for 'facility' and 'priority' in the [general] section +; define the default values for all of the logging locations created +; below in separate sections. + +;[cdr-master] +;facility = local5 +;priority = debug + +; Template +; +; The 'template' value allows you to specify a custom format for messages +; written to syslog. This is similar to how cdr_custom is configured. +; +; Allowed values: A diaplan style string. +; Default value: None, this is required field. +; +; Note: Because of the way substitution is done, the only meaningful values +; available when the record is logged are those available via the CDR() +; dialplan function. All other channel variables will be unavailable. + +;template = "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}" + +; High Resolution Time for billsec and duration fields +;template = "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration,f)}","${CDR(billsec,f)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}" +;[cdr-simple] + +; Since we don't specify a facility or priority for this logging location, the +; records will use the defaults specified in the [general] section. + +;template = "We received a call from ${CDR(src)}" diff --git a/version_1.8.2/pabx/etc/asterisk/cdr_tds.conf b/version_1.8.2/pabx/etc/asterisk/cdr_tds.conf new file mode 100644 index 0000000..f3a9d7c --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cdr_tds.conf @@ -0,0 +1,77 @@ +; +; Asterisk Call Detail Records (CDR) - FreeTDS Backend +; + +;[global] + +; Connection +; +; Use the 'connection' keyword to specify one of the instance names from your +; 'freetds.conf' file. Note that 'freetds.conf' is not an Asterisk +; configuration file, but one specific to the FreeTDS library. See the FreeTDS +; documentation on 'freetds.conf' for more information: +; +; http://www.freetds.org/userguide/freetdsconf.htm +; +; Accepted values: One of the connections specified in freetds.conf + +;connection=ConnectionFromFreeTDSConf + +; Database Name +; +; The 'dbname' keyword specifies the database name to use when logging CDRs. +; +; Accepted values: Any valid database name + +;dbname=AsteriskCDRs + +; Database Table Name +; +; The 'table' keyword identifies which database table is used to log CDRs. +; +; Accepted value: Any valid table name +; Default value: If not specified, a table named 'cdr' is assumed + +;table=cdr + +; Credentials +; +; The 'username' and 'password' keywords specify the user credentials that +; Asterisk should use when connecting to the database. +; +; Accepted value: Any valid username and password + +;username=mangUsr +;password= + +; Language +; +; The 'language' keyword changes the language which are used for error and +; information messages returned by SQL Server. Each database and user has their +; own default value, and this default can be overriden here. +; +; Accepted value: Any language installed on the target SQL Server. +; Default value: us_english + +;language=us_english + +; Character Set +; +; The 'charset' setting is used to change the character set used when connecting +; to the database server. Each database and database user has their own +; character set setting, and this default can be overriden here. +; +; Accepted value: Any valid character set available on the target SQL server. +; Default value: iso_1 + +;charset=BIG5 + +; High Resolution Times +; +; The 'hrtime' setting is used to store high resolution (sub second) times for +; billsec and duration fields. +; +; Accepted value: true or false +; Default value: false + +;hrtime=false diff --git a/version_1.8.2/pabx/etc/asterisk/cel.conf b/version_1.8.2/pabx/etc/asterisk/cel.conf new file mode 100644 index 0000000..344a8d7 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cel.conf @@ -0,0 +1,116 @@ +; +; Asterisk Channel Event Logging (CEL) +; + +; Channel Event Logging is a mechanism to provide fine-grained event information +; that can be used to generate billing information. Such event information can +; be recorded to various backend modules. +; + +[general] + +; CEL Activation +; +; Use the 'enable' keyword to turn CEL on or off. +; +; Accepted values: yes and no +; Default value: no + +enable=no + +; Application Tracking +; +; Use the 'apps' keyword to specify the list of applications for which you want +; to receive CEL events. This is a comma separated list of Asterisk dialplan +; applications, such as Dial, Queue, and Park. +; +; Accepted values: A comma separated list of Asterisk dialplan applications +; Default value: none +; +; Note: You may also use 'all' which will result in CEL events being reported +; for all Asterisk applications. This may affect Asterisk's performance +; significantly. + +apps=dial,park + +; Event Tracking +; +; Use the 'events' keyword to specify the list of events which you want to be +; raised when they occur. This is a comma separated list of the values in the +; table below. +; +; Accepted values: A comma separated list of one or more of the following: +; ALL -- Generate entries on all events +; CHAN_START -- The time a channel was created +; CHAN_END -- The time a channel was terminated +; ANSWER -- The time a channel was answered (ie, phone taken off-hook) +; HANGUP -- The time at which a hangup occurred +; BRIDGE_ENTER -- The time a channel was connected into a conference room +; BRIDGE_EXIT -- The time a channel was removed from a conference room +; APP_START -- The time a tracked application was started +; APP_END -- the time a tracked application ended +; PARK_START -- The time a call was parked +; PARK_END -- Unpark event +; BLINDTRANSFER -- When a blind transfer is initiated +; ATTENDEDTRANSFER -- When an attended transfer is initiated +; PICKUP -- This channel picked up the specified channel +; FORWARD -- This channel is being forwarded somewhere else +; LINKEDID_END -- The last channel with the given linkedid is retired +; USER_DEFINED -- Triggered from the dialplan, and has a name given by the +; user +; LOCAL_OPTIMIZE -- A local channel pair is optimizing away. +; +; Default value: none +; (Track no events) + +events=APP_START,CHAN_START,CHAN_END,ANSWER,HANGUP,BRIDGE_ENTER,BRIDGE_EXIT + +; Date Format +; +; Use the 'dateformat' keyword to specify the date format used when CEL events +; are raised. +; +; Accepted values: A strftime format string (see man strftime) +; +; Example: "%F %T" +; -> This gives the date and time in the format "2009-06-23 17:02:35" +; +; If this option is not specified, the default format is "." +; since epoch. The microseconds field will always be 6 digits in length, meaning it +; may have leading zeros. +; +;dateformat = %F %T + +; +; Asterisk Manager Interface (AMI) CEL Backend +; +[manager] + +; AMI Backend Activation +; +; Use the 'enable' keyword to turn CEL logging to the Asterisk Manager Interface +; on or off. +; +; Accepted values: yes and no +; Default value: no +;enabled=yes + +; Use 'show_user_defined' to put "USER_DEFINED" in the EventName header, +; instead of (by default) just putting the user defined event name there. +; When enabled the UserDefType header is added for user defined events to +; provide the user defined event name. +; +;show_user_defined=yes + +; +; RADIUS CEL Backend +; +[radius] +; +; Log date/time in GMT +;usegmtime=yes +; +; Set this to the location of the radiusclient-ng configuration file +; The default is /etc/radiusclient-ng/radiusclient.conf +;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf +; diff --git a/version_1.8.2/pabx/etc/asterisk/cel_custom.conf b/version_1.8.2/pabx/etc/asterisk/cel_custom.conf new file mode 100644 index 0000000..8ac9e29 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cel_custom.conf @@ -0,0 +1,39 @@ +; +; Asterisk Channel Event Logging (CEL) - Custom CSV Backend +; + +; This is the configuration file for the customizable CSV backend for CEL +; logging. +; +; In order to create custom CSV logs for CEL, uncomment the template below +; (Master.csv) and start Asterisk. Once CEL events are generated, a file will +; appear in the following location: +; +; /var/log/asterisk/cel-custom/Master.csv +; +; (Note that /var/log/asterisk is the default and may differ on your system) +; +; You can also create more than one template if desired. All logs will appear +; in the cel-custom directory under your Asterisk logs directory. +; + +; +; Within a mapping, use the CALLERID() and CHANNEL() functions to retrieve +; details from the CEL event. There are also a few variables created by this +; module that can be used in a mapping: +; +; eventtype - The name of the CEL event. +; eventtime - The timestamp of the CEL event. +; eventenum - Like eventtype but is "USER_DEFINED" for a user defined event. +; userdeftype - User defined event type name from CELGenUserEvent(). +; eventextra - Extra data included with this CEL event, typically along with +; an event of type USER_DEFINED from CELGenUserEvent(). +; BRIDGEPEER - Bridged peer channel name at the time of the CEL event. +; CHANNEL(peer) could also be used. +; +;[mappings] +;Master.csv => ${CSV_QUOTE(${eventtype})},${CSV_QUOTE(${eventtime})},${CSV_QUOTE(${CALLERID(name)})},${CSV_QUOTE(${CALLERID(num)})},${CSV_QUOTE(${CALLERID(ANI)})},${CSV_QUOTE(${CALLERID(RDNIS)})},${CSV_QUOTE(${CALLERID(DNID)})},${CSV_QUOTE(${CHANNEL(exten)})},${CSV_QUOTE(${CHANNEL(context)})},${CSV_QUOTE(${CHANNEL(channame)})},${CSV_QUOTE(${CHANNEL(appname)})},${CSV_QUOTE(${CHANNEL(appdata)})},${CSV_QUOTE(${CHANNEL(amaflags)})},${CSV_QUOTE(${CHANNEL(accountcode)})},${CSV_QUOTE(${CHANNEL(uniqueid)})},${CSV_QUOTE(${CHANNEL(linkedid)})},${CSV_QUOTE(${BRIDGEPEER})},${CSV_QUOTE(${CHANNEL(userfield)})},${CSV_QUOTE(${userdeftype})},${CSV_QUOTE(${eventextra})} + + +[mappings] +Master.csv => ${CSV_QUOTE(${eventtype})},${CSV_QUOTE(${eventtime})},${CSV_QUOTE(${CALLERID(name)})},${CSV_QUOTE(${CALLERID(num)})},${CSV_QUOTE(${CALLERID(ANI)})},${CSV_QUOTE(${CALLERID(RDNIS)})},${CSV_QUOTE(${CALLERID(DNID)})},${CSV_QUOTE(${CHANNEL(exten)})},${CSV_QUOTE(${CHANNEL(context)})},${CSV_QUOTE(${CHANNEL(channame)})},${CSV_QUOTE(${CHANNEL(appname)})},${CSV_QUOTE(${CHANNEL(appdata)})},${CSV_QUOTE(${CHANNEL(amaflags)})},${CSV_QUOTE(${CHANNEL(accountcode)})},${CSV_QUOTE(${CHANNEL(uniqueid)})},${CSV_QUOTE(${CHANNEL(linkedid)})},${CSV_QUOTE(${BRIDGEPEER})},${CSV_QUOTE(${CHANNEL(userfield)})},${CSV_QUOTE(${userdeftype})},${CSV_QUOTE(${eventextra})} diff --git a/version_1.8.2/pabx/etc/asterisk/cel_odbc.conf b/version_1.8.2/pabx/etc/asterisk/cel_odbc.conf new file mode 100644 index 0000000..0c0b83f --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cel_odbc.conf @@ -0,0 +1,108 @@ +; +; Asterisk Channel Event Logging (CEL) - Adaptive ODBC Backend +; + +; General module options category. +[general] +; Use 'show_user_defined' to put "USER_DEFINED" in the eventtype field, +; instead of (by default) just putting the user defined event name there. +; +;show_user_defined=yes + +; This configuration defines the connections and tables for which CEL records +; may be populated. Each context specifies a different CEL table to be used. +; +; The columns in the tables should match up word-for-word (case-insensitive) to +; the CEL variables set in the dialplan. The natural advantage to this system +; is that beyond setting up the configuration file to tell you what tables to +; look at, there isn't anything more to do beyond creating the columns for the +; fields that you want, and populating the corresponding CEL variables in the +; dialplan. +; +; Please note that after adding columns to the database, it is necessary to +; reload this module to get the new column names and types read. +; +; Warning: if you specify two contexts with exactly the same connection and +; table names, you will get duplicate records in that table. So be careful. +; +; CEL FIELDS: +; eventtype +; CHANNEL_START = 1 +; CHANNEL_END = 2 +; HANGUP = 3 +; ANSWER = 4 +; APP_START = 5 +; APP_END = 6 +; BRIDGE_START = 7 +; BRIDGE_END = 8 +; CONF_START = 9 +; CONF_END = 10 +; PARK_START = 11 +; PARK_END = 12 +; BLINDTRANSFER = 13 +; ATTENDEDTRANSFER = 14 +; TRANSFER = 15 +; HOOKFLASH = 16 +; 3WAY_START = 17 +; 3WAY_END = 18 +; CONF_ENTER = 19 +; CONF_EXIT = 20 +; USER_DEFINED = 21 +; LINKEDID_END = 22 +; BRIDGE_UPDATE = 23 +; PICKUP = 24 +; FORWARD = 25 +; eventtime (timeval, includes microseconds) +; userdeftype (set only if eventtype == USER_DEFINED) +; cid_name +; cid_num +; cid_ani +; cid_rdnis +; cid_dnid +; exten +; context +; channame +; appname +; appdata +; accountcode +; peeraccount +; uniqueid +; linkedid +; amaflags (an int) +; userfield +; peer +; extra + +; The point of this module is to allow you log whatever you like in terms of the +; CEL variables. Do you want to log uniqueid? Then simply ensure that your +; table has that column. If you don't want the column, ensure that it does not +; exist in the table structure. If you'd like to call uniqueid something else +; in your table, simply provide an alias in this file that maps the standard CEL +; field name (uniqueid) to whatever column name you like. + +;[first] +;connection=mysql1 +;table=cel + +;[second] +;connection=mysql1 +;table=extracel + +;[third] +;connection=sqlserver +;table=AsteriskCEL +;usegmtime=yes ; defaults to no +;allowleapsecond=no ; allow leap second in SQL column for eventtime, default yes. +;alias src => source +;alias channel => source_channel +;alias dst => dest +;alias dstchannel => dest_channel + +; Any filter specified MUST match exactly or the event will be discarded +;filter accountcode => somename +;filter src => 123 + +; Additionally, we now support setting static values per column. Reason +; for this is to allow different sections to specify different values for +; a certain named column, presumably separated by filters. +;static "Some Special Value" => identifier_code diff --git a/version_1.8.2/pabx/etc/asterisk/cel_pgsql.conf b/version_1.8.2/pabx/etc/asterisk/cel_pgsql.conf new file mode 100644 index 0000000..42de1a1 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cel_pgsql.conf @@ -0,0 +1,93 @@ +; +; Asterisk Channel Event Logging (CEL) - PostgreSQL Backend +; + +; Sample Asterisk config file for CEL logging to PostgreSQL +; +; CEL field names: +; +; eventtype +; CHANNEL_START = 1 +; CHANNEL_END = 2 +; HANGUP = 3 +; ANSWER = 4 +; APP_START = 5 +; APP_END = 6 +; BRIDGE_START = 7 +; BRIDGE_END = 8 +; CONF_START = 9 +; CONF_END = 10 +; PARK_START = 11 +; PARK_END = 12 +; BLINDTRANSFER = 13 +; ATTENDEDTRANSFER = 14 +; TRANSFER = 15 +; HOOKFLASH = 16 +; 3WAY_START = 17 +; 3WAY_END = 18 +; CONF_ENTER = 19 +; CONF_EXIT = 20 +; USER_DEFINED = 21 +; LINKEDID_END = 22 +; BRIDGE_UPDATE = 23 +; PICKUP = 24 +; FORWARD = 25 +; eventtime (timeval, includes microseconds) +; userdeftype (set only if eventtype == USER_DEFINED) +; cid_name +; cid_num +; cid_ani +; cid_rdnis +; cid_dnid +; exten +; context +; channame +; appname +; appdata +; accountcode +; peeraccount +; uniqueid +; linkedid +; amaflags (an int) +; userfield +; peer +; extra + +;CREATE TABLE pbx_cel ( +; id bigserial , +; eventtype varchar (32) NOT NULL , +; eventtime timestamp NOT NULL , +; userdeftype varchar(256) NOT NULL , +; cid_name varchar (128) NOT NULL , +; cid_num varchar (128) NOT NULL , +; cid_ani varchar (128) NOT NULL , +; cid_rdnis varchar (128) NOT NULL , +; cid_dnid varchar (128) NOT NULL , +; exten varchar (128) NOT NULL , +; context varchar (128) NOT NULL , +; channame varchar (128) NOT NULL , +; appname varchar (128) NOT NULL , +; appdata varchar (128) NOT NULL , +; amaflags int NOT NULL , +; accountcode varchar (32) NOT NULL , +; peeraccount varchar (32) NOT NULL , +; uniqueid varchar (160) NOT NULL , +; linkedid varchar (160) NOT NULL , +; userfield varchar (256) NOT NULL , +; peer varchar (128) NOT NULL +;); + + +[global] +; Use 'show_user_defined' to put "USER_DEFINED" in the eventtype field, +; instead of (by default) just putting the user defined event name there. +; +;show_user_defined=yes + +hostname=127.0.0.1 +port=5432 +dbname=pbx +password=ctepgSQL +user=contacte +table=pbx_cel ;SQL table where CEL's will be inserted +;appname=asterisk ; Postgres application_name support (optional). Whitespace not allowed. \ No newline at end of file diff --git a/version_1.8.2/pabx/etc/asterisk/cel_sqlite3_custom.conf b/version_1.8.2/pabx/etc/asterisk/cel_sqlite3_custom.conf new file mode 100644 index 0000000..2d9a24f --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cel_sqlite3_custom.conf @@ -0,0 +1,24 @@ +; +; Asterisk Channel Event Logging (CEL) - SQLite 3 Backend +; + +; +; Mappings for sqlite3 config file +; +; Within a mapping, use the CALLERID() and CHANNEL() functions to retrieve +; details from the CEL event. There are also a few variables created by this +; module that can be used in a mapping: +; +; eventtype - The name of the CEL event. +; eventtime - The timestamp of the CEL event. +; eventenum - Like eventtype but is "USER_DEFINED" for a user defined event. +; userdeftype - User defined event type name from CELGenUserEvent(). +; eventextra - Extra data included with this CEL event, typically along with +; an event of type USER_DEFINED from CELGenUserEvent(). +; BRIDGEPEER - Bridged peer channel name at the time of the CEL event. +; CHANNEL(peer) could also be used. +; +;[master] ; currently, only file "master.db" is supported, with only one table at a time. +;table => cel +;columns => eventtype, eventtime, cidname, cidnum, cidani, cidrdnis, ciddnid, context, exten, channame, appname, appdata, amaflags, accountcode, uniqueid, userfield, peer, userdeftype, eventextra +;values => '${eventtype}','${eventtime}','${CALLERID(name)}','${CALLERID(num)}','${CALLERID(ANI)}','${CALLERID(RDNIS)}','${CALLERID(DNID)}','${CHANNEL(context)}','${CHANNEL(exten)}','${CHANNEL(channame)}','${CHANNEL(appname)}','${CHANNEL(appdata)}','${CHANNEL(amaflags)}','${CHANNEL(accountcode)}','${CHANNEL(uniqueid)}','${CHANNEL(userfield)}','${BRIDGEPEER}','${userdeftype}','${eventextra}' diff --git a/version_1.8.2/pabx/etc/asterisk/cel_tds.conf b/version_1.8.2/pabx/etc/asterisk/cel_tds.conf new file mode 100644 index 0000000..399093b --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cel_tds.conf @@ -0,0 +1,69 @@ +; +; Asterisk Channel Event Logging (CEL) - FreeTDS Backend +; + +;[global] + +; Connection +; +; Use the 'connection' keyword to specify one of the instance names from your +; 'freetds.conf' file. Note that 'freetds.conf' is not an Asterisk +; configuration file, but one specific to the FreeTDS library. See the FreeTDS +; documentation on 'freetds.conf' for more information: +; +; http://www.freetds.org/userguide/freetdsconf.htm +; +; Accepted values: One of the connections specified in freetds.conf + +;connection=ConnectionFromFreeTDSConf + +; Database Name +; +; The 'dbname' keyword specifies the database name to use when logging CEL +; records. +; +; Accepted values: Any valid database name + +;dbname=MalicoHN + +; Database Table Name +; +; The 'table' keyword identifies which database table is used to log CEL +; records. +; +; Accepted value: Any valid table name +; Default value: If not specified, a table named 'cel' is assumed + +;table=cel + +; Credentials +; +; The 'username' and 'password' keywords specify the user credentials that +; Asterisk should use when connecting to the database. +; +; Accepted value: Any valid username and password + +;username=mangUsr +;password= + +; Language +; +; The 'language' keyword changes the language which are used for error and +; information messages returned by SQL Server. Each database and user has their +; own default value, and this default can be overriden here. +; +; Accepted value: Any language installed on the target SQL Server. +; Default value: Server default + +;language=us_english + +; Character Set +; +; The 'charset' setting is used to change the character set used when connecting +; to the database server. Each database and database user has their own +; character set setting, and this default can be overriden here. +; +; Accepted value: Any valid character set available on the target server. +; Default value: Server setting + +;charset=BIG5 diff --git a/version_1.8.2/pabx/etc/asterisk/chan_dahdi.conf b/version_1.8.2/pabx/etc/asterisk/chan_dahdi.conf new file mode 100644 index 0000000..3362fd6 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/chan_dahdi.conf @@ -0,0 +1,7 @@ +[trunkgroups] + +[channels] +#include chan_dahdi_troncos.conf +#include chan_dahdi_troncos_general.conf +#include chan_dahdi_ramais_general.conf +#include chan_dahdi_ramais.conf diff --git a/version_1.8.2/pabx/etc/asterisk/chan_dahdi_ramais.conf b/version_1.8.2/pabx/etc/asterisk/chan_dahdi_ramais.conf new file mode 100644 index 0000000..e69de29 diff --git a/version_1.8.2/pabx/etc/asterisk/chan_dahdi_ramais_general.conf b/version_1.8.2/pabx/etc/asterisk/chan_dahdi_ramais_general.conf new file mode 100644 index 0000000..d89d75f --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/chan_dahdi_ramais_general.conf @@ -0,0 +1,21 @@ +;Config. Portas FXS +language=pt_br +usecallerid=yes +callwaiting=no +usecallingpres=yes +callwaitingcallerid=yes +threewaycalling=yes +transfer=yes +canpark=yes +cancallforward=yes +callreturn=yes +;rxgain=3 +;txgain=-7 +rxgain=0 +txgain=-6 +echocancel=128 +echocancelwhenbridged=yes +echotraining=yes +relaxdtmf=yes +rxflash=600 +group=10 diff --git a/version_1.8.2/pabx/etc/asterisk/chan_dahdi_troncos.conf b/version_1.8.2/pabx/etc/asterisk/chan_dahdi_troncos.conf new file mode 100644 index 0000000..e69de29 diff --git a/version_1.8.2/pabx/etc/asterisk/chan_dahdi_troncos_general.conf b/version_1.8.2/pabx/etc/asterisk/chan_dahdi_troncos_general.conf new file mode 100644 index 0000000..7fb2dda --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/chan_dahdi_troncos_general.conf @@ -0,0 +1,15 @@ +language=pt_br +usecallerid=yes +callwaiting=no +usecallingpres=yes +callwaitingcallerid=yes +;rxgain=1 +;txgain=-7 +;rxgain=4 +;txgain=4 +;echocancel=128 +;echocancelwhenbridged=yes +;echotraining=yes +;busydetect=yes +;busycount=4 +relaxdtmf=yes \ No newline at end of file diff --git a/version_1.8.2/pabx/etc/asterisk/chan_mobile.conf b/version_1.8.2/pabx/etc/asterisk/chan_mobile.conf new file mode 100644 index 0000000..3814337 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/chan_mobile.conf @@ -0,0 +1,69 @@ +; +; chan_mobile.conf +; configuration file for chan_mobile +; + +[general] +interval=30 ; Number of seconds between trying to connect to devices. + +; The following is a list of adapters we use. +; id must be unique and address is the bdaddr of the adapter from hciconfig. +; Each adapter may only have one device (headset or phone) connected at a time. +; Add an [adapter] entry for each adapter you have. + +[adapter] +id=blue +address=00:09:DD:60:01:A3 +;forcemaster=yes ; attempt to force adapter into master mode. default is no. +;alignmentdetection=yes ; enable this if you sometimes get 'white noise' on asterisk side of the call + ; its a bug in the bluetooth adapter firmware, enabling this will compensate for it. + ; default is no. + +[adapter] +id=dlink +address=00:80:C8:35:52:78 + +; The following is a list of the devices we deal with. +; Every device listed below will be available for calls in and out of Asterisk. +; Each device needs an adapter=xxxx entry which determines which bluetooth adapter is used. +; Use the CLI command 'mobile search' to discover devices. +; Use the CLI command 'mobile show devices' to see device status. +; +; To place a call out through a mobile phone use Dial(Mobile/[device]/NNN.....) or Dial(Mobile/gn/NNN......) in your dialplan. +; To call a headset use Dial(Mobile/[device]). + +[LGTU550] +address=00:E0:91:7F:46:44 ; the address of the phone +port=4 ; the rfcomm port number (from mobile search) +context=incoming-mobile ; dialplan context for incoming calls +adapter=dlink ; adapter to use +group=1 ; this phone is in channel group 1 +;sms=no ; support SMS, defaults to yes +;nocallsetup=yes ; set this only if your phone reports that it supports call progress notification, but does not do it. Motorola L6 for example. + +[blackberry] +address=00:60:57:32:7E:B2 +port=2 +context=incoming-mobile +adapter=dlink +group=1 +;blackberry=yes ; set this if you are using a blackberry device + +[6310i] +address=00:60:57:32:7E:B1 +port=13 +context=incoming-mobile +adapter=dlink +group=1 ; this phone is in channel group 1 also. + +[headset] +address=00:0B:9E:11:AE:C6 +port=1 +type=headset ; This is a headset, not a Phone ! +adapter=blue + +[headset1] +address=00:0B:9E:11:74:A5 +port=1 +type=headset +adapter=dlink diff --git a/version_1.8.2/pabx/etc/asterisk/cli.conf b/version_1.8.2/pabx/etc/asterisk/cli.conf new file mode 100644 index 0000000..0ddd92c --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cli.conf @@ -0,0 +1,12 @@ +; +; Asterisk CLI configuration +; + +[startup_commands] +; +; Any commands listed in this section will get automatically executed +; when Asterisk starts as a daemon or foreground process (-c). +; +;sip set debug on = yes +;core set verbose 3 = yes +;core set debug 1 = yes diff --git a/version_1.8.2/pabx/etc/asterisk/cli_aliases.conf b/version_1.8.2/pabx/etc/asterisk/cli_aliases.conf new file mode 100644 index 0000000..adaed90 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cli_aliases.conf @@ -0,0 +1,203 @@ +; +; CLI Aliases configuration +; +; This module also registers a "cli show aliases" CLI command to list +; configured CLI aliases. + +[general] +; Here you define what alias templates you want to use. You can also define +; multiple templates to use as well. If you do, and there is a conflict, then +; the first alias defined will win. +; +template = friendly ; By default, include friendly aliases +;template = asterisk_1dot2 ; Asterisk 1.2 style syntax +;template = asterisk_1dot4 ; Asterisk 1.4 style syntax +;template = individual_custom ; see [individual_custom] example below which + ; includes a list of aliases from an external + ; file + + +; Because the Asterisk CLI syntax follows a "module verb argument" syntax, +; sometimes we run into an issue between being consistant with this format +; in the core system, and maintaining system friendliness. In order to get +; around this we're providing some useful aliases by default. +; +[friendly] +hangup request=channel request hangup +originate=channel originate +help=core show help +pri intense debug span=pri set debug intense span +reload=module reload +pjsip reload=module reload res_pjsip.so res_pjsip_authenticator_digest.so res_pjsip_endpoint_identifier_ip.so res_pjsip_mwi.so res_pjsip_notify.so res_pjsip_outbound_publish.so res_pjsip_publish_asterisk.so res_pjsip_outbound_registration.so + +; CLI Alias Templates +; ------------------- +; +; You can define several alias templates. +; It works with context templates like all other configuration files +; +;[asterisk](!) +; To create an alias you simply set the variable name as the alias and variable +; value as the real CLI command you want executed +; +;die die die=stop now + +;[asterisk_1dot6](asterisk) +; Alias for making voicemail reload actually do module reload app_voicemail.so +;voicemail reload=module reload app_voicemail.so +; This will make the CLI command "mr" behave as though it is "module reload". +;mr=module reload +; +; +; In addition, you could also include a flat file of aliases which is loaded by +; the [individual_custom] template in the [general] section. +; +;[individual_custom] +;#include "/etc/asterisk/aliases" + +; Implemented CLI Alias Templates +; ------------------------------- +; +; Below here we have provided you with some templates, easily allowing you to +; utilize previous Asterisk CLI commands with any version of Asterisk. In this +; way you will be able to use Asterisk 1.2 and 1.4 style CLI syntax with any +; version Asterisk going forward into the future. +; +; We have also separated out the vanilla syntax into a context template which +; allows you to keep your custom changes separate of the standard templates +; we have provided you. In this way you can clearly see your custom changes, +; and also allowing you to combine various templates as you see fit. +; +; The naming scheme we have used is recommended, but certainly is not enforced +; by Asterisk. If you wish to use the provided templates, simply define the +; context name which does not utilize the '_tpl' at the end. For example, +; if you would like to use the Asterisk 1.2 style syntax, define in the +; [general] section + +[asterisk_1dot2_tpl](!) +show channeltypes=core show channeltypes +show channeltype=core show channeltype +show manager command=manager show command +show manager commands=manager show commands +show manager connected=manager show connected +show manager eventq=manager show eventq +rtp no debug=rtp set debug off +rtp rtcp debug ip=rtcp debug ip +rtp rtcp debug=rtcp debug +rtp rtcp no debug=rtcp debug off +rtp rtcp stats=rtcp stats +rtp rtcp no stats=rtcp stats off +stun no debug=stun debug off +udptl no debug=udptl debug off +show image formats=core show image formats +show file formats=core show file formats +show applications=core show applications +show functions=core show functions +show switches=core show switches +show hints=core show hints +show globals=core show globals +show function=core show function +show application=core show application +set global=core set global +show dialplan=dialplan show +show codecs=core show codecs +show audio codecs=core show audio codecs +show video codecs=core show video codecs +show image codecs=core show image codecs +show codec=core show codec +moh classes show=moh show classes +moh files show=moh show files +agi no debug=agi debug off +show agi=agi show +dump agihtml=agi dumphtml +show features=feature show +show indications=indication show +answer=console answer +hangup=console hangup +flash=console flash +dial=console dial +mute=console mute +unmute=console unmute +transfer=console transfer +send text=console send text +autoanswer=console autoanswer +oss boost=console boost +console=console active +save dialplan=dialplan save +add extension=dialplan add extension +remove extension=dialplan remove extension +add ignorepat=dialplan add ignorepat +remove ignorepat=dialplan remove ignorepat +include context=dialplan add include +dont include=dialplan remove include +extensions reload=dialplan reload +show translation=core show translation +convert=file convert +show queue=queue show +add queue member=queue add member +remove queue member=queue remove member +ael no debug=ael nodebug +sip debug=sip set debug +sip no debug=sip set debug off +show voicemail users=voicemail show users +show voicemail zones=voicemail show zones +iax2 trunk debug=iax2 set debug trunk +iax2 jb debug=iax2 set debug jb +iax2 no debug=iax2 set debug off +iax2 no trunk debug=iax2 set debug trunk off +iax2 no jb debug=iax2 set debug jb off +show agents=agent show +show agents online=agent show online +show memory allocations=memory show allocations +show memory summary=memory show summary +show version=core show version +show version files=core show file version +show profile=core show profile +clear profile=core clear profile +soft hangup=channel request hangup + +[asterisk_1dot2](asterisk_1dot2_tpl) +; add any additional custom commands you want below here, for example: +;die quickly=stop now + +[asterisk_1dot4_tpl](!) +cdr status=cdr show status +rtp debug=rtp set debug on +rtcp debug=rtcp set debug on +rtcp stats=rtcp set stats on +stun debug=stun set debug on +udptl debug=udptl set debug on +core show globals=dialplan show globals +core set global=dialplan set global +core set chanvar=dialplan set chanvar +agi dumphtml=agi dump html +ael debug=ael set debug +funcdevstate list=devstate list +sip history=sip set history on +skinny debug=skinny set debug on +mgcp set debug=mgcp set debug on +abort shutdown=core abort shutdown +stop now=core stop now +stop gracefully=core stop gracefully +stop when convenient=core stop when convenient +restart now=core restart now +restart gracefully=core restart gracefully +restart when convenient=core restart when convenient +soft hangup=channel request hangup + +[asterisk_1dot4](asterisk_1dot4_tpl) +; add any additional custom commands you want below here. + +[asterisk_11_tpl](!) +jabber list nodes=xmpp list nodes +jabber purge nodes=xmpp purge nodes +jabber delete node=xmpp delete node +jabber create collection=xmpp create collection +jabber create leaf=xmpp create leaf +jabber set debug=xmpp set debug +jabber show connections=xmpp show connections +jabber show buddies=xmpp show buddies +features reload=module reload features + +[asterisk_11](asterisk_11_tpl) +; add any additional custom commands you want below here. diff --git a/version_1.8.2/pabx/etc/asterisk/cli_permissions.conf b/version_1.8.2/pabx/etc/asterisk/cli_permissions.conf new file mode 100644 index 0000000..4a6973f --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/cli_permissions.conf @@ -0,0 +1,82 @@ +; +; CLI permissions configuration example for Asterisk +; +; All the users that you want to connect with asterisk using +; rasterisk, should have write/read access to the +; asterisk socket (asterisk.ctl). You could change the permissions +; of this file in 'asterisk.conf' config parameter: 'astctlpermissions' (0666) +; found on the [files] section. +; +; general options: +; +; default_perm = permit | deny +; This is the default permissions to apply for a user that +; does not has a permissions definided. +; +; user options: +; permit = | all ; allow the user to run 'command' | +; ; allow the user to run 'all' the commands +; deny = | all ; disallow the user to run 'command' | +; ; disallow the user to run 'all' commands. +; + +[general] + +default_perm=permit ; To leave asterisk working as normal + ; we should set this parameter to 'permit' +; +; Follows the per-users permissions configs. +; +; This list is read in the sequence that is being written, so +; In this example the user 'eliel' is allow to run only the following +; commands: +; sip show peer +; core set debug +; core set verbose +; If the user is not specified, the default_perm option will be apply to +; every command. +; +; Notice that you can also use regular expressions to allow or deny access to a +; certain command like: 'core show application D*'. In this example the user will be +; allowed to view the documentation for all the applications starting with 'D'. +; Another regular expression could be: 'channel originate SIP/[0-9]* extension *' +; allowing the user to use 'channel originate' on a sip channel and with the 'extension' +; parameter and avoiding the use of the 'application' parameter. +; +; We can also use the templates syntax: +; [supportTemplate](!) +; deny=all +; permit=sip show ; all commands starting with 'sip show' will be allowed +; permit=core show +; +; You can specify permissions for a local group instead of a user, +; just put a '@' and we will know that is a group. +; IMPORTANT NOTE: Users permissions overwrite group permissions. +; +;[@adm] +;deny=all +;permit=sip +;permit=core +; +; +;[eliel] +;deny=all +;permit=sip show peer +;deny=sip show peers +;permit=core set +; +; +;User 'tommy' inherits from template 'supportTemplate': +; deny=all +; permit=sip show +; permit=core show +;[tommy](supportTemplate) +;permit=core set debug +;permit=dialplan show +; +; +;[mark] +;deny=all +;permit=all +; +; diff --git a/version_1.8.2/pabx/etc/asterisk/codecs.conf b/version_1.8.2/pabx/etc/asterisk/codecs.conf new file mode 100644 index 0000000..e1dbd79 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/codecs.conf @@ -0,0 +1,206 @@ +[speex] +; CBR encoding quality [0..10] +; used only when vbr = false +quality => 3 + +; codec complexity [0..10] +; tradeoff between cpu/quality +complexity => 2 + +; perceptual enhancement [true / false] +; improves clarity of decoded speech +enhancement => true + +; voice activity detection [true / false] +; reduces bitrate when no voice detected, used only for CBR +; (implicit in VBR/ABR) +vad => true + +; variable bit rate [true / false] +; uses bit rate proportionate to voice complexity +vbr => true + +; available bit rate [bps, 0 = off] +; encoding quality modulated to match this target bit rate +; not recommended with dtx or pp_vad - may cause bandwidth spikes +abr => 0 + +; VBR encoding quality [0-10] +; floating-point values allowed +vbr_quality => 4 + +; discontinuous transmission [true / false] +; stops transmitting completely when silence is detected +; pp_vad is far more effective but more CPU intensive +dtx => false + +; preprocessor configuration +; these options only affect Speex v1.1.8 or newer + +; enable preprocessor [true / false] +; allows dsp functionality below but incurs CPU overhead +preprocess => false + +; preproc voice activity detection [true / false] +; more advanced equivalent of DTX, based on voice frequencies +pp_vad => false + +; preproc automatic gain control [true / false] +pp_agc => false +pp_agc_level => 8000 + +; preproc denoiser [true / false] +pp_denoise => false + +; preproc dereverb [true / false] +pp_dereverb => false +pp_dereverb_decay => 0.4 +pp_dereverb_level => 0.3 + + +[plc] +; for all codecs which do not support native PLC +; this determines whether to perform generic PLC +; there is a minor performance penalty for this +genericplc => true + +; Generate custom formats for formats requiring attributes. +; After defining the custom format, the name used in defining +; the format can be used throughout Asterisk in the format 'allow' +; and 'disallow' options. +; +; Example: silk8 is a predefined custom format in this config file. +; Once this config file is loaded, silk8 can be used anywhere a +; peer's codec capabilities are defined. +; +; In sip.conf 'silk8' can be defined as a capability for a peer. +; [peer1] +; type=peer +; host=dynamic +; disallow=all +; allow=silk8 ;custom codec defined in codecs.conf +; +; LIMITATIONS +; Custom formats can only be defined at startup. Any changes to this +; file made after startup will not take into effect until after Asterisk +; is restarted. +; + +; Default Custom SILK format definitions, only one custom SILK format per +; sample rate is allowed. +[silk8] +type=silk +samprate=8000 +fec=true ; turn on or off encoding with forward error correction. + ; On recommended, off by default. +packetloss_percentage=10 ; Estimated packet loss percentage in uplink direction. This + ; affects how much redundancy is built in when using fec. + ; The higher the percentage, the larger amount of bandwidth is + ; used. Default is 0%, 10% is recommended when fec is in use. + +maxbitrate=10000 ; Use the table below to make sure a useful bitrate is choosen + ; for maxbitrate. If not set or value is not within the bounds + ; of the encoder, a default value is chosen. + ; + ; sample rate | bitrate range + ; 8khz | 5000 - 20000 bps + ; 12khz | 7000 - 25000 bps + ; 16khz | 8000 - 30000 bps + ; 24khz | 20000- 40000 bps + ; +;dtx=true ; Encode using discontinuous transmission mode or not. Turning this + ; on will save bandwidth during periods of silence at the cost of + ; increased computational complexity. Off by default. + +[silk12] +type=silk +samprate=12000 +maxbitrate=12000 +fec=true +packetloss_percentage=10; + +[silk16] +type=silk +samprate=16000 +maxbitrate=20000 +fec=true +packetloss_percentage=10; + +[silk24] +type=silk +samprate=24000 +maxbitrate=30000 +fec=true +packetloss_percentage=10; + + +; Default custom CELT codec definitions. Only one custom CELT definition is allowed +; per a sample rate. +;[celt44] +;type=celt +;samprate=44100 ; The samplerate in hz. This option is required. +;framesize=480 ; The framesize option represents the duration of each frame in samples. + ; This must be a factor of 2. This option is only advertised in an SDP + ; when it is set. Otherwise a default of framesize of 480 is assumed + ; internally + +;[celt48] +;type=celt +;samprate=48000 + +;[celt32] +;type=celt +;samprate=32000 + +;============================ OPUS Section Options ============================ +; +;[opus] +;type= ; Must be of type "opus" (default: "") +;packet_loss= ; Encoder's packet loss percentage. Can be any number between 0 + ; and 100, inclusive. A higher value results in more loss + ; resistance. (default: 0) +;complexity= ; Encoder's computational complexity. Can be any number between 0 + ; and 10, inclusive. Note, 10 equals the highest complexity. + ; (default: 10) +;max_bandwidth= ; Encoder's maximum bandwidth allowed. Sets an upper bandwidth + ; bound on the encoder. Can be any of the following: narrow, + ; medium, wide, super_wide, full. (default: full) +;signal= ; Encoder's signal type. Aids in mode selection on the encoder: Can + ; be any of the following: auto, voice, music. (default: auto) +;application= ; Encoder's application type. Can be any of the following: voip, + ; audio, low_delay. (default: voip) +;max_playback_rate= ; Override the maximum playback rate in the offer's SDP. + ; Any value between 8000 and 48000 (inclusive) is valid, + ; however typically it should match one of the usual opus + ; bandwidths. A value of "sdp" is also allowed. When set + ; to "sdp" then the value from the offer's SDP is used. + ; (default: "sdp") +;bitrate= ; Override the maximum average bitrate in the offer's SDP. Any value + ; between 500 and 512000 is valid. The following values are also + ; allowed: auto, max, sdp. When set to "sdp" then the value from + ; the offer's sdp is used. (default: "sdp") +;cbr= ; Override the constant bit rate parameter in the offer's SDP. A value of + ; 0/false/no represents a variable bit rate whereas 1/true/yes represents + ; a constant bit rate. A value of "sdp" is also allowed. When set to "sdp" + ; then the value from the offer's sdp is used. (default: "sdp") +;fec= ; Override the use inband fec parameter in the offer's SDP. A value of + ; 0/false/no represents disabled whereas 1/true/yes represents enabled. + ; A value of "sdp" is also allowed. When set to "sdp" then the value from + ; the offer's sdp is used. (default: "sdp") +;dtx= ; Override the use dtx parameter in the offer's SDP. A value of 0/false/no + ; represents disabled whereas 1/true/yes represents enabled. A value of + ; "sdp" is also allowed. When set to "sdp" then the value from the offer's + ; sdp is used. (default: "sdp") + +;=============================== OPUS Examples ================================ +; +;[opus] +;type=opus +;max_playback_rate=8000 ; Limit the maximum playback rate on the encoder +;fec=no ; Force no inband fec on the encoder (i.e don't use what's on the SDP) + +;[myopus] +;type=opus +;max_bandwidth=wide ; Maximum encoded bandwidth set to wide band (0-8000 Hz +; ; audio bandwidth at 16Khz sample rate) +;cbr=yes ; Force a constant bit rate (i.e don't use what's on the SDP) diff --git a/version_1.8.2/pabx/etc/asterisk/confbridge.conf b/version_1.8.2/pabx/etc/asterisk/confbridge.conf new file mode 100644 index 0000000..f1fccf6 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/confbridge.conf @@ -0,0 +1,12 @@ +[general] +[default_user_simplesip] +type=user +dtmf_passthrough=no +dsp_silence_threshold=2500 +dsp_drop_silence=yes + +[simplesip_menu] +type=menu +1=dialplan_exec(adiciona-conferencia,1,1) +2=admin_kick_last +9=admin_toggle_mute_participants \ No newline at end of file diff --git a/version_1.8.2/pabx/etc/asterisk/config_test.conf b/version_1.8.2/pabx/etc/asterisk/config_test.conf new file mode 100644 index 0000000..b7cb212 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/config_test.conf @@ -0,0 +1,46 @@ +; Config to test config parsing +; global and item have values that differ from defaults +; global_defaults and item_defualts are to show all defaults are set +; there should be an option for every default type, and a custom type + +[global] +intopt=-1 +uintopt=1 +timelenopt1=1ms +timelenopt2=1s +timelenopt3=1m +timelenopt4=1h +doubleopt=0.1 +sockaddropt=1.2.3.4:1234 +boolopt=true +boolflag1=true +boolflag2=false +boolflag3=true +deny=0.0.0.0/0 +permit=1.2.3.4/32 +codecopt=!all,ulaw,g729 +stropt=test +customopt=yes + +[global_defaults] + +[item] +intopt=-1 +uintopt=1 +timelenopt1=1 +timelenopt2=1 +timelenopt3=1 +timelenopt4=1 +doubleopt=0.1 +sockaddropt=1.2.3.4:1234 +boolopt=true +boolflag1=true +boolflag2=false +boolflag3=true +acldenyopt=0.0.0.0/0 +aclpermitopt=1.2.3.4/32 +codecopt=!all,ulaw,g729 +stropt=test +customopt=yes + +[item_defaults] diff --git a/version_1.8.2/pabx/etc/asterisk/console.conf b/version_1.8.2/pabx/etc/asterisk/console.conf new file mode 100644 index 0000000..aad306e --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/console.conf @@ -0,0 +1,97 @@ +; +; Configuration for chan_console, a cross-platform console channel driver. +; + +[general] + +; Set this option to "yes" to enable automatically answering calls on the +; console. This is very useful if the console is used as an intercom. +; The default value is "no". +; +;autoanswer = no + +; Set the default context to use for outgoing calls. This can be overridden by +; dialing some extension@context, unless the overridecontext option is enabled. +; The default is "default". +; +;context = default + +; Set the default extension to use for outgoing calls. The default is "s". +; +;extension = s + +; Set the default CallerID for created channels. +; +;callerid = MyName Here <(256) 428-6000> + +; Set the default language for created channels. +; +;language = en + +; If you set overridecontext to 'yes', then the whole dial string +; will be interpreted as an extension, which is extremely useful +; to dial SIP, IAX and other extensions which use the '@' character. +; The default is "no". +; +;overridecontext = no ; if 'no', the last @ will start the context + ; if 'yes' the whole string is an extension. + + +; Default Music on Hold class to use when this channel is placed on hold in +; the case that the music class is not set on the channel with +; Set(CHANNEL(musicclass)=whatever) in the dialplan and the peer channel +; putting this one on hold did not suggest a class to use. +; +;mohinterpret=default + +; ----------------------------- JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an + ; Console channel. Defaults to "no". An enabled jitterbuffer will + ; be used only if the sending side can create and the receiving + ; side can not accept jitter. The Console channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive Console side will always + ; be used if the sending side can create jitter. + +; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. + +; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is + ; resynchronized. Useful to improve the quality of the voice, with + ; big jumps in/broken timestamps, usually sent from exotic devices + ; and programs. Defaults to 1000. + +; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a Console + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) and "adaptive" (with + ; variable size, actually the new jb of IAX2). Defaults to fixed. + +; jbtargetextra = 40 ; This option only affects the jb when 'jbimpl = adaptive' is set. + ; The option represents the number of milliseconds by which the new + ; jitter buffer will pad its size. the default is 40, so without + ; modification, the new jitter buffer will set its size to the jitter + ; value plus 40 milliseconds. increasing this value may help if your + ; network normally has low jitter, but occasionally has spikes. + +; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". +; ---------------------------------------------------------------------------------- + + +; +; Any configuration context defined beyond the [general] section configures +; specific devices for use. +; + +[default] +input_device = default ; When configuring an input device and output device, +output_device = default ; use the name that you see when you run the "console + ; list available" CLI command. If you say "default", the + ; system default input and output devices will be used. +autoanswer = no +context = default +extension = s +callerid = MyName Here <(256) 428-6000> +language = en +overridecontext = no +mohinterpret = default +active = yes ; This option should only be set for one console. + ; It means that it is the active console to be + ; used from the Asterisk CLI. diff --git a/version_1.8.2/pabx/etc/asterisk/dahdi_guiread.conf b/version_1.8.2/pabx/etc/asterisk/dahdi_guiread.conf new file mode 100644 index 0000000..0d3831a --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/dahdi_guiread.conf @@ -0,0 +1,5 @@ + +[general] + +#include "../zaptel.conf" + diff --git a/version_1.8.2/pabx/etc/asterisk/dahdi_scan.conf b/version_1.8.2/pabx/etc/asterisk/dahdi_scan.conf new file mode 100644 index 0000000..309d3aa --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/dahdi_scan.conf @@ -0,0 +1,11 @@ +[1] +active=yes +alarms=UNCONFIGURED +description=ZTDUMMY/1 (source: HRtimer) 1 +name=ZTDUMMY/1 +manufacturer= +devicetype=Zaptel Dummy Timing Driver +location= +basechan=1 +totchans=0 +irq=0 diff --git a/version_1.8.2/pabx/etc/asterisk/dbsep.conf b/version_1.8.2/pabx/etc/asterisk/dbsep.conf new file mode 100644 index 0000000..7a68850 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/dbsep.conf @@ -0,0 +1,34 @@ +# +# Configuration file for dbsep.cgi +# +# The purpose of this file is to provide realtime access to a database, +# possibly through ODBC, without needing to load the ODBC drivers into +# Asterisk, since there are several backend drivers which are rather +# buggy. +# +# We accomplish this separation by using the res_config_curl realtime +# driver to connect to a server running dbsep.cgi (or another, which +# implements the same protocol). +# +# This file contains the information necessary to configure dbsep.cgi. +# +# +# Once installed to a web server, you'll need to preload func_curl.so +# and res_config_curl.so in modules.conf and configure extconfig.conf: +# +# voicemail => curl,http://server/path/to/dbsep.cgi/voicemail +# sippeers => curl,http://server/path/to/dbsep.cgi/sippeers +# + +# The Data Source Name, as specified by the Perl DBI module. +# Typically, this will be along the lines of 'DBI:mysql:astdbname[:dbhostname]' or 'DBI:Pg:dbname=astdbname;hostname=dbhostname' +dsn=somedsn + +# Connected database user +dbuser=someuser + +# And its password +dbpass=password + +# For most databases, this is fine. Set to 'no' for Sybase or MS SQL Server. +backslash_is_escape=yes diff --git a/version_1.8.2/pabx/etc/asterisk/digivoice.conf b/version_1.8.2/pabx/etc/asterisk/digivoice.conf new file mode 100644 index 0000000..89a29df --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/digivoice.conf @@ -0,0 +1,27 @@ +[general] +allow_slinear=0 +allow_ulaw=1 +allow_alaw=1 +allow_gsm=0 +consolelanguage=br + +[allportsconfig] +default_callprogress=cp_default.cfg +detectiontype=1 +dialtype=1 +afterdialpause=1000 +ringbacktone1=tone1 +ringbacktone2=tone1 +ringbacktimes=1000,4000,1000,4000 +busytone1=tone1 +busytone2=tone1 +busytimes=250,250,250,250 +subchannelringtone1=tone1 +subchannelringtone2=tone1 +subchannelringtimes=100,100,100,5000 + +[groups] + +[port_config] + +[e1_config] \ No newline at end of file diff --git a/version_1.8.2/pabx/etc/asterisk/dnsmgr.conf b/version_1.8.2/pabx/etc/asterisk/dnsmgr.conf new file mode 100644 index 0000000..f028acc --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/dnsmgr.conf @@ -0,0 +1,5 @@ +[general] +enable=no ; enable creation of managed DNS lookups + ; default is 'no' +;refreshinterval=1200 ; refresh managed DNS lookups every seconds + ; default is 300 (5 minutes) \ No newline at end of file diff --git a/version_1.8.2/pabx/etc/asterisk/dsp.conf b/version_1.8.2/pabx/etc/asterisk/dsp.conf new file mode 100644 index 0000000..f13ca2f --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/dsp.conf @@ -0,0 +1,42 @@ +[default] +; +; Length of sound (in milliseconds) before a period of silence is considered +; to be a change from talking to silence or a period of noise converts silence +; to talking. [default=256] +; +;silencethreshold=256 + +; DTMF Reverse Twist and Normal Twist is the difference in power between the row and column energies. +; +; Normal Twist is where the row energy is greater than the column energy. +; Reverse Twist is where the column energy is greater. +; +; Power level difference between frequencies for different Administrations/RPOAs +; Power Gain equiv +; normal reverse dB's +; AT&T(default) 6.31 2.51 8dB(normal), 4dB(reverse) +; NTT 3.16 3.16 Max. 5dB +; Danish 3.98 3.98 Max. 6dB +; Australian 10.0 10.0 Max. 10dB +; Brazilian 7.94 7.94 Max. 9dB +; ETSI 3.98 3.98 Max. 6dB + +;previous version compatible AT&T values +; RADIO_RELAX disabled, and relaxdtmf=no +; 6.30 2.50 7.99dB(normal), 3.98dB(reverse) +; RADIO_RELAX disabled, and relaxdtmf=yes +; 6.30 4.00 7.99dB(normal), 6.02dB(reverse) +; RADIO_RELAX enabled, and relaxdtmf=no +; 6.30 2.50 7.99dB(normal), 3.984dB(reverse) +; RADIO_RELAX enabled, and relaxdtmf=yes +; 6.30 6.50 7.99dB(normal), 8.13dB(reverse) + +;If you don't know what these mean, don't change them. +;dtmf_normal_twist=6.31 +;dtmf_reverse_twist=2.51 +;relax_dtmf_normal_twist=6.31 +;relax_dtmf_reverse_twist=3.98 + +;successive number hits/misses of 12.75ms before a digit/nodigit is considered valid +;dtmf_hits_to_begin=2 +;dtmf_misses_to_end=3 diff --git a/version_1.8.2/pabx/etc/asterisk/dundi.conf b/version_1.8.2/pabx/etc/asterisk/dundi.conf new file mode 100644 index 0000000..70f97d4 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/dundi.conf @@ -0,0 +1,268 @@ +; +; DUNDi configuration file +; +; For more information about DUNDi, see http://www.dundi.com +; +; +[general] +; +; The "general" section contains general parameters relating +; to the operation of the dundi client and server. +; +; The first part should be your complete contact information +; should someone else in your peer group need to contact you. +; +;department=Your Department +;organization=Your Company, Inc. +;locality=Your City +;stateprov=ST +;country=US +;email=your@email.com +;phone=+12565551212 +; +; +; Specify bind address and port number. Default is +; 4520 +; +;bindaddr=0.0.0.0 +;port=4520 +; +; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of the tos parameter. +;tos=ef +; +; Our entity identifier (Should generally be the MAC address of the +; machine it's running on. Defaults to the first eth address, but you +; can override it here, as long as you set it to the MAC of *something* +; you own!) The EID can be overridden by a setting in asterisk.conf, +; or by setting this option. +; +;entityid=00:07:E9:3B:76:60 +; +; Peers shall cache our query responses for the specified time, +; given in seconds. Default is 3600. +; +;cachetime=3600 +; +; This defines the max depth in which to search the DUNDi system. +; Note that the maximum time that we will wait for a response is +; (2000 + 200 * ttl) ms. +; +ttl=32 +; +; If we don't get ACK to our DPDISCOVER within 2000ms, and autokill is set +; to yes, then we cancel the whole thing (that's enough time for one +; retransmission only). This is used to keep things from stalling for a long +; time for a host that is not available, but would be ill advised for bad +; connections. In addition to 'yes' or 'no' you can also specify a number +; of milliseconds. See 'qualify' for individual peers to turn on for just +; a specific peer. +; +autokill=yes +; +; pbx_dundi creates a rotating key called "secret", under the family +; 'secretpath'. The default family is dundi (resulting in +; the key being held at dundi/secret). +; +;secretpath=dundi +; +; The 'storehistory' option (also changeable at runtime with +; 'dundi store history' and 'dundi no store history') will +; cause the DUNDi engine to keep track of the last several +; queries and the amount of time each query took to execute +; for the purpose of tracking slow nodes. This option is +; off by default due to performance impacts. +; +;storehistory=yes + +[mappings] +; +; The "mappings" section maps DUNDi contexts +; to contexts on the local asterisk system. Remember +; that numbers that are made available under the e164 +; DUNDi context are regulated by the DUNDi General Peering +; Agreement (GPA) if you are a member of the DUNDi E.164 +; Peering System. +; +; dundi_context => local_context,weight,tech,dest[,options]] +; +; 'dundi_context' is the name of the context being requested +; within the DUNDi request +; +; 'local_context' is the name of the context on the local system +; in which numbers can be looked up for which responses shall be given. +; +; 'weight' is the weight to use for the responses provided from this +; mapping. The number must be >= 0 and < 60000. Since it is totally +; valid to receive multiple responses to a query, responses received +; with a lower weight are tried first. Note that the weight has a +; special meaning in the e164 context - see the GPA for more details. +; +; 'tech' is the technology to use (IAX, SIP, H323) +; +; 'dest' is the destination to supply for reaching that number. The +; following variables can be used in the destination string and will +; be automatically substituted: +; ${NUMBER}: The number being requested +; ${IPADDR}: The IP address to connect to +; ${SECRET}: The current rotating secret key to be used +; +; Further options may include: +; +; nounsolicited: No unsolicited calls of any type permitted via this +; route +; nocomunsolicit: No commercial unsolicited calls permitted via +; this route +; residential: This number is known to be a residence +; commercial: This number is known to be a business +; mobile: This number is known to be a mobile phone +; nocomunsolicit: No commercial unsolicited calls permitted via +; this route +; nopartial: Do not search for partial matches +; +; There *must* exist an entry in mappings for DUNDi to respond +; to any request, although it may be empty. +; +;e164 => dundi-e164-canonical,0,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial +;e164 => dundi-e164-customers,100,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial +;e164 => dundi-e164-via-pstn,400,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial + +;digexten => default,0,IAX2,guest@lappy/${NUMBER} +;asdf => + +; +; Weights for mappings can be set a few different ways: +; +; 1) It can be set as a static number. +;testmap1 => context1,222,IAX2,guest@peer1/${NUMBER} +; +; 2) It can be an Asterisk global variable. +;testmap2 => context2,${DUNDITESTVAR},IAX2,guest@peer2${NUMBER} +; +; 3) It can be retrieved using a dialplan function. This can be extremely +; useful if you want to let an external script decide what the weight +; in a response shouuld be. +;testmap3 => context3,${SHELL(echo 123)},IAX2,guest@peer3/${NUMBER} +; +; The built in variables ${SECRET}, ${IPADDR} and ${NUMBER} can also be +; passed to the weight. For example, you could pass the ${NUMBER} value +; to your SHELL() script and use that to dynamically return a weight. +; +; Note than when using a global variable or dialplan function to set the +; weight for a mapping, that response caching should be disabled if you +; plan for these values to change frequently at all. If the results are +; cached, then any change in value will not take effect until the cache +; has expired. +; + +; +; The remaining sections represent the peers +; that we fundamentally trust. The section name +; represents the name and optionally at a specific +; DUNDi context if you want the trust to be established +; for only a specific DUNDi context. +; +; inkey - What key they will be authenticating to us with +; +; outkey - What key we use to authenticate to them +; +; host - What their host is +; +; port - The port where their host is listening (default: 4520) +; +; order - What search order to use. May be 'primary', 'secondary', +; 'tertiary' or 'quartiary'. In large systems, it is beneficial +; to only query one up-stream host in order to maximize caching +; value. Adding one with primary and one with secondary gives you +; redundancy without sacrificing performance. +; +; include - Includes this peer when searching a particular context +; for lookup (set "all" to perform all lookups with that +; host. This is also the context in which peers are permitted +; to precache. +; +; noinclude - Disincludes this peer when searching a particular context +; for lookup (set "all" to perform no lookups with that +; host. +; +; permit - Permits this peer to search a given DUNDi context on +; the local system. Set "all" to permit this host to +; lookup all contexts. This is also a context for which +; we will create/forward PRECACHE commands. +; +; deny - Denies this peer to search a given DUNDi context on +; the local system. Set "all" to deny this host to +; lookup all contexts. +; +; model - inbound, outbound, or symmetric for whether we receive +; requests only, transmit requests only, or do both. +; +; precache - Utilize/Permit precaching with this peer (to pre +; cache means to provide an answer when no request +; was made and is used so that machines with few +; routes can push those routes up a to a higher level). +; outgoing means we send precache routes to this peer, +; incoming means we permit this peer to send us +; precache routes. symmetric means we do both. +; +; Note: You cannot mix symmetric/outbound model with symmetric/inbound +; precache, nor can you mix symmetric/inbound model with symmetric/outbound +; precache. +; +; +; The '*' peer is special and matches an unspecified entity +; + +; +; Sample Primary e164 DUNDi peer +; +;[00:50:8B:F3:75:BB] +;model = symmetric +;host = 64.215.96.114 +;inkey = digium +;outkey = misery +;include = e164 +;permit = e164 +;qualify = yes + +; +; Sample Secondary e164 DUNDi peer +; +;[00:A0:C9:96:92:84] +;model = symmetric +;host = misery.digium.com +;inkey = misery +;outkey = ourkey +;include = e164 +;permit = e164 +;qualify = yes +;order = secondary + +; +; Sample "push mode" downstream host +; +;[00:0C:76:96:75:28] +;model = inbound +;host = dynamic +;precache = inbound +;inkey = littleguy +;outkey = ourkey +;include = e164 ; In this case used only for precaching +;permit = e164 +;qualify = yes + +; +; Sample "push mode" upstream host +; +;[00:07:E9:3B:76:60] +;model = outbound +;precache = outbound +;host = 216.207.245.34 +;register = yes +;inkey = dhcp34 +;permit = all ; In this case used only for precaching +;include = all +;qualify = yes +;outkey=foo + +;[*] +; diff --git a/version_1.8.2/pabx/etc/asterisk/enum.conf b/version_1.8.2/pabx/etc/asterisk/enum.conf new file mode 100644 index 0000000..39c7231 --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/enum.conf @@ -0,0 +1,22 @@ +; +; ENUM Configuration for resolving phone numbers over DNS +; +; Sample config for Asterisk +; This file is reloaded at "module reload enum" in the CLI +; +[general] +; +; The search list for domains may be customized. Domains are searched +; in the order they are listed here. +; +search => e164.arpa +; +; If you'd like to use the E.164.org public ENUM registry in addition +; to the official e164.arpa one, uncomment the following line +; +;search => e164.org +; +; As there are more H323 drivers available you have to select to which +; drive a H323 URI will map. Default is "H323". +; +h323driver => H323 diff --git a/version_1.8.2/pabx/etc/asterisk/extconfig.conf b/version_1.8.2/pabx/etc/asterisk/extconfig.conf new file mode 100644 index 0000000..9e13cac --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/extconfig.conf @@ -0,0 +1,111 @@ +; +; Static and realtime external configuration +; engine configuration +; +; See https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration +; for basic table formatting information. +; +[settings] +; +; Static configuration files: +; +; file.conf => driver,database[,table[,priority]] +; +; maps a particular configuration file to the given +; database driver, database and table (or uses the +; name of the file as the table if not specified) +; +; Uncomment to load queues.conf via the odbc engine. +; +;queues.conf => odbc,asterisk,ast_config +;extensions.conf => sqlite,asterisk,ast_config +; +; The following files CANNOT be loaded from Realtime storage: +; asterisk.conf +; extconfig.conf (this file) +; logger.conf +; +; Additionally, the following files cannot be loaded from +; Realtime storage unless the storage driver is loaded +; early using 'preload' statements in modules.conf: +; manager.conf +; cdr.conf +; rtp.conf +; +; Named ACLs specified in realtime also can not be used +; from manager.conf unless the storage driver is preloaded. +; Attempting to use a realtime stored named ACL before the +; driver is loaded will result in an invalid ACL which +; rejects all addresses. +; +; Realtime configuration engine +; +; maps a particular family of realtime +; configuration to a given database driver, +; database and table (or uses the name of +; the family if the table is not specified +; +;example => odbc,asterisk,alttable,1 +;example => mysql,asterisk,alttable,2 +;example2 => ldap,"dc=oxymium,dc=net",example2 +; +; Additionally, priorities are now supported for use as failover methods +; for retrieving realtime data. If one connection fails to retrieve any +; information, the next sequential priority will be tried next. This +; especially works well with ODBC connections, since res_odbc now caches +; when connection failures occur and prevents immediately retrying those +; connections until after a specified timeout. Note: priorities must +; start at 1 and be sequential (i.e. if you have only priorities 1, 2, +; and 4, then 4 will be ignored, because there is no 3). +; +; +; Possible driver backends: +; +; "odbc" is shown in the examples below, but is not the only valid realtime +; engine. Here are several of the possible options: +; odbc ... res_config_odbc +; sqlite ... res_config_sqlite +; sqlite3 ... res_config_sqlite3 +; pgsql ... res_config_pgsql +; curl ... res_config_curl +; ldap ... res_config_ldap +; mysql ... res_config_mysql (available via add-ons in menuselect) +; +; Note: The res_config_pgsql and res_config_sqlite backends configure the +; database used in their respective configuration files and ignore the +; database name configured in this file. +; +;iaxusers => odbc,asterisk +;iaxpeers => odbc,asterisk +;sippeers => odbc,asterisk +;sipregs => odbc,asterisk ; (avoid sipregs if possible, e.g. by using a view) +;ps_endpoints => odbc,asterisk +;ps_auths => odbc,asterisk +;ps_aors => odbc,asterisk +;ps_domain_aliases => odbc,asterisk +;ps_endpoint_id_ips => odbc,asterisk +;ps_outbound_publishes => odbc,asterisk +;ps_inbound_publications = odbc,asterisk +;ps_asterisk_publications = odbc,asterisk +;voicemail => odbc,asterisk +;extensions => odbc,asterisk +;meetme => mysql,general +;queues => odbc,asterisk +;queue_members => odbc,asterisk +;queue_rules => odbc,asterisk +;acls => odbc,asterisk +;musiconhold => mysql,general +;queue_log => mysql,general +; +; +; While most dynamic realtime engines are automatically used when defined in +; this file, 'extensions', distinctively, is not. To activate dynamic realtime +; extensions, you must turn them on in each respective context within +; extensions.conf with a switch statement. The syntax is: +; switch => Realtime/[[db_context@]tablename]/ +; The only option available currently is the 'p' option, which disallows +; extension pattern queries to the database. If you have no patterns defined +; in a particular context, this will save quite a bit of CPU time. However, +; note that using dynamic realtime extensions is not recommended anymore as a +; best practice; instead, you should consider writing a static dialplan with +; proper data abstraction via a tool like func_odbc. diff --git a/version_1.8.2/pabx/etc/asterisk/extensions.ael b/version_1.8.2/pabx/etc/asterisk/extensions.ael new file mode 100644 index 0000000..495001f --- /dev/null +++ b/version_1.8.2/pabx/etc/asterisk/extensions.ael @@ -0,0 +1,456 @@ +// +// Example AEL config file +// +// +// Static extension configuration file, used by +// the pbx_ael module. This is where you configure all your +// inbound and outbound calls in Asterisk. +// +// This configuration file is reloaded +// - With the "ael reload" command in the CLI +// - With the "reload" command (that reloads everything) in the CLI + +// The "Globals" category contains global variables that can be referenced +// in the dialplan by using the GLOBAL dialplan function: +// ${GLOBAL(VARIABLE)} +// ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid +// Unix/Linux environmental variables are reached with the ENV dialplan +// function: ${ENV(VARIABLE)} +// + +// NOTE! NOTE! NOTE! +// Asterisk by default will load both extensions.conf and extensions.ael files. +// Upon loading these files the dialplans generated from both with be merged, +// so you must make sure that you don't have any overlapping contexts or global +// variables. If you do, then unexpected behavior may result when the data is +// merged. +// NOTE! NOTE! NOTE! + +globals { + CONSOLE-AEL="Console/dsp"; // Console interface for demo + //CONSOLE-AEL=Zap/1; + //CONSOLE-AEL=Phone/phone0; + IAXINFO-AEL=guest; // IAXtel username/password + //IAXINFO-AEL="myuser:mypass"; + OUTBOUND-TRUNK="Zap/g2"; // Trunk interface + // + // Note the 'g2' in the OUTBOUND-TRUNK variable above. It specifies which group (defined + // in chan_dahdi.conf) to dial, i.e. group 2, and how to choose a channel to use in + // the specified group. The four possible options are: + // + // g: select the lowest-numbered non-busy DAHDI channel + // (aka. ascending sequential hunt group). + // G: select the highest-numbered non-busy DAHDI channel + // (aka. descending sequential hunt group). + // r: use a round-robin search, starting at the next highest channel than last + // time (aka. ascending rotary hunt group). + // R: use a round-robin search, starting at the next lowest channel than last + // time (aka. descending rotary hunt group). + // + OUTBOUND-TRUNKMSD=1; // MSD digits to strip (usually 1 or 0) + //OUTBOUND-TRUNK2=IAX2/user:pass@provider; +}; + +// +// Any category other than "General" and "Globals" represent +// extension contexts, which are collections of extensions. +// +// Extension names may be numbers, letters, or combinations +// thereof. If an extension name is prefixed by a '_' +// character, it is interpreted as a pattern rather than a +// literal. In patterns, some characters have special meanings: +// +// X - any digit from 0-9 +// Z - any digit from 1-9 +// N - any digit from 2-9 +// [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9) +// . - wildcard, matches anything remaining (e.g. _9011. matches +// anything starting with 9011 excluding 9011 itself) +// ! - wildcard, causes the matching process to complete as soon as +// it can unambiguously determine that no other matches are possible +// +// For example the extension _NXXXXXX would match normal 7 digit dialings, +// while _1NXXNXXXXXX would represent an area code plus phone number +// preceded by a one. +// +// Each step of an extension is ordered by priority, which must +// always start with 1 to be considered a valid extension. The priority +// "next" or "n" means the previous priority plus one, regardless of whether +// the previous priority was associated with the current extension or not. +// The priority "same" or "s" means the same as the previously specified +// priority, again regardless of whether the previous entry was for the +// same extension. Priorities may be immediately followed by a plus sign +// and another integer to add that amount (most useful with 's' or 'n'). +// Priorities may then also have an alias, or label, in +// parenthesis after their name which can be used in goto situations +// +// Contexts contain several lines, one for each step of each +// extension, which can take one of two forms as listed below, +// with the first form being preferred. One may include another +// context in the current one as well, optionally with a +// date and time. Included contexts are included in the order +// they are listed. +// +//context name { +// exten-name => { +// application(arg1,arg2,...); +// +// Timing list for includes is +// +//