[asterisk-users] troubleshooting NAT

Ott Rose sixfourimpala at hotmail.com
Wed Oct 21 09:00:20 CDT 2009




> Date: Tue, 20 Oct 2009 21:02:29 -0500
> From: asterisklist at callthem.info
> To: asterisk-users at lists.digium.com
> Subject: Re: [asterisk-users] troubleshooting NAT
> 
> if you're using SIP then you look at SIP headers ... SDP part
> from INVITE's and 200 OK to INVITE. You check what IP/port is used for RTP


Here is the SIP header that you see when you run the asterisk -r command.

Reliably Transmitting (NAT) to 216.82.224.202:5060:
OPTIONS sip:216.82.224.202 SIP/2.0
Via: SIP/2.0/UDP ourpublicip:5060;branch=z9hG4bK42ef5901;rport
From: "Unknown" <sip:Unknown at ourpublicip>;tag=as0186791c
To: <sip:216.82.224.202>
Contact: <sip:Unknown at ourpublicip>
Call-ID: 52019c8970f8727a04fd79f0083cce21 at ourpublicip
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 21 Oct 2009 13:33:36 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


Here is a debug from one of our phones calling an external number

SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.1.0.46:5060;branch=z9hG4bKb033ebc8ff0de35dc.650da238f5237c4a1;received=10.0.0.46
From: "me" <sip:117 at 10.1.0.8>;tag=aa5daa3277
To: "95457878" <sip:95457878 at 10.1.0.8>;tag=as0b5e19fc
Call-ID: 2edce254de2a77ab
CSeq: 32330 CANCEL
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:95457878 at 10.1.0.8>
Content-Length: 0


<------------>
  == Spawn extension (from-internal, 95457878, 4) exited non-zero on 'SIP/117-09c4fc20'
    -- Executing [h at from-internal:1] Macro("SIP/117-09c4fc20", "hangupcall") in new stack
    -- Executing [s at macro-hangupcall:1] GotoIf("SIP/117-09c4fc20", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,4)
    -- Executing [s at macro-hangupcall:4] GotoIf("SIP/117-09c4fc20", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s at macro-hangupcall:7] GotoIf("SIP/117-09c4fc20", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s at macro-hangupcall:9] Hangup("SIP/117-09c4fc20", "") in new stack
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/117-09c4fc20' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/117-09c4fc20'

> and then you can try to get some packet dump with tcpdump/wireshark

if am ssh into the server and run  tcpdump not port 22. i get normal LAN traffic until i make a call. then i get a ton of  this. .8 is the phoneserver and .46 is one of the phones. i haven't done wireshark because I haven't looked up how to take the tcpdump and import it into wireshark. 

09:40:58.510750 IP 10.1.0.8.12036 > 10.1.0.46.hbci: UDP, length 172
09:40:58.530758 IP 10.1.0.8.12036 > 10.1.0.46.hbci: UDP, length 172
09:40:58.550762 IP 10.1.0.8.12036 > 10.1.0.46.hbci: UDP, length 172
09:40:58.570770 IP 10.1.0.8.12036 > 10.1.0.46.hbci: UDP, length 172
09:40:58.590775 IP 10.1.0.8.12036 > 10.1.0.46.hbci: UDP, length 172
09:40:58.610781 IP 10.1.0.8.12036 > 10.1.0.46.hbci: UDP, length 172
09:40:58.625026 IP 10.1.0.46.sip > 10.1.0.8.sip: SIP, length: 348
09:40:58.625485 IP 10.1.0.8.sip > 10.1.0.46.sip: SIP, length: 417
09:40:58.625608 IP 10.1.0.8.sip > 10.1.0.46.sip: SIP, length: 435
09:40:58.679832 IP 10.1.0.46.sip > 10.1.0.8.sip: SIP, length: 334





> and maybe configure your router
> so it works.... it's the first thing to look for ...

if the phone server can access the internet then shouldn't that mean the router has NAT setup correctly on it? 

> 
> you can also try to use the stun server ... asterisk has it built in
> ...never used it but saw it's there
> 
> Martin
> 
> On Tue, Oct 20, 2009 at 1:32 PM, Ott Rose <sixfourimpala at hotmail.com> wrote:
> > Can anyone tell me how to troubleshoot NAT issues? We had Freepbx look at
> > your install and they said we are having a NAT problem but didn'ttell me if
> > it was with the asterisk conf or the Cisco ASA.
> >
> > ________________________________
> > Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
> > now.
> > _______________________________________________
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
 		 	   		  
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/171222985/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091021/c0f2e5fb/attachment.htm 


More information about the asterisk-users mailing list