DHCP and Static addresses don't work... differently

Globalscale GplugD Marvell Armada 168- Debian 2.6.29
FreePBX 2.9.0beta1.8
Ubiquiti Bullet 2/HP

The install of Asterisk and FreePBX went without any errors or other drama. I have run the system in two basically different ways. One has the GplugD connected to my home router. In this configuration, the GplugD gets its IP via DHCP from the router. With this setup, I can connect to the GplugD via WiFi and talk to FreePBX without issue. All bars are green. When I attempt to register a soft phone from my iPhone (I’ve used Media5 Phone, 3CX, Vimmee and V Phone) I get a green light on the phone showing it is connected however, Asterisk reports no phones connected and SIP SHOW PEERS reports all phones either unreachable or unknown, depending on whether I have qualify= yes.

With the system operating like this, I can *97 or *98 and get to the voicemail just fine. I can leave, retrieve, delete and change VM passwords just fine from the partially registered phone. Audio sounds great and the system in very responsive. Here’s the kink in this though. Only one phone can connect to Asterisk at a time. If I watch the data at the CLI> prompt I can see the first phone and all the messages fly by. However, a second phone attempting to register will not be seen until the first phone completely disconnects (as in stop the app and release port 5060). It appears that port 5060 is locked until the first phone gets done. So I assume a handoff to another port is not happening.

A port scan over the WiFi of the GplugD shows the ports I would expect to see as being open.

Again, watching at the CLI> prompt with verbosity set to 3 I see the following when a phone attempts to register

4004 registered @ 75.211.XX.XX // Unknown address. Is this some internal Asterisk virtual network???
4004 registered @ // My iPhone address at the moment
4004 unregistered

This all occurs the instant the phone attempts to register.

To me, this looks like a handshake has failed. The phone sees the Asterisk server and the register message but fails to map to wherever Asterisk expects it to go. Asterisk fails to see an ACK it’s expecting so it unregisters the phone. Is this logical/reasonable to assume.?

I would normally expect this to be some sort of Natting issue. However, there is no Nat on this network and everything should be local to the network. One note though, in the extensions setup Nat must be set to route no rport. Yes does not seem to work and neither does no.

Now, on to the second scenario. GplugD connected to the Ubiquiti Bullet. The Bullet is configured to be a wireless AP in Bridge mode. The Ubiquiti does not hand out a DHCP address to the GplugD via its ethernet port (normally where a gateway sits for the Internet).

The Ubiquiti’s Web interface sits at by default so I have not changed that at all. I have set a static IP on the GplugD at I am running a DHCP server on the GplugD and the Ubiquiti seems happy. I can access the Ubiquiti Web Interface at and FreePBX at from any WiFi connected devices. However, when I try to register a phone to Asterisk, I get nothing at all. Watching the CLI> prompt shows no traffic from the phone. A port scan of the box shows that port 5038 is open and all ports above 5000 are closed.

Asterisk is clearly running because I can query it both from the console as well as FreePBX. FreePBX works as before (all green lights and I can change any parameters I want). I can query Asterisk via the CLI interface in FreePBX (very cool feature BTW). It is as though the Asterisk server does not know what IP address it is supposed to be pointed to.

So I guess all of this post can be distilled down to:

What’s different between a DHCP and Static IP as far as Asterisk is concerned?
If there is no NAT on the network, why can I only get one phone to partially register at a time.

I’m just looking for a little direction to narrow my search down for solutions.


Thanks for the reply.

Obviously, I’m confused at this point. Let me give a little more information. I have a separate linux box running Asterisk Now sitting at a DHCP assigned address of When the plug computer is assigned a DHCP address it has been sitting at When I point the soft phones (iPhone and iPad) at the Asterisk Now box. I can make and receive calls just fine. When I point the phones at the Plug computer I get the symptoms I’ve described. Nothing has been changed on the network and only the IP address address of the Asterisk server has been changed on the phones to point them at the Plug computer.

Can you explain why when I do a netstat -an with a DHCP assigned address I see port 5060 as Listening and when I issue the same command on the same box with a static IP set I see port 5060 listed as *.

Netstat does not see the network or the router, does it? It only shows what the computer thinks its ports are doing, right? How is it that FreePBX works if I’m on the wrong subnet? The IP address is the IP address, right? The box is either reachable at 192.168.1.XX or it isn’t. As to your statement about a program not being able to determine whether the address is derived from DHCP or Statically assigned I would probably agree with that. However, there is a difference if an app is using as its address localhost at and a hard Static IP. If the app does not resolve the computers IP address correctly and does not continue to run at localhost or it would produce the symptoms that I am seeing, I think.

When I run ifconfig I see the correctly assigned Static IP. FreePBX shows in its banner the Static IP as well. Only Asterisk seems to be affected.

Is there some test or log I can look at or provide to gain some additional insight as to what is happening?



That was a quick note, and the “other issues” was a reference to the network, clearly not personal.

I would go so far as to say that Asterisk can’t possibly know if a host received an IP from a DHCP server or has one assigned statically. No application that is not watching the DHCP logs or interacting with the DHCP server can obtain this data.

I have to make the assumption that some option is being sent via DHCP.

It could be a boot server option causing the phone to pickup an incorrect config.

An incorrect subnet mask, possibly an odd gateway, though I think you are trying to say that everything is in the same collision domain/network.

This statement makes no sense:

Portscan and ICMP ping traffic can traverse networks via gateways, the only item that defines a network is an IP and it’s associated subnet mask. Hence the comment to look at the subnet mask assigned during the DHCP to make sure that the assigned mask matches the network that the Asterisk box is on.

Does this make sense?

Thank you for your response. Unfortunately, I have no idea what you are saying.

Are you making a statement saying that there is no difference in the way Asterisk deals with a DHCP derived address vs a static IP because if that’s the case then I’d have to take exception to your opinion as changing from one to the other has clearly caused a change in symptoms.

As to having other issues, I can only say that I’m sure that’s true on a personal level but without further explanation on your part I have no way of guessing what they might be on an Asterisk/FreePBX level.

Your suggestion about subnet mask has no meaning unless you give a hint as to where you think the subnet mask might be incorrect.

Since I can ping/portscan the Linux Box from all the WiFi connected devices on the net I would have to conclude that they are all sitting on the same subnet. I can actually put another box running the i86 iso of FreePBX on the same network and using the same softphones connect and talk perfectly normally through the system. So, I’m pretty much willing to rule out the network as the culprit. This network does not face the Internet at all so there is no external network and no natting.

The biggest symptom I can see is that when I netstat -an on the box when I am using a DHCP derived address I see 5060 listed as listening and when the box is sitting with a static IP I see 5060 *.

So, perhaps you could suggest something a little more tangible for me to look at or try.

Thank you.

There is no difference, you have other issues. Have you checked subnet masks?