[asterisk-bugs] [JIRA] (ASTERISK-24687) Asterisk behind NAT sets wrong Contact Header

Michael L. Young (JIRA) noreply at issues.asterisk.org
Mon Jan 26 15:33:34 CST 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224639#comment-224639 ] 

Michael L. Young commented on ASTERISK-24687:
---------------------------------------------

Lukas,

In an earlier comment, you mentioned that the server's LAN address is 192.168.122.120.

In the debug logs you posted today, I am seeing that the 13.1 server has a LAN address of 192.168.122.99.

The 11.7 server has a LAN address of 192.168.122.104.

Can you please post the _sip settings_ for both servers?  Can we verify that the {{externaddr}} and {{localaddr}} settings for both servers are the same?

The reason why is that I am looking at the code and not seeing anything out of the ordinary yet.  But, I do see this in the logs.

*11.7*
{noformat}
[Jan 26 10:50:55] DEBUG[1167] acl.c: For destination '#PhonesPublicIP#', our source address is '192.168.122.104'.
[Jan 26 10:50:55] DEBUG[1167] chan_sip.c: Target address #PhonesPublicIP#:2048 is not local, substituting externaddr
[Jan 26 10:50:55] DEBUG[1167] chan_sip.c: Setting SIP_TRANSPORT_UDP with address #ServersPublicIP#:5060
{noformat}

*13.1*
{noformat}
[Jan 26 10:28:02] DEBUG[1380] acl.c: For destination '#PhonesPublicIP#', our source address is '192.168.122.99'.
[Jan 26 10:28:02] DEBUG[1380] chan_sip.c: Setting AST_TRANSPORT_UDP with address 192.168.122.99:5060
{noformat}

The function that determines if the address is local or external appears to be identical in both versions of Asterisk.  So, it would be good to get confirmation that since we appear to be working with two different machines here with these logs, that the settings are indeed identical on both machines.

Thank you

> Asterisk behind NAT sets wrong Contact Header
> ---------------------------------------------
>
>                 Key: ASTERISK-24687
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24687
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 13.1.0
>         Environment: ubuntu 14.04.1
>            Reporter: Lukas Hauser
>            Assignee: Lukas Hauser
>            Severity: Critical
>         Attachments: debug.log, deubg-asterisk11.log, sip-settings.log
>
>
> If asterisk is behind a statically configured NAT (e.g. with iptables), the externaddr or localnet option does not work.
> The Contact Header still contains the private IP address.
> The media_address option works.
> It also works as defined with version 11.7.0~dfsg-1ubuntu1.
> The Contact Header does not get updated in version 13.1 and 13.1.0-rc2.
> Therefore, I guess it is a bug in 13?
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list