[asterisk-users] NAT and externip problem or configuration problem

Martin Joseph ast at stillnewt.org
Sat Jul 22 13:32:12 MST 2006


On Jul 22, 2006, at 12:54 PM, Robert Jenkins wrote:
<snip>
>>
>> On Jul 22, 2006, at 11:13 AM, Robert Jenkins wrote:
>>
>>> Oh well..
>>>
>>> I already had localnet set:
>>>
>>> localnet = 192.168.0.0          ; Internal NETWORK address
>>> localmask = 255.255.255.0       ; Internal netmask
>>>
>>> All the involved PCs & Sipura boxes are using 192.168.0.x addresses.
>>>
>>> The Sipura boxes work, but the fact that asterisk is sending the
>>> external IP to any device on the local network seems to me to be a
>>> bug..
>>
>>
>> You didn't mention whether you were also forwarding ports
>> 10000-20000 to the SIP Proxy (ie asterisk).  Thats where the
>> actual RTP (voice
>> data) is passing.  Also you need to be sure that there aren't
>> multiple clients on your lan all trying to use the same ports
>> for signaling (ie 5060), as this will fail.
>>
>> Hope this helps.
>> Marty
>>
>
> The simple thing is that if I have 'externip' set, I can see on a  
> soft phone
> (running on a PC on the same local subnet as asterisk) that it's  
> seeing a
> call from another local device as coming from 2001 at 212.xx.xx.xx -  
> which is
> the external IP and as everything is inside the firewall there is  
> no audio
> from the soft phone when the call answered.
>
> If I comment out the 'externip' line & restart asterisk, the soft  
> phone then
> correctly sees the local call as being from 2001 at 192.168.0.xx and I  
> get
> two-way speech.
>
>
> Re. multiple clients using port 5060, I have seen comments both ways..
> This is how I have it at present and it works (without externip, which
> appears to be down to asterisk sending the wrong info & nothing to  
> do with
> ports).
> As has been said elsewhere, if online VoIP services with thousands of
> connections work with a single port, why should there be a problem  
> smaller
> numbers of clients?

They are exposed as a single IP address.  A single port 5060 is fine  
for your asterisk box.  BUT if you expect calls from  the outside of  
your LAN to pass to SIP phones on the inside of your LAN, you need to  
do one of two things. 1) Use separate ports for the softphones  so  
the NAT isn't confused, or 2) make sure canreinvite is set to no in  
your extensions for the softphone.

If you don't do one of those two things, then what will happen is  
that the caller from outside will connect to the softphone inside,  
and then attempt to talk directly to the softphone.  BUT since your  
router is forwarding all port 5060 traffic to your asterisk box you  
are no longer talking to each other.

You don't mention whether your test calls are coming from inside your  
lan or outside?  You aren't by chance running on a softphone on the  
asterisk box directly?

Marty




More information about the asterisk-users mailing list