[OpenSIPS-Devel] [OpenSIPS/opensips] 2ca9e1: Fix evaluating the SIP port from a SIP URI.

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Jun 8 12:04:50 CEST 2016


  Branch: refs/heads/2.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2ca9e1d26c9e01de0c0b23737b949d5b655b54d5
      https://github.com/OpenSIPS/opensips/commit/2ca9e1d26c9e01de0c0b23737b949d5b655b54d5
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2016-06-08 (Wed, 08 Jun 2016)

  Changed paths:
    M modules/dispatcher/dispatch.c
    M modules/nathelper/nathelper.c
    M modules/rr/loose.c
    M parser/parse_uri.h

  Log Message:
  -----------
  Fix evaluating the SIP port from a SIP URI.

Use the new function get_uri_port() to evaluate the port and proto, in a SIP wise manner, form a SIP URI. If port/proto are not explicitly set in the URI, consider the default port for the used transpor proto. If protocol misses, we assume the default protos according to the URI schema.

NOTE: it is completly bogus (and dangerous) to assue 5061 if SIPS schema is used as:
1) SIPS can use used with WSS, which actually has 443 port
2) TLS can pe required via transport param in a SIP schema URI too

(cherry picked from commit 4c54bcd8bf0426f899b82505e493c97ef5378c79)




More information about the Devel mailing list