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

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Jun 8 11:58:30 CEST 2016


  Branch: refs/heads/2.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 28c19466c8c1ed35213ef8877756710e7c5edbaf
      https://github.com/OpenSIPS/opensips/commit/28c19466c8c1ed35213ef8877756710e7c5edbaf
  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