mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Merge "res_pjsip/chan_sip: Advertise 'ws' in the SIP URI transport parameter"
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user