<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><h1 class="m_-7526252435330156324gmail-page-header" style="box-sizing:border-box;font-size:41px;margin:0px 0px 22px;font-family:Ubuntu;font-weight:300;line-height:1.1;color:rgb(51,51,51);padding-bottom:10px;border-bottom:0px">Instalar os sons pt-br no Asterisk/FreePBX</h1><div class="m_-7526252435330156324gmail-region m_-7526252435330156324gmail-region-content" style="box-sizing:border-box;color:rgb(51,51,51);font-family:Roboto;font-size:16px"><section id="m_-7526252435330156324gmail-block-system-main" class="m_-7526252435330156324gmail-block m_-7526252435330156324gmail-block-system m_-7526252435330156324gmail-clearfix" style="box-sizing:border-box"><div class="m_-7526252435330156324gmail-row" style="box-sizing:border-box"><div class="m_-7526252435330156324gmail-col-xs-12 m_-7526252435330156324gmail-col-md-10" style="box-sizing:border-box;min-height:1px;padding-left:15px;padding-right:15px;float:left;width:975px"><div class="m_-7526252435330156324gmail-panel-pane m_-7526252435330156324gmail-pane-node-content" style="box-sizing:border-box"><div class="m_-7526252435330156324gmail-pane-content" style="box-sizing:border-box"><article id="m_-7526252435330156324gmail-node-21675" class="m_-7526252435330156324gmail-node m_-7526252435330156324gmail-node-article m_-7526252435330156324gmail-clearfix" style="box-sizing:border-box"><div class="m_-7526252435330156324gmail-field m_-7526252435330156324gmail-field-name-body m_-7526252435330156324gmail-field-type-text-with-summary m_-7526252435330156324gmail-field-label-hidden" style="box-sizing:border-box"><div class="m_-7526252435330156324gmail-field-items" style="box-sizing:border-box"><div class="m_-7526252435330156324gmail-field-item m_-7526252435330156324even" style="box-sizing:border-box"><p style="box-sizing:border-box;margin:0px 0px 11px">Para instalar os sons você tem que se conectar ao servidor Asterisk através de um cliente SSH com o usuário root.</p><p style="box-sizing:border-box;margin:0px 0px 11px">Uma vez dentro do servidor, criar o diretório de destino para os arquivos de áudio.</p><pre style="box-sizing:border-box;overflow:auto;font-family:"Ubuntu Mono";font-size:15px;padding:10.5px;margin-top:0px;margin-bottom:11px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:rgb(102,102,102);background-color:rgba(0,0,0,0.01);border-width:1px 1px 1px 4px;border-style:solid;border-color:rgb(204,204,204);border-radius:2px">mkdir /var/lib/asterisk/sounds/pt-br
</pre><p style="box-sizing:border-box;margin:0px 0px 11px">Baixar o pacote core e extra</p><pre style="box-sizing:border-box;overflow:auto;font-family:"Ubuntu Mono";font-size:15px;padding:10.5px;margin-top:0px;margin-bottom:11px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:rgb(102,102,102);background-color:rgba(0,0,0,0.01);border-width:1px 1px 1px 4px;border-style:solid;border-color:rgb(204,204,204);border-radius:2px">cd /var/lib/asterisk/sounds/pt-br
wget -O core.zip <a href="https://www.asterisksounds.org/pt-br/download/asterisk-sounds-core-pt-BR-sln16.zip" target="_blank">https://www.asterisksounds.<wbr>org/pt-br/download/asterisk-<wbr>sounds-core-pt-BR-sln16.zip</a>
wget -O extra.zip <a href="https://www.asterisksounds.org/pt-br/download/asterisk-sounds-extra-pt-BR-sln16.zip" target="_blank">https://www.asterisksounds.<wbr>org/pt-br/download/asterisk-<wbr>sounds-extra-pt-BR-sln16.zip</a>
unzip core.zip
unzip extra.zip
chown -R asterisk.asterisk /var/lib/asterisk/sounds/pt-br
find /var/lib/asterisk/sounds/pt-br -type d -exec chmod 0775 {} \;
</pre><p style="box-sizing:border-box;margin:0px 0px 11px">Agora você vai ter que configurar a nova língua no ramal que deseje ou no contexto geral do protocolo (SIP, IAX2, etc.) no qual utilize os novos sons.</p><h2 style="box-sizing:border-box;font-family:Ubuntu;font-weight:300;line-height:1.1;color:inherit;margin-top:22px;margin-bottom:11px;font-size:34px">Converter arquivos de som para outros formatos</h2><pre style="box-sizing:border-box;overflow:auto;font-family:"Ubuntu Mono";font-size:15px;padding:10.5px;margin-top:0px;margin-bottom:11px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:rgb(102,102,102);background-color:rgba(0,0,0,0.01);border-width:1px 1px 1px 4px;border-style:solid;border-color:rgb(204,204,204);border-radius:2px">cd /var/lib/asterisk/sounds/pt-br
vi convert
</pre><pre style="box-sizing:border-box;overflow:auto;font-family:"Ubuntu Mono";font-size:15px;padding:10.5px;margin-top:0px;margin-bottom:11px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:rgb(102,102,102);background-color:rgba(0,0,0,0.01);border-width:1px 1px 1px 4px;border-style:solid;border-color:rgb(204,204,204);border-radius:2px">#!/bin/bash
for a in $(find . -name '*.sln16'); do
sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t gsm -r 8k `echo $a|sed "s/.sln16/.gsm/"`;\
sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t raw -r 8k -e a-law `echo $a|sed "s/.sln16/.alaw/"`;\
sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t raw -r 8k -e mu-law `echo $a|sed "s/.sln16/.ulaw/"`;\
done
</pre><pre style="box-sizing:border-box;overflow:auto;font-family:"Ubuntu Mono";font-size:15px;padding:10.5px;margin-top:0px;margin-bottom:11px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:rgb(102,102,102);background-color:rgba(0,0,0,0.01);border-width:1px 1px 1px 4px;border-style:solid;border-color:rgb(204,204,204);border-radius:2px">chmod +x convert
./convert
</pre><h2 style="box-sizing:border-box;font-family:Ubuntu;font-weight:300;line-height:1.1;color:inherit;margin-top:22px;margin-bottom:11px;font-size:34px">Configuração em FreePBX</h2><p style="box-sizing:border-box;margin:0px 0px 11px">Para ativar os sons utilizando FreePBX, basta alterar o parâmetro da variável language dentro de Asterisk SIP Settings. Neste caso, colocando es. Se existirem ramais ou linhas IAX2, será necessário configurar no parâmetro language acessando o menu Asterisk IAX Settings.</p><h2 style="box-sizing:border-box;font-family:Ubuntu;font-weight:300;line-height:1.1;color:inherit;margin-top:22px;margin-bottom:11px;font-size:34px">Como busca Asterisk os sons baseado na configuração do canal</h2><p style="box-sizing:border-box;margin:0px 0px 11px">Cada canal de Asterisk tem sua configuração de língua. O valor inserido na configuração é dividido por cada underline para construir a rota onde Asterisk buscará os sons. Assim, Asterisk utilizará o primeiro arquivo que encontre.</p><p style="box-sizing:border-box;margin:0px 0px 11px">Isso quer dizer que se o valor do parâmetro language for es_AR_Maria, Asterisk buscará os arquivos em:</p><pre style="box-sizing:border-box;overflow:auto;font-family:"Ubuntu Mono";font-size:15px;padding:10.5px;margin-top:0px;margin-bottom:11px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:rgb(102,102,102);background-color:rgba(0,0,0,0.01);border-width:1px 1px 1px 4px;border-style:solid;border-color:rgb(204,204,204);border-radius:2px">.../sounds/pt_br_Maria
.../sounds/pt_br
.../sounds/pt
.../sounds
</pre><p style="box-sizing:border-box;margin:0px">Isso faz com que seja possível acrescentar novas variantes de uma língua baseadas em um esquema geral.</p></div></div></div></article></div></div></div></div></section></div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="background-image:initial;background-position:initial;background-repeat:initial"><span style="font-size:small">-- </span><br></p><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="background-image:initial;background-position:initial;background-repeat:initial"><b style="font-size:small"><span style="font-size:10pt;font-family:"lucida sans unicode",sans-serif">__________________________________________________<br>LEOMAR SOARES DE ALMEIDA<br></span></b><span style="color:rgb(39,78,19);font-family:"lucida sans unicode",sans-serif;font-size:10pt">Fixo: (65) 3661-3960<br></span><span style="color:rgb(39,78,19);font-family:"lucida sans unicode",sans-serif;font-size:10pt">Whats. (65) 9 9676-0062<br></span><span style="font-size:10pt;font-family:"lucida sans unicode",sans-serif;color:rgb(39,78,19)">E-mail: </span><span style="font-size:10pt"><font color="#1155cc"><a href="mailto:leomarsa@gmail.com" style="font-family:"lucida sans unicode",sans-serif;color:rgb(17,85,204)" target="_blank">leomarsa@gmail.com</a><br></font></span><b style="font-size:small"><span style="font-size:10pt;font-family:"lucida sans unicode",sans-serif"><br></span></b><font face="verdana, sans-serif"><font color="#274e13"><span style="font-size:12.8px"><font size="2">- Engenharia de Sistemas Embarcados<br></font></span><span style="font-size:10pt">- Telefonia IP e </span><span style="font-size:13.3333px">Analógica</span><br><span style="font-size:10pt">- Segurança em TI</span><br><span style="font-size:10pt">- Redes de Computadores Wired/</span></font><span style="color:rgb(39,78,19);font-size:12.8px"><span style="font-size:10pt">Wireless</span></span><font color="#274e13"><br><span style="font-size:10pt">- Sistemas ERP/CRM</span><br><span style="font-size:10pt">- Sistemas de Automação e Segurança </span><span style="font-size:13.3333px">Eletrônica</span><br><span style="font-size:10pt">- Elétrica</span><span style="font-size:10pt"> Predial/Residencial (</span><span style="font-size:12.8px"><span style="font-size:10pt">Baixa </span><span style="font-size:13.3333px">Tensão)</span></span></font></font></p><p style="background-image:initial;background-position:initial;background-repeat:initial"><font face="verdana, sans-serif"><font color="#274e13"><span style="font-size:12.8px"><span style="font-size:13.3333px"><br></span></span></font></font></p></div></div></div></div></div></div></div></div>
<p> <br></p></div></div></div></div></div></div></div></div></div></div></div></div>
</div>