7/15/12

Softphone wouldn't register with AsteriskNOW

Situation: AsteriskNOW is running in a Parallels virtual machine on my laptop.  A hardware phone registers to it just fine, but a soft phone won't.  Why?  Because the virtual machine was using bridged networking.  Switching to shared networking fixed the problem.  Along the way, I learned two interesting commands.

Here's how to see all the UDP port bindings in CentOS:

[root@localhost ~]# netstat -apnu
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:53 0.0.0.0:* 2774/dnsmasq
udp 0 0 0.0.0.0:33590 0.0.0.0:* 2754/avahi-daemon
udp 0 0 0.0.0.0:961 0.0.0.0:* 2057/rpc.statd
udp 0 0 0.0.0.0:5060 0.0.0.0:* 2680/asterisk
udp 0 0 0.0.0.0:964 0.0.0.0:* 2057/rpc.statd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1791/dhclient
udp 0 0 0.0.0.0:4569 0.0.0.0:* 2680/asterisk
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2754/avahi-daemon
udp 0 0 0.0.0.0:111 0.0.0.0:* 2017/portmap
udp 0 0 :::53 :::* 2774/dnsmasq
udp 0 0 :::41040 :::* 2754/avahi-daemon
udp 0 0 :::5353 :::* 2754/avahi-daemon

Here's how to see what, if anything, is using a particular port:

[root@localhost ~]# lsof -i:5060
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
asterisk 2680 asterisk 14u IPv4 7935 0t0 UDP *:sip