WRobynson
(usa Outra)
Enviado em 07/11/2016 - 13:06h
Pessoal, não consigo fazer meu telefone registrar quando o servidor está atrás de um NAT...
Cenário:
Softphone client IIP: 187.99.99.230 (aponta para 1.2.3.4 - Server)
Server public IP: 1.2.3.4 (Nateado pelo roteador para 172.20.98.116)
Server private IP (real): 172.20.98.116
Se eu colocar o IP endereço IP público (1.2.3.4) direto na interface do servidor, o telefone registra. Com isso, concluo que o problema não é a senha errada!
No SIP.conf...
nat=yes
externip=1.2.3.4
localnet=172.20.98.0/255.255.255.0
Debug...
<--- SIP read from UDP://187.99.99.230:60486 --->
REGISTER sip:172.20.98.116;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 187.99.99.230:60486;branch=z9hG4bK-524287-1---f1a1a826bcc36628;rport
Max-Forwards: 70
Contact: <sip:1711@187.99.99.230:60486;rinstance=37adb9e185656c7e;transport=UDP>
To: <sip:1711@172.20.98.116;transport=UDP>
From: <sip:1711@172.20.98.116;transport=UDP>;tag=47fb0837
Call-ID: _hwcWJj4wzLLz-3QtOm4ZQ..
CSeq: 1 REGISTER
Expires: 60
User-Agent: Zoiper rv2.8.15
Allow-Events: presence, kpml, talk
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to 187.99.99.230 : 60486 (no NAT)
<--- Transmitting (NAT) to 187.99.99.230:60486 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 187.99.99.230:60486;branch=z9hG4bK-524287-1---f1a1a826bcc36628;received=187.99.99.230;rport=60486
From: <sip:1711@172.20.98.116;transport=UDP>;tag=47fb0837
To: <sip:1711@172.20.98.116;transport=UDP>;tag=as39e8fbec
Call-ID: _hwcWJj4wzLLz-3QtOm4ZQ..
CSeq: 1 REGISTER
User-Agent: Asterisk PBX 1.6.0.26-FONCORE-r78
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4447f018"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '_hwcWJj4wzLLz-3QtOm4ZQ..' in 32000 ms (Method: REGISTER)
VOIPLAB*CLI>
<--- SIP read from UDP://187.99.99.230:60486 --->
REGISTER sip:172.20.98.116;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 187.99.99.230:60486;branch=z9hG4bK-524287-1---c09a088df6edf0b2;rport
Max-Forwards: 70
Contact: <sip:1711@187.99.99.230:60486;rinstance=37adb9e185656c7e;transport=UDP>
To: <sip:1711@172.20.98.116;transport=UDP>
From: <sip:1711@172.20.98.116;transport=UDP>;tag=47fb0837
Call-ID: _hwcWJj4wzLLz-3QtOm4ZQ..
CSeq: 2 REGISTER
Expires: 60
User-Agent: Zoiper rv2.8.15
Authorization: Digest
username="1711",realm="asterisk",nonce="4447f018",uri="sip:172.20.98.116;transport=UDP",response="62c2b222ea3a3991adb9f6033a42db89",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Sending to 187.99.99.230 : 60486 (NAT)
<--- Transmitting (NAT) to 187.99.99.230:60486 --->
SIP/2.0 403 Forbidden (Bad auth)
Via: SIP/2.0/UDP 187.99.99.230:60486;branch=z9hG4bK-524287-1---c09a088df6edf0b2;received=187.99.99.230;rport=60486
From: <sip:1711@172.20.98.116;transport=UDP>;tag=47fb0837
To: <sip:1711@172.20.98.116;transport=UDP>;tag=as39e8fbec
Call-ID: _hwcWJj4wzLLz-3QtOm4ZQ..
CSeq: 2 REGISTER
User-Agent: Asterisk PBX 1.6.0.26-FONCORE-r78
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '_hwcWJj4wzLLz-3QtOm4ZQ..' in 32000 ms (Method: REGISTER)
VOIPLAB*CLI>
VOIPLAB*CLI>
<--- SIP read from UDP://187.99.99.230:60486 --->
REGISTER sip:172.20.98.116;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 187.99.99.230:60486;branch=z9hG4bK-524287-1---979d841d2a4f0c6a;rport
Max-Forwards: 70
Contact: <sip:1711@187.99.99.230:60486;rinstance=74f9b4ef366ab894;transport=UDP>
To: <sip:1711@172.20.98.116;transport=UDP>
From: <sip:1711@172.20.98.116;transport=UDP>;tag=de2ad62b
Call-ID: ZhlAfWmGzeaqqtS6oZP3wQ..
CSeq: 1 REGISTER
Expires: 60
User-Agent: Zoiper rv2.8.15
Allow-Events: presence, kpml, talk
Content-Length: 0
Espero que alguém possa me ajudar...