[asterisk-bugs] [JIRA] (ASTERISK-22236) REGISTER reply send to bad port with nat=yes(or force_rport, comedia) in 11.5.0

Walter Doekes (JIRA) noreply at issues.asterisk.org
Thu Oct 17 09:30:04 CDT 2013


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

Walter Doekes commented on ASTERISK-22236:
------------------------------------------

More confusion:

{noformat}
commit cd5283947e908f6e929ea4b2a6b345169caf15a6
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Jun 26 20:19:49 2009 +0000

    Fix the 'nat' option to actually do RFC3581 as expected and extend the configurable values for finer control.
    
    (closes issue #8855)
    Reported by: mikma
    Tested by: klaus3000, file
    
    
    git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@203735 f38db490-d61c-443f-a65b-d21fe96a405b
{noformat}
{noformat}
asterisk-git$ git show cd5283947 -p | grep ast_cli.*FORMAT
-	ast_cli(a->fd, FORMAT, "Username", "Secret", "Accountcode", "Def.Context", "ACL", "NAT");
+	ast_cli(a->fd, FORMAT, "Username", "Secret", "Accountcode", "Def.Context", "ACL", "ForcerPort");
{noformat}

During that commit. The "N" (NAT) suddenly became "N" (Forcerport), which looks like "no".

Since then, the "A" and "a" options have been added, but "N" still means Forcerport=Yes.

The code now looks like this:
{noformat}
                ast_test_flag(&peer->flags[2], SIP_PAGE3_NAT_AUTO_RPORT) ? 
                        ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) ? " A " : " a " :
                        ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) ? " N " : "   ",    /* NAT=yes? */
{noformat}
but that should be:
{noformat}
                ast_test_flag(&peer->flags[2], SIP_PAGE3_NAT_AUTO_RPORT) ? 
                        ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) ? " A " : " a " :
                        ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) ? " Y " : " N ",    
{noformat}

                
> REGISTER reply send to bad port with nat=yes(or force_rport,comedia) in 11.5.0
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-22236
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22236
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Registration
>    Affects Versions: 11.5.0
>            Reporter: Filip Frank
>            Assignee: Michael L. Young
>            Severity: Critical
>         Attachments: asterisk-2236-always-set-rport.diff, debug_log, debug.txt, iptel412_11_5_0.txt, iptel421_11_5_0.txt, peers_settings.txt, sip_settings_11_5_0.txt
>
>
> I have 2 peers after NAT with same IP, one registers from source port 5060, second registers from port 1114. After upgrade to 11.5.0 only first peer is registered, asterisk send register reply both to 5060 port. I using nat=yes, i try new nat=force_rport,comedia but not helps, I think this is issue in 11.5.0, after downgrade back to 11.4.0 its ok. In 11.4.0 both peers are correctly registered and Asterisk send reply first peer to destination port 5060, second peer to 1114.

--
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