[asterisk-bugs] [JIRA] (ASTERISK-21225) Setting nat=force_rport in [general] sip.conf will never work

Michael L. Young (JIRA) noreply at issues.asterisk.org
Mon Mar 11 12:16:01 CDT 2013


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

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

@Alexandre: 1.8 handles the NAT setting differently than 11 does.  In 1.8, the valid settings are "yes" (equivalent to force_rport and comedia), "no", "force_rport", or "comedia"; not a mix of those settings.  In 11, "yes" was deprecated and the ability to combine the settings was added as well as the new auto_force_rport and auto_comedia settings were added.

This patch is not really written for 1.8.  I was actually looking at 1.8 and I do see that 1.8 could benefit from this patch as well but it is going to have to be a different patch due to the differences in the handling of this setting.  Not a major difference but enough to warrant a separate patch.

Yes, the idea is to add these fixes into Asterisk and once approved be added to the releases.

@wdoekes: my thinking was that IPv6 shouldn't have NAT involved at all and therefore "natdetected" should not be turned on for the peer.  I saw in my testing of this patch that a client that was connecting over IPv6 had force_rport being turned on when it was set to auto_force_rport as the NAT setting for the peer or if that was the default global setting.  Do you recommend handling this a different way or would a comment be sufficient?  Should I investigate this further and save that for another patch?
                
> Setting nat=force_rport in [general] sip.conf will never work
> -------------------------------------------------------------
>
>                 Key: ASTERISK-21225
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21225
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 11.2.1
>            Reporter: Alexandre Vezina
>            Assignee: Alexandre Vezina
>            Severity: Minor
>         Attachments: asterisk-21225-handle-options-default-prob_v2.diff
>
>
> I noticed that it was impossible to set nat=force_rport in the general section of sip.conf. It actually has no effect when issuing cli command "sip show settings" (result is Force rport: Auto (No).
> The function to reload configurations in chan_sip.c sets the flag SIP_PAGE3_NAT_AUTO_RPORT in the global flags and the function sip_parse_nat_option in config_parser.c will only add the flag SIP_NAT_FORCE_RPORT if SIP_PAGE3_NAT_AUTO_RPORT is not present.
> So, it seems impossible to raise the flag SIP_NAT_FORCE_RPORT in the [general] section of sip.conf.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list