Commit 4cfa4f0f authored by Simon Morlat's avatar Simon Morlat
Browse files

enforce transport parameter in automatic contact. See comments in source code for reasons.

parent 235e22d3
......@@ -422,12 +422,18 @@ static void channel_on_sending(belle_sip_channel_listener_t *obj, belle_sip_chan
if (strcmp(transport,"udp")==0){
if (!belle_sip_uri_is_secure(contact_uri))
/* Enforce a transport name in "sip" scheme.
* RFC3263 (locating SIP servers) says that UDP SHOULD be used in absence of transport parameter,
* when port or numeric IP are provided. It is a SHOULD, not a must.
* We need in this case that the automatic Contact exactly matches the socket that is going
* to be used for sending the messages.
* TODO: we may need to do the same for sips, but dtls is currently not supported.
if (!belle_sip_uri_is_secure(contact_uri))
if (port!=belle_sip_listening_point_get_well_known_port(transport)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment