Merge "res_pjsip/chan_sip: Advertise 'ws' in the SIP URI transport parameter"

This commit is contained in:
Joshua Colp
2016-12-02 12:27:52 -06:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -14158,6 +14158,7 @@ static void build_contact(struct sip_pvt *p, struct sip_request *req, int incomi
char tmp[SIPBUFSIZE];
char *user = ast_uri_encode(p->exten, tmp, sizeof(tmp), ast_uri_sip_user);
int use_sips;
char *transport = ast_strdupa(sip_get_transport(p->socket.type));
if (incoming) {
use_sips = uas_sips_contact(req);
@@ -14172,7 +14173,7 @@ static void build_contact(struct sip_pvt *p, struct sip_request *req, int incomi
} else {
ast_string_field_build(p, our_contact, "<%s:%s%s%s;transport=%s>",
use_sips ? "sips" : "sip", user, ast_strlen_zero(user) ? "" : "@",
ast_sockaddr_stringify_remote(&p->ourip), sip_get_transport(p->socket.type));
ast_sockaddr_stringify_remote(&p->ourip), ast_str_to_lower(transport));
}
}