[asterisk-users] Asterisk sends the INTERNAL IP address of my equipments to my SIP friends?!?

Matthew J. Roth mroth at imminc.com
Thu Jun 13 09:20:59 CDT 2013


Mickael MONSIEUR wrote:
>
> My version is Asterisk 1.6.2.9.
>
> Or have you seen NAT ? I have no NAT on my network . Have you seen my little
> diagram above ?
>
> Here it is:
>
> SIP friends (phones) <-----> Asterisk <-----> SIP gateway to PSTN converter
> 80.236.215.61                109.69.217.6     internal IP ( 10.4.0.10/255.255.255.0 )
>
> My Asterisk server has two NIC/interfaces.
>
> - 1 interface with public IP (109.69.217.6 to talk with SIP friends )
> - 1 interface with internal ip ( 10.4.0.1 to talk with SIP gateway's)
>
> SIP friend should not even know that the call is routed to the SIP /PSTN
> gateway .
> It could be a SIP trunk to a SIP provider Internet , the user does not have to
> know. ..


Mickael,

It's hard to be certain without seeing a full SIP trace, but I think the INVITE
with the internal IP is actually a re-INVITE that Asterisk is sending to
establish a native bridge between the SIP friend and the SIP gateway to PSTN
converter.  This would allow the endpoints to send their media directly to one
another, but in your case I'd expect it to cause one-way audio because the SIP
friend shouldn't be able to send RTP packets to the internal IP.

If it's a re-INVITE, start by reconfiguring Asterisk with "directmedia=no" in
the [general] section of sip.conf and for all of the endpoints involved in the
calls.  That should completely eliminate the re-INVITEs at the expense of
relaying all RTP through Asterisk, even for calls between two phones on the
internal network.  After you've confirmed that internal IPs are no longer being
sent to external endpoints you can start fine-tuning the NAT SUPPORT and MEDIA
HANDLING settings in sip.conf to only allow re-INVITEs when appropriate for your
environment.

Regards,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer



More information about the asterisk-users mailing list