]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_outbound_registration: generate correct Contact URI for TLS 02/2802/2
authorSebastian Damm <damm@sipgate.de>
Tue, 10 May 2016 15:19:48 +0000 (17:19 +0200)
committerJoshua Colp <jcolp@digium.com>
Thu, 12 May 2016 10:34:24 +0000 (05:34 -0500)
commita94a12bbf73c7e643a77e4aa0597e4e49eb5b7ab
tree9b13337d9b3db29a3603d9d0c8919f58f62b096c
parenta01ce2b88912cd802bb045e40fe264906e55bc45
res_pjsip_outbound_registration: generate correct Contact URI for TLS

There are two types of SIP URIs indicating a secure transport:
* sips:user@example.org
* sip:user@example.org;transport=tls

When using a sips URI, Asterisk checks incoming INVITEs and answers from
the other side for sips URIs, and rejects the packet if there are only
sip URIs. So Asterisk should only generate a sips Contact URI if the
other side supports it.

This patch makes Asterisk generate either a sip or sips Contact URI
depending on the format of the server URI.

If you want a sip URI, use:
server_uri=sip:example.org\;transport=tls

If you want a sips URI, use:
server_uri=sips:example.org

ASTERISK-25990 #close
Reported-by: Sebastian Damm
Change-Id: I5ae57d6531ce940b5fc64d5cd2673e60db0f9ba2
res/res_pjsip_outbound_registration.c