terça-feira, 9 de abril de 2013

Portas utilizadas pela central Mitel

Port Range
Direction
Purpose & Details
TCP 22 (SSH)
Server « Internet
AMC communications. Allow inbound and outbound packets on TCP port 22 between the 6010 and the Internet to enable server registration, software and license key downloads, alerts and reporting.
TCP 443 (HTTPS)
Server « Internet
Remote Server Management. Allow inbound and outbound packets on TCP port 443 between the 6010 and the Internet to allow remote management of the server, if required.
HTTPS access to the manager on the external interface must be also be explicitly enabled from the server manager interface.
TCP 443 (HTTPS)
Server « LAN
Local Server Management. Allow inbound and outbound packets on TCP port 443 between the 6010 and the LAN to allow for management of the server.
HTTPS access to the manager on the external interface must be also be explicitly enabled from the server manager interface.
The firewall should be configured to limit HTTPS access to desired management hosts.
TCP 6800, 6801 and 6802
Server « Internet
Server « LAN
Server « ICP(s)
MiNet Call Control. Allow incoming and outgoing packets for TCP ports 6801 and 6802 between the server and the Internet. Allow incoming and outgoing packets for TCP ports 6800, 6801 and 6802 between the server and the LAN and the server and the ICP(s).
The LAN rule can be omitted if there are no teleworker sets on the LAN, but ensure that the ICP(s) can communicate with the server’s public address.
UDP 69
Server « Internet
Server « LAN
Firmware Downloads. Allow incoming TFTP requests from the Internet and from the LAN to the server on UDP port 69. Allow outbound replies to these requests, from the server to both the Internet and the LAN. Phones will be unable to boot if this is misconfigured. LAN rules can be omitted if there are no in-office Teleworker sets.
Note: a source UDP port of 69 is used for all replies from the 6010 TFTP server.
UDP 20,000 to 23,000 (RTP)
Server « Internet
Server « LAN
Voice Communications. Allow incoming and outgoing RTP on UDP ports 20000 – 23000 between the server and the Internet. Misconfiguration here is a common cause of one-way audio problems.
UDP 1024 to 65,535 (RTP)
Server ® LAN
Voice Communications. Allow outgoing RTP on UDP ports greater than, or equal to, 1024 from the server to the phone network (LAN). Failure to do so often results in a loss of audio from the remote phone to the local phone network (LAN).
UDP 1024 to 65,535 (RTP)
LAN ® Server
Voice Communications. Allow outgoing RTP on UDP ports greater than, or equal to, 1024 from the phone network (LAN) to the publicly routable IP address of the server. Failure to do so usually results in the loss of audio from the local phone network (LAN) to the remote phone.
TCP 3300 (VFA)
Server « Internet
Server « LAN
Optional VoiceFirst Communications. Allow bidirectional traffic on TCP port 3300 if you have a VoiceFirst Solution installed.
TCP 8001 (MiTAI)
Server « Internet
Server « LAN
Optional MiTAI Communications. Allow bidirectional traffic on TCP port 8001 if you are using the Your Assistant Softphone v3.1 or higher with the Teleworker Solution.
TCP 3999 (5230 set)
Server « Internet
Server « LAN
Optional 5230 IP Appliance Communications.Allow bidirectional traffic on TCP port 3999 if you are using Mitel 5230 IP Appliances as Teleworker sets. This enables communications from the on-board PDA.

Voip mudo (Resolvido)


Hoje, enfim conseguimos resolver um problema que há uma semana estava nos deixando de cabelo em pé.

O problema era o seguinte:

De um lado núcleo da rede com ip 10.x.x.x (gateway,switch, central voip tudo no geral). Do outro lado uma outra filial próxima ao núcleo, interligada por fibra, firewall na borda com nat e rede local 172.x.x.x.

Quando um telefone ip na 172.x.x.x se registrava na central que fica na rede 10.x.x.x, ele não ouvia a outra ponta.

Por exemplo o telefone 4455 registrado na rede 172.x.x.x, ligava para o telefone 4456 que estava registrado na rede 10.x.x.x, o telefone 4455 não ouvia, já o 4456 ouvia normalmente.

Estávamos a mais de uma semana quebrando a cabeça com regras de nat, liberação de porta udp no firewall e nada.

Porque o seguinte o protocolo sip utiliza a 5060 udp para sinalização, para se registrar na central.

Já o áudio, protocolo rtp utiliza porta aleatória que podem ir da 8000 até 32000 udp também, e acreditávamos que era o firewall que estava bloqueando, sendo que dá rede 10 não pingávamos a rede 172 e vice-versa funcionava.

Após várias reuniões, partimos pra uma ação conjunta onde entramos na central na rede 10 e demos um tracert para rede 172 e vimos que o tracert morria em um dos gateways, bastou entrar nesse gateway e verificar as rotas, tava lá escondidinha, uma rota que apontava para rede 172 estava com a máscara errada, bastou alterar, pronto todo mundo se falando.

Por isso, é importante o trabalho em equipe de todos em um problema, seja a equipe de redes, infra ou aplicações, todos devem estar focado no problema.

sexta-feira, 5 de abril de 2013

Debian/Snep com placas de rede da broadcom




# Entre no diretório cd /opt

# Baixe o arquivo wget  http://ftp.br.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.28+squeeze1_all.deb

#  dpkg -i firmware-bnx2_0.28+squeeze1_all.deb

# init 6

# ifconfig eth0 up

ou

# Salve o arquivo firmware-bnx2_0.28+squeeze1_all.deb em um pendrive

# No início da instalação, colocar o pendrive e o próprio snep pedirá para procurar pelo arquivo no pendrive.

# Se instalado no início perfeito, se não, após a instalação, deve-se entrar como root, montar o pendrive, e executar o comando

# fdisk -l [para saber como o pendrive foi montado (sdb1 ou sdc1)]

# cd /opt
# mkdir pen
# mount /dev/sdb? /opt/pen

# dpkg -i firmware-bnx2_0.28+squeeze1_all.deb

# editar o arquivo  /etc/network/interfaces
 nano /etc/network/interfaces

auto ethx
iface ethx inet static (para ip fixo) ou dhcp
        address x.x.x.x
        netmask x.x.x.x
        gateway x.x.x.x
     
# criar o arquivo resolv.conf dentro do /etc

# nano /etc/resolv.conf e adicionar a seguinte linha
nameserver (endereço dns)

Recuperar a senha do usuário web admin no snep



# logar via ssh e digitar

mysql -uroot -p snep25 -e "select password from peers where name='admin'"

(trocar o admin pelo nome do usuário se houver)

Script no Debian/Snep para iniciar o asterisk



# criar o script dentro de /etc/init.d/
touch /etc/init.d/asterisk

# editar o arquivo
nano /etc/init.d/asterisk
-----------------------------------------
#! /bin/bash                                                      
# /etc/init.d/asterisk                                          
#                              
   
safe_asterisk  
   
case "$1" in  
 start)  
 echo "Iniciando o asterisk"
 ;;  
 stop)  
 echo "Parando o asterisk"
 ;;  
 *)  
 echo "Use apenas start|stop"
 exit 1  
 ;;  
esac    
   
exit 0    
-----------------------------------------

# dar permissão ao arquivo
chmod 755 /etc/init.d/asterisk

# adicioná-lo a inicialização
update-rc.d asterisk defaults

# verificar se funciona, depois reiniciar a máquina
/etc/init.d/asterisk start
init 6

# Quando reiniciar asterisk -r para verificar se iniciou corretamente.

Repositórios para o Debian/Snep



Algum tempo atrás tive alguns problemas em atualizar e instalar pacotes por conta da falta de repositórios, por isso deixo aqui  os que utilizo no meu debian



# para começar edite o arquivo /etc/apt/sources.list

# comente as linhas que apontam para o cd-rom e adicione as seguintes:

deb http://http.us.debian.org/debian/ squeeze main contrib non-free

deb-src http://security.debian.org/ squeeze/updates main contrib

deb http://security.debian.org/ squeeze/updates main contrib non-free

deb http://ftp.br.debian.org/debain/ squeeze-updates main

deb-src http://ftp.br.debian.org/debain/ squeeze-updates main

deb http://ftp.br.debian.org/debain/ squeeze main contrib non-free

deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free

Mensagem de erro no apache2



# Se ao iniciar o apache2 aparecer a seguinte mensagem "Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName"

# Solução:

# editar o arquivo /etc/apache2/httpd.config

# inserir ServerName localhost

# restartar o apache /etc/init.d/apache2 restart

Erro no agi do asterisk com snep




# Recentemente após instalar o snep, recebi a seguinte "/var/lib/asterisk/agi-bin/ snep não existe

# Solução:

# entrar no diretório
cd /var/lib/asterisk/agi-bin/

# verificar se existe algum link
ls -lah snep

# se existir esse snep -> /var/www/sneplivre/agi deve-se excluí-lo
rm snep

# Criar um novo apontando para a pasta
ln -s /var/www/snep-2.0-rc1/agi/ snep

Criando um trunk em uma central mitel mxe 3300

# ENTRAR NO GATEWAY

# APÓS DIGITAR USUÁRIO E SENHA, CLIQUE EM SYSTEM ADMINISTRATION TOOL

# VERIFICAR SE A CENTRAL SELECIONADA AINDA TEM LICENÇA 

# LICENSES-> SYSTEM CAPACITY-> [SIP TRUNK LICENSES]

# VOICE NETWORK-> NETWORK ELEMENTS-> ADD

# DIGITAR O NOME DO TRUNK

# TYPE OTHERS

# FQDN OR IP ADDRESS - IP DA OUTRA PONTA

# SELECIONAR A OPÇÃO [SIP PEER]

# EM [SIP PEER] PORTA 5060

# EM [SIP PEER] EXTERNAL SIP PROXY FQDN OR IP ADDRESS - IP DA OUTRA PONTA.

--------------------------------------------------------------------------------------------------------------------------------------

# AGORA VÁ EM TRUNK-> TRUNK ATRIBUTES

# CLASS OF SERVICE, ALTERE O VALOR PRA 20

# DIAL IN TRUNKS INCOMING DIGIT MODIFICATION - ABSORB - COLOQUE 0

# EM [TRUNKS]-> SIP-> SIP PEER PROFILE-> ADD

# SIP PEER PROFILE - NOME DO PEER CRIADO

# NETWORK ELEMENTS - SELECIONE O TRUNK CRIADO

# ADDRESS TYPE - IP DA CENTRAL

# MAXIMUM SIMULTANEOS CALLS - Nº DE CANAIS

# TRUNK SERVICE - COLOCAR ALGUM QUE NAO ESTEJA SENDO UTILIZADO

------------------------------------------------------------------------------------------------------------------------------------

# AGORA VÁ EM [CALL ROUTING]-> ARS ROUTES

# ROUTER NUMBER - ESCOLHER UM VAZIO

# APÓS ESCOLHER ROUTER NUMBER-> ROUTING MEDIUM - SIP TRUNK CRIADO

# SIP PEER PROFILE - ESCOLHER A CENTRAL CRIADA

# DIGIT MODIFICATION NUMBER - SEGUIR COMO O PADRÃO 4

# SAVE

# CALL ROUTING-> ARS DIGITS DIALED

# CRIAR A ROTA COM FAIXA DESTINADA PARA CENTRAL
EXEMPLO: 1142XX / ROUTE / TERMINATION NUMBER ESCOLHIDO ANTERIORMENTE EM ROUTE NUMBER.

# PRONTO TERMINADO O TRUNK NO GATEWAY

----------------------------------------------------------------------------------------------------------------------------------------------

# ACESSAR A CENTRAL ONDE SÃO CRIADOS OS USUÁRIOS

# CALL ROUTING-> ARS ROUTES

# PEGUE QUALQUER ROTA VAZIA EM ROUTE NUMBER

# [ROUTE NUMBER]-> ROUTING MEDIUM - ESCOLHA IP/XNET TRUNK GROUP (SE FOR COM OUTRA CENTRAL MITEL)

# TRUNK GROUP NUMBER - Nº DA ROTA QUE ESSA CENTRAL ENVIA PARA O GATEWAY ANTERIOR

# DIGIT MODIFICATION NUMBER - COLOQUE 2

# SALVE

# CALL ROUTING-> ARS DIGIT DIALED-> ADD

# DIGITS DIALED-> COLOQUE A FAIXA CRIADA (1142XXX)

# TERMINATION ROUTE - COLOQUE ROUTE

# TERMINATION NUMBER - MESMO CRIADO EM [ARS ROUTES NO GATEWAY]

# SALVE E PRONTOISPONÍVEL.

# LICENSES-> SYSTEM CAPACITY-> [SIP TRUNK LICENSES]

# VOICE NETWORK-> NETWORK ELEMENTS-> ADD

# DIGITAR O NOME DO TRUNK

# TYPE OTHERS

# FQDN OR IP ADDRESS - IP DA OUTRA PONTA

# SELECIONAR A OPÇÃO [SIP PEER]

# EM [SIP PEER] PORTA 5060

# EM [SIP PEER] EXTERNAL SIP PROXY FQDN OR IP ADDRESS - IP DA OUTRA PONTA.

--------------------------------------------------------------------------------------------------------------------------------------------

# AGORA VÁ EM TRUNK-> TRUNK ATRIBUTES

# CLASS OF SERVICE, ALTERE O VALOR PRA 20

# DIAL IN TRUNKS INCOMING DIGIT MODIFICATION - ABSORB - COLOQUE 0

# EM [TRUNKS]-> SIP-> SIP PEER PROFILE-> ADD

# SIP PEER PROFILE - NOME DO PEER CRIADO

# NETWORK ELEMENTS - SELECIONE O TRUNK CRIADO

# ADDRESS TYPE - IP DA CENTRAL

# MAXIMUM SIMULTANEOS CALLS - Nº DE CANAIS

# TRUNK SERVICE - COLOCAR ALGUM QUE NAO ESTEJA SENDO UTILIZADO

---------------------------------------------------------------------------------------------------

# AGORA VÁ EM [CALL ROUTING]-> ARS ROUTES

# ROUTER NUMBER - ESCOLHER UM VAZIO

# APÓS ESCOLHER ROUTER NUMBER-> ROUTING MEDIUM - SIP TRUNK CRIADO

# SIP PEER PROFILE - ESCOLHER A CENTRAL CRIADA

# DIGIT MODIFICATION NUMBER - SEGUIR COMO O PADRÃO 4

# SAVE

# CALL ROUTING-> ARS DIGITS DIALED

# CRIAR A ROTA COM FAIXA DESTINADA PARA CENTRAL
EXEMPLO: 1142XX / ROUTE / TERMINATION NUMBER ESCOLHIDO ANTERIORMENTE EM ROUTE NUMBER.

# PRONTO TERMINADO O TRUNK NO GATEWAY

-----------------------------------------------------------------------------------------------------

# ACESSAR A CENTRAL ONDE SÃO CRIADOS OS USUÁRIOS

# CALL ROUTING-> ARS ROUTES

# PEGUE QUALQUER ROTA VAZIA EM ROUTE NUMBER

# [ROUTE NUMBER]-> ROUTING MEDIUM - ESCOLHA IP/XNET TRUNK GROUP (SE FOR COM OUTRA CENTRAL MITEL)

# TRUNK GROUP NUMBER - Nº DA ROTA QUE ESSA CENTRAL ENVIA PARA O GATEWAY ANTERIOR

# DIGIT MODIFICATION NUMBER - COLOQUE 2

# SALVE

# CALL ROUTING-> ARS DIGIT DIALED-> ADD

# DIGITS DIALED-> COLOQUE A FAIXA CRIADA (1142XXX)

# TERMINATION ROUTE - COLOQUE ROUTE

# TERMINATION NUMBER - MESMO CRIADO EM [ARS ROUTES NO GATEWAY]

# SALVE E PRONTO