[asterisk-bugs] [JIRA] (ASTERISK-22071) chan_sip doesn't respect Via ..completely

Walter Doekes (JIRA) noreply at issues.asterisk.org
Tue Jul 30 04:33:03 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-22071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Walter Doekes updated ASTERISK-22071:
-------------------------------------

    Attachment: asterisk-11.{2.1,4.0}-channels-chan_sip.c.diff

For the record, the changes between 2.1 and 4.0:

I suppose this change is the culprit:

{noformat}
@@ -28153,7 +28258,10 @@ static int handle_request_do(struct sip_
        owner_chan_ref = sip_pvt_lock_full(p);

        copy_socket_data(&p->socket, &req->socket);
-       ast_sockaddr_copy(&p->recv, addr);
+
+       if (ast_sockaddr_isnull(&p->recv)) { /* This may already be set before getting here */
+               ast_sockaddr_copy(&p->recv, addr);
+       }

        /* if we have an owner, then this request has been authenticated */
        if (p->owner) {
{noformat}

As changed in:
{noformat}
------------------------------------------------------------------------
r382322 | elguero | 2013-03-01 05:28:22 +0100 (Fri, 01 Mar 2013) | 34 lines

Fix / Clean Up Some Items To Handle The New auto_* NAT Options

The original report had to do with a realtime peer behind NAT being pruned and
the peer's private address being used instead of its external address.  Upon
debugging, it was discovered that this was being caused by the addition of
the auto_force_rport and auto_comedia settings.

This patch does the following:

* Adds a missing note to the CHANGES file indicating that the default global nat
  setting is auto_force_rport

* Constify the 'req' parameter for check_via()

* Add calls to check_via() in a couple of places in order for the auto_*
  settings to do their job in attempting to determine if NAT is involved

* Set the flags SIP_NAT_FORCE_RPORT and SIP_PAGE2_SYMMETRICRTP if the auto_*
  settings are in use where it was needed

* Moves the copying of peer flags up in build_peer() to before they are used;
  this fixes the realtime prune issue

* Update the contrib/realtime schemas to allow the nat column to handle the
  different nat setting combinations we have

This patch received a review and "Ship It!" on the issue itself.

(closes issue ASTERISK-20904)
Reported by: JoshE
Tested by: JoshE, Michael L. Young
Patches:
  asterisk-20904-nat-auto-and-rt-peersv2.diff Michael L. Young (license 5026)

------------------------------------------------------------------------
{noformat}

I'm not sure if that change is correct.

handle_request_do:

p = find_call(req, addr, req->method);

We get an old dialog which has ->recv set and we decide to keep the old recv. That seems wrong..
                
> chan_sip doesn't respect Via ..completely
> -----------------------------------------
>
>                 Key: ASTERISK-22071
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22071
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 11.4.0
>         Environment: CentOS 6.4
>            Reporter: Alex Zarubin
>            Assignee: Mark Michelson
>         Attachments: asterisk-11.{2.1,4.0}-channels-chan_sip.c.diff, ASTERISK-22071.patch, AsteriskJira22071.txt, issue_22071_0715_11.5.0-rc2, issue_22071_gen, issue_22071_log11.2.1, issue_22071_sipsettings, sip.conf, sipsettings
>
>
> The same exact sip call works in 11.2.1 and fails in 11.4. Outbound call is established normally via proxy. BYE comes from proxy with <proxy ip/port> in first Via header. 11.4 adds received=<carrier ip/port> and sends OK there. BYE is repeated several times.
> Will try to attach sip.conf and trace once this jira issue is created. Thank you.

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