SIP Channels unable to register internal or external

Hi there,

The Problem:

  • No SIP devices (Linksys SPA941 phones and a WM6.1 softphone) all on the network can register.
  • No SIP Trunks can register (2 Trunks with WorldXchange VXF service, 1 Trunk with 2Talk)

Asterisk Info Reports:

Sip Registry

Host dnsmgr Username Refresh State Reg.Time N 028nnnnnnnn 120 Unregistered N 6825nnnn 120 Request Sent N 6825nnnn 120 Request Sent
3 SIP registrations.

Sip Peers

Name/username Host Dyn Nat ACL Port Status
201 (Unspecified) D N A 5060 UNKNOWN
221 (Unspecified) D N A 5060 UNKNOWN
230 (Unspecified) D N A 5060 UNKNOWN
2Talk/028nnnnnnnn N 5060 Unmonitored
6825nnnn/MyUsernamexxxxxx N 5060 Unmonitored
6825nnnn/MyUsername2xxxxx N 5060 Unmonitored
6 sip peers [Monitored: 0 online, 3 offline Unmonitored: 3 online, 0 offline]

The Environment:
I have just done a complete rebuild of my Asterisk box using the
AsteriskNow 1.7.0 iso distro from:
This installs Centos 5.5 and Asterisk 1.6x.

After install I updated FreePBX to the latest builds:
Core FreePBX
DAHDi Config 2.7.0
Feature Code Admin
FreePBX Framework
System Dashboard
Info Services
Music on Hold
Asterisk Info
Backup & Restore
Custom Applications

The hardware is:
P4 2.8Mhz box with 1Gb RAM
Dual NIC’s
OpenVox card with 4 FXO’s installed (actually no longer needed)

The Network:
Static IP
no default Gateway
attached to my fully internal network and this is where my SIP phones live.

Configured by DHCP but assigned a fixed address based on the MAC address.
Default GW
This is in my “quazi-DMZ” zone talking to a DLink DSL-502T Router.

Also on the network is a Win2003 SBS machine which does among other things routing to the Internet between the the two Zones.

The D-Link Router has Ports 5000-6000 UDP/TCP opened and pointing to IP
And Ports 10000-20000 also pointing to IP (the Asterisk box)

What have I tried:
Following some of the posts I have the following in /etc/asterisk/sip_general_custom.conf:


Internet and routing appears to be working correctly:
Internal network -
[[email protected] ~]# traceroute
traceroute to (, 30 hops max, 40 byte packets
1 pbx01.avs.local ( 3000.994 ms !H 3000.980 ms !H 3000.965 ms !H

Internet addresses:

[[email protected] ~]# traceroute
traceroute to (, 30 hops max, 40 byte packets
1 mygateway1.ar7 ( 0.800 ms 1.286 ms 1.553 ms
2 ( 95.126 ms 96.276 ms 98.468 ms
3 ( 54.891 ms 55.868 ms 56.734 ms
4 ( 57.999 ms 58.882 ms 60.767 ms
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *

SELinux and IPTables are both disabled.

When I tried checking for ports however I couldn’t connect on 5060 (though this may also be my own ineptitude as my Linux knowledge is rusty and limited).

VXF Trunk settings as entered through FreePBX:

Trunk Description: AVSVXFLine

Outbound CID: 06825nnnn

CID Options: Any

Max Channels: 2

Trunk Name: 06825nnnn

Peer Details:
useragent=Asterisk PBX
register=6825nnnn:MySecretxxxxxxxxx:[email protected]/6825nnnn

User Context: 6825nnnn

User Details:

Register String:
6825nnnn:MySecretxxxxxxxxxx:[email protected]/6825nnnn


SIP Extensions:

This device uses sip technology.

secret MySecret
dtmfmode rfc2833
canreinvite no
context from-internal
host dynamic
type friend
nat yes
port 5060
qualify yes
dial SIP/201
mailbox [email protected]


I have istalled Asterisk a number of times without having trouble in the past. The difference this time is using the dual NIC scenario as I wanted to delete the PAPT devices that were previously in the DMZ zone and were used to connect to WorldxChange which was at the time my only VoIP provider.

What suggestions / tests / configuration changes can you offer? Please be specific with your instructions, since although I know my way around a keyboard my Linux is limited.

Thanks a heap,

Sounds like you’ve got a routng problem. Can you ping the tnternal phones/devices from the phone server?

Yes, also can ping the remote servers no problem, whether by ip address or name.

Just to be sure here is the output:

Pinging SIP Phones from Asterisk Box:

PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=250 time=1.98 ms
64 bytes from icmp_seq=2 ttl=250 time=0.770 ms
64 bytes from icmp_seq=3 ttl=250 time=0.768 ms

— ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.768/1.173/1.981/0.571 ms

Pinging WxC server from Aterisk Box:

PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=60 time=51.9 ms
64 bytes from ( icmp_seq=2 ttl=60 time=50.3 ms
64 bytes from ( icmp_seq=3 ttl=60 time=51.0 ms
64 bytes from ( icmp_seq=4 ttl=60 time=52.0 ms ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 4971ms
rtt min/avg/max/mdev = 50.327/51.362/52.086/0.731 ms

Traceroute to WxC

traceroute -p 5060 -I
traceroute to (, 30 hops max, 40 byte packets
1 mygateway1.ar7 ( 2.090 ms 2.402 ms 2.684 ms
2 ( 56.222 ms 57.592 ms 58.015 ms
3 ( 61.096 ms 62.626 ms *
4 mygateway1.ar7 ( 4.659 ms 4.832 ms 4.999 ms

Traceroute to one of SIP Phones

traceroute -p 5060 -I
traceroute to (, 30 hops max, 40 byte packets
1 ( 2.124 ms 2.320 ms 2.506 ms

Hopefully this can tell you someting useful.

I’m at a complete loss as where the problem lies.

Thanks again for helping.

This is probably a networking issue that you will have to look at closer.

In addition, your external trunks are not going to work with:


That is telling Asterisk to masquerade as for anything not on the subnet. (And if this is what you really want, you should be using externip anyhow, and no need for externrefresh).

The fact that your internal extensions are having problems also points to more networking issues, plus you are “trying too hard” putting all these sip settings. On a properly configured setup everything should “just work” without all these settings besides the the externip/externhost/localnet that is sometimes needed for external trunks. (And … you should use the Asterisk SIP Settings module in the tools tab to configure any of these sip settings.)

Thanks for the feedback.

I have reconfigured the network cards by making eth0 be in the dmz zone and eth1 internal.

Also I have added Asterisk SIP Settings module. Not sure why I missed that one…

After a reset on my accounts at WxC. I’m in business in terms of active registrations etc.

Thanks for the help.