PORTUGUESE - FreePBX + Asterisk 11 em Raspberry PI + sapo voip tudo a funcionar Junho 2013

Boas,

Finalmente encontrei uma utilidade para o meu Raspberry PI, substituir uma pequena central que tinha aqui em casa.

Vou partilhar convosco as configurações e metodos que usei para colocar a distribuição Freepbx e configurar o sapo voip (faz e recebe chamadas sem qualquer problema) de maneira a funcionar com a versao 11 do asterisk, ultimamente estava com problemas a efetuar chamadas, mas isso ficou resolvido.

1- Instalar o FreePBX na Raspberry PI (site oficial onde retirei a informação: http://www.raspberry-asterisk.org/)

  • Efetuar o download da imagem para instalar no cartão de memoria do Raspberry PI ( http://www.raspberry-asterisk.org/downloads/)

  • a minha versao é: raspbx-27-04-2013.zip

  • Fazer o download do software win32diskimager http://sourceforge.net/projects/win32diskimager

  • correr o software como administrador

  • selecionar a unidade onde temos o cartao de memoria que vai ser usado na raspberry PI

  • selecionar a imagem que fizemos o download anteriormente ( é preciso descomprimir o ficheiro raspbx…zip para que fiquemos com a imagem em .img) e carregar no write
    ( se tiverem duvidas consultem este link: http://elinux.org/RPi_Easy_SD_Card_Setup

  • Depois de gravar-mos a imagem no cartao é so colocar o cartao no Raspberry PI, ligar o cabo de rede e o cabo de energia e esperar um pouco até que arranque.

  • Por defeito o FreePBX vai receber ip via dhcp do nosso router.

  • Para aceder ao Freepbx pela primeira vez temos que ver o ip que foi atribuido pelo nosso router á RPI (raspberry pi) ou então acedemos através do nosso web browser a este endereço http://raspbx.local

Dados por defeito do FreePBX:

Mysql root password: raspberry

SSH login:
user: root
password: raspberry

Default FreePBX login:
user: admin
password: admin

2- Configurar o RPI

  • Configurar a Data e hora e “locales”

  • Entramos por ssh na raspberry (podem usar o putty ou outro) dados(hostname: raspbx.local username: root password: raspberry)

  • executamos os comandos na consola

  • configure-timezone ( quando aparecer a janela escolhemos Europa e seguidamente Portugal (Lisbon ou Londres)

  • Configurar definições de locais

  • Entramos por ssh na raspberry (podem usar o putty ou outro) dados(hostname: raspbx.local username: root password: raspberry)

  • executamos os comandos na consola

  • dpkg-reconfigure locales ( quando aparecer a janela escolhemos PT_pt UTF8 e na janela seguinte a mesma coisa PT_pt UTF8)
    Em caso de duvidas consultar sempre o manual ( http://www.raspberry-asterisk.org/documentation/#nextsteps )

3- Configurações do FreePBX

4- Configuração da conta sapo voip

  • Vamos ao Menu -> Connectivity e ->Trunks
  • Criamos uma nova Trunk -> Add SIP Trunk
  • Só precisam de alterar os parametro que vos vou facultar, o resto não é preciso modificar para que fique a conta do sapo a funcionar.

[QUOTE]ATENÇÃO: +3513020XXXXX (O XXXXX é para substituitem pelo vosso numero voip)

GENERAL SETTINGS
Trunk Name: sapovoip
Outbound Caller ID: +3513020XXXXX (numero de voip que nos foi atribuido)

OUTGOING SETTINGS
Trunk Name: sapovoip[/QUOTE]

[QUOTE]PEER DETAILS:

username=+3513020XXXXX
type=friend
t38pt_udptl=yes
secret=PASSWORD_DA_VOSSA_CONTA_VOIP
registername=+3513020XXXXX
port=5070
outboundproxy=proxy.voip.sapo.pt
insecure=very
host=proxy.voip.sapo.pt
fromuser=+3513020XXXXX
from=+3513020XXXXX
dtmfmode=rfc2833
fromdomain=voip.sapo.pt
disallow=all
allow=ulaw&alaw
context=from-trunk
canreinvite=yes
call-limit=2
authname=+3513020XXXXX[/QUOTE]

INCOMMING SETTINGS: fica tudo a branco, removam tudo o que estiver la em User context e User details.

[QUOTE]Register STRING

[email protected][email protected]/+3513020XXXXX[/QUOTE]

[QUOTE]
CRIAR ROTA DE ENTRADA (INBOUD ROUTE)

  • Criar uma rota de entrada para poderem ligar para o nosso numero voip da sapo.
  • Menu -> Connectivity e -> Inbound Routes
  • Add Inbound Route

Description: entrada_sapo
DID Number: +3513020XXXXX

em baixo
-Set Destination

  • Extensions (e á frente escolhemos o numero da extenção que queremos que toque quando ligarem para o numero voip do sapo.
    [/QUOTE]

[QUOTE]CRIAR ROTA DE SAIDA (OUTBOUD ROUTE)

  • Criar uma rota de entrada para poderem ligar para numeros da rede fixa através da conta voip do sapo.
  • Menu -> Connectivity e -> Outbound Routes
  • Add Route

Route Name: saida_sapo

DIAL PATTERNS THAT WILL USE THIS ROUTE
Escrevemos X. no campo mached pattern

em baixo
-Trunk Sequence for matched rules

  • na linha 0 escolhemos a trunk que criámos anteriormente chamada sapovoip.
  • carregamos no botão Submit Changes e depois em cima no topo da página em Apply Config
    [/QUOTE]

Creio não me estár a esquecer de nada, mas se precisarem pegunte, no forum ou por PM.

Or the more purist:-

http://www.raspberry-asterisk.org/

You could also just load the PBX in a Flash / Incredible PI image http://nerdvittles.com/?p=3026

This is just a standard message by PIAF, which is intended to remind users to adopt certain security practices.

It’s not an indication of an existing unpatched vulnerability.

I think you did not read my forum post :stuck_out_tongue:

My Portuguese how to is about raspberry-asterisk.org.

I am going to try the Incredible PI image, but it looks like they have a few security problem or not …

[quote]

  1. ALWAYS RUN INCREDIBLE PI BEHIND A SECURE HARDWARE-BASED FIREWALL/ROUTER
  2. NEVER EXPOSE ANY INCREDIBLE PI PORTS DIRECTLY TO THE INTERNET
  3. NEVER MAP INBOUND INTERNET PORTS FROM YOUR FIREWALL TO INCREDIBLE PI[/quote]

thanks for the translation, but there are a few words that does not match.

Boas

Finally found a use for my Raspberry PI, replacing a small central had here at home.

I will share with you the settings and methods I used to put the distribution Freepbx and configure sapo voip (make and receive calls without any problems) so working with version 11 of the asterisk, lately had problems making calls, but this was resolved.

1 - Install FreePBX on Raspberry PI (official website where the information removed: http://www.raspberry-asterisk.org/)

  • Make the image download to install on memory card Raspberry PI (http://www.raspberry-asterisk.org/downloads/)

  • My version is: raspbx-27-04-2013.zip

  • Download the software win32diskimager http://sourceforge.net/projects/win32diskimager

  • Run the software as administrator

  • Select the drive where you have the Memory Card that will be used in the raspberry PI

  • Select the image that we downloaded earlier (you must decompress the zip file … raspbx to stay with the image. Img) and load the write
    (If they have questions consult this link: http://elinux.org/RPi_Easy_SD_Card_Setup

  • After we record the image on the card is so put the card in Raspberry PI, connect the network cable and the power cord and wait a while before starting.

  • Default FreePBX will get ip via dhcp our router.

  • To access Freepbx first we have to see the ip that was assigned by our router will RPI (raspberry pi) or else we access through our web browser to this address http://raspbx.local

Default data FreePBX:

Mysql root password: raspberry

SSH login:
user: root
password: raspberry

Default FreePBX login:
user: admin
password: admin

2 - Set the RPI

  • Set Date and Time “locales”

  • We entered through ssh in raspberry (can use putty or other) data (hostname: raspbx.local username: root password: raspberry)

  • Execute commands in the console

  • Configure-timezone (when window appears and then choose Europe Portugal (Lisbon or London)

  • Configure the local

  • We entered through ssh in raspberry (can use putty or other) data (hostname: raspbx.local username: root password: raspberry)

  • Execute commands in the console

  • Dpkg-reconfigure locales (when window appears choose en_US UTF8 and in the next window the same thing en_US UTF8)
    In case of doubt always consult the manual (# http://www.raspberry-asterisk.org/documentation/ nextsteps)

3 - FreePBX Settings

4 - Account Setup sapo voip

  • Let’s go to Menu -> Connectivity and -> Trunks
  • We create a new Trunk -> Add SIP Trunk
  • Only need to change the parameter that will provide you, the rest is not necessary to change so that it is the account of sapo working.

Quote:
WARNING: +3513020 XXXXX (XXXXX is for The substituitem for your voip number)
GENERAL SETTINGS
Trunk Name: sapovoip
Outbound Caller ID: +3513020 XXXXX (voip number we were assigned)

OUTGOING SETTINGS
Trunk Name: sapovoip

Quote:
PEER DETAILS:
username = +3513020 XXXXX
type = friend
t38pt_udptl = yes
secret = PASSWORD_DA_VOSSA_CONTA_VOIP
RegisterName = +3513020 XXXXX
port = 5070
outboundproxy = proxy.voip.sapo.pt
insecure = very
host = proxy.voip.sapo.pt
fromuser = +3513020 XXXXX
from = +3513020 XXXXX
dtmfmode = rfc2833
fromdomain = voip.sapo.pt
disallow = all
allow = ulaw & alaw
context = from-trunk
canreinvite = yes
call-limit = 2
authname = +3513020 XXXXX

Incomming SETTINGS: everything is white, remove everything that is in it User Context and User details.

Quote:
Register STRING
@ Proxy.voip.sapo.pt [email protected]_DA_CONTA_VOIP +3513020 / +3513020 XXXXX

Quote:
CREATE ROUTE OF ENTRY (Inboud ROUTE)

  • Create a route entry to be able to call our number sapo voip.
  • Menu -> Connectivity and -> Inbound Routes
  • Add Inbound Route
    Description: entrada_sapo
    DID Number: +3513020 XXXXX

below
-Set Destination

  • Extensions (ahead and choose the number of the extension you want to ring when they call for the number of sapo voip.

Quote:
CREATE ROUTE DEPARTURE (OUTBOUD ROUTE)

  • Create an inbound route in order to connect to the fixed network numbers by sapo voip account.
  • Menu -> Connectivity and -> Outbound Routes
  • Add Route
    Route Name: saida_sapo

DIAL PATTERNS THAT WILL USE THIS ROUTE
Write X. field pattern mached

below
-Trunk Sequence for Matched rules

  • On line 0 chose trunk we created earlier called sapovoip.
  • Press on the Submit Changes button and then on the top of the page Apply Config

I believe I am not forgetting anything, but if you need pegunte in the forum or by PM.