PAP2T-NA conflicts with Grandstream on same network (?)

Very strange thing happening.

On the LAN here in the office, I have a Grandstream BudgeTone 200 and three XLite 3.0 softphones. The Grandstream and two of the XLite softphones both connect to the same extension (with $(GS)&$(XL1)&$(XL2) type notation in extensions.conf so that all three of them will ring on an incoming call). The other XLite softphone connects to a different extension.

All of this works perfectly fine … until I plug a PAP2T-NA into the same LAN and configure it.

When that happens, I am no longer able to receive calls on the Grandstream. I can place calls on the Grandstream but not receive them. I also cannot receive calls on the PAP2T-NA.

If I unplug EITHER the Grandstream or the PAP2T-NA from the network, then I can receive calls on the other one, although I can’t get the phone on the PAP to ring, (that’s covered in another message that I posted here a few minutes ago). Since I know a call is coming in to the PAP, if I pick it up, the call is there … until I plug the Grandstream back into the network, then no more calls will come through.

The XLite softphones continue to receive calls properly, whether or not both the Grandstream and the PAP are connected.

The IP numbers are known to be different (the GS is 192.168.1.3 and the PAP is 192.168.1.9, both of them served by DHCP), so it’s not an IP conflict.

Any ideas?

If I unplug EITHER the Grandstream or the PAP2T-NA from the network, then I can
receive calls on the other one, although I can’t get the phone on the PAP to ring, (that’s
covered in another message that I posted here a few minutes ago). Since I know a call
is coming in to the PAP, if I pick it up, the call is there … until I plug the Grandstream
back into the network, then no more calls will come through.

Actually, I find that that’s not entirely accurate. If I have both the Grandstream and the PAP2 plugged in to the network, it appears that I can receive calls on the PAP2 (if I know the call is there and pick up the phone, since as indicated in earlier messages, I can’t get the PAP2’s connected phone to ring). But, calls to the Grandstream simply don’t make it until I unplug the PAP2.

try changing the local SIP port on either of them from 5060 to 5061. xlite may be using a random port for the outbound connection thus it works…

try changing the local SIP port on either of them from 5060 to 5061

Thanks, that did it. :smile:

I figured it had to be some simple boneheaded misconfiguration like that.

… although I would have thought that if the IPs were different the ports could be the same, but I guess not…

What is the range of port numbers I can use, i.e. 5060 to ??

it’s the local port that matters, since I’m assuming your server is outside your NAT.

When you register the first device, your NAT creates a mapping-
serverip:5060 - yourpublicIP:5060 - grandstream:5060.
then when you register the ATA, it sends a new packet and the mapping is updated-
serverip:5060 - yourpublicIP:5060 - ATA:5060.

Since everything happens on port 5060, you can only have one device inside the nat using the same port and registering to the same port on the same IP outside the nat. The NAT isn’t sure if yourpublicIP:5060 should be used for the grandstream or the ATA, so it remembers whichever one last transmitted data. One device doesn’t work because it’s packet is sent to the other device (which ignores it).

thus you change the local port and you get two correct mappings:

serverip:5060 - yourpublicIP:5060 - grandstream:5060.
serverip:5060 - yourpublicIP:5061 - ATA:5061.

This problem will only happen (in general) when two local devices on the same local port attempt to connect to the same remote address on the same remote port at the same time. Usually the possibility of this happening is statistically impossible, because most devices choose a random local port to connect from. However with VoIP they often use 5060 for a few reasons, but it is generally not needed.

As for which port, you can just just about any port. GS phones have an option like ‘use random local port’ as I recall which assigns some random number, might try this. So you can use any port really, just do it above 5000.

it’s the local port that matters, since I’m assuming your server is outside your NAT.

Of coures.

Everything on the private side of the NAT looks to the (public) Asterisk server like it’s coming from the same (public side of the NAT) IP. So, naturally the ports have to be different.

<sheesh, you’d think I just started doing this network stuff last week…> :frowning:

dont worry about it, we all make dumb mistakes! :smiley:

Last week I spent 20min trying to figure out why two phones could call the server but not each other- problem was half the RTP range was firewalled, edit rtp.conf fixed in about 30sec :smile: