[asterisk-users] Can't make asterisk work...how to test?

D. Dante Lorenso dante at larkspark.com
Fri Jun 20 11:59:26 CDT 2008


All,

I did finally get my server up and running.  I thought I'd share some 
tools I used.

1) use this to see if asterisk is even listening on port 5060 with UDP

   > nmap -sU -p5058-5062 localhost

   Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at
      2008-06-20   10:49 CDT
   Interesting ports on localhost.localdomain (127.0.0.1):
   PORT     STATE         SERVICE
   5058/udp closed        unknown
   5059/udp closed        unknown
   5060/udp open|filtered sip
   5061/udp closed        unknown
   5062/udp closed        unknown

   Nmap finished: 1 IP address (1 host up) scanned in 1.224 seconds

2) use TCPdump to see of any traffic is going through the sip port

   > tcpdump -v -pi eth0 udp port 5060

   tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture
     size 96 bytes
   11:55:39.155542 IP (tos 0x0, ttl  51, id 8710, offset 0, flags [DF],
     proto: UDP (17), length: 779) 100.ipcomms.net.sip >
     asterisk.larkspark.dev.sip: SIP, length: 751
         INVITE sip:8175331074 at xx.xxx.xxx.38 SIP/2.0

3) turn on sip debugging in asterisk

   > asterisk -cvvvvvvvvvv
   asterisk*CLI> sip set debug

Eventually I did find a few problems and was able to correct them.  It's 
pretty much just what Adrian suggested.

-- Dante






Adrian Marsh wrote:
> Most SIP clients have a logging ability.. you can use those.. but
> turning on debug on the server is the best mechanism, as its whats going
> on there that counts.
> 
> sip set debug <options>
> 
> And if you want to get really into the lower levels, then tcpdump will
> let you capture the packets for offline analysis in wireshark.
> 
> Nmaping against locahost wont tell you much other than an app has 5060
> open.. it wont tell you if firewalls are blocking things, or if NAT is
> an issue.
> 
> Adrian
> 
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of D. Dante
> Lorenso
> Sent: 20 June 2008 03:14
> To: 'Asterisk Users List'
> Subject: [asterisk-users] Can't make asterisk work...how to test?
> 
> All,
> 
> I've put a new asterisk server at another location and can't seem to get
> 
> it working.  What's the best strategy to debug connections?
> 
> I'm doing inbound SIP only and have installed the server in the same way
> 
> as I did on my DEV server.  Running an nmap on localhost shows the port 
> listening:
> 
> ----------
> [asterisk]/> nmap -sU localhost
> 
> Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-06-19 21:12
> CDT
> Interesting ports on localhost.localdomain (127.0.0.1):
> Not shown: 1476 closed ports
> PORT      STATE         SERVICE
> ...
> 5060/udp  open|filtered sip
> ...
> ----------
> [planet]/etc/asterisk> nmap -sU localhost
> 
> Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-06-19 20:11
> CDT
> Interesting ports on localhost.localdomain (127.0.0.1):
> Not shown: 1484 closed ports
> PORT     STATE         SERVICE
> ...
> 5060/udp open|filtered sip
> ...
> ----------
> 
> Is there a command-line tool I can run that will attempt a SIP 
> connection to a SIP server and provide some diagnostics about whether it
> 
> could authenticate or even connect?
> 
> 
> -- Dante
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> 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 --
> 
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 




More information about the asterisk-users mailing list