mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
res_pjsip.c: Fix Contact header rendering for IPv6 addresses.
Fix suggested by @nvsystems.
Fixes #985
(cherry picked from commit 1c0fcd583d
)
This commit is contained in:
committed by
Asterisk Development Team
parent
6d98127a75
commit
94fcb3174b
@@ -1143,9 +1143,9 @@ static pjsip_dialog *create_dialog_uas(const struct ast_sip_endpoint *endpoint,
|
||||
contact.slen = pj_ansi_snprintf(contact.ptr, PJSIP_MAX_URL_SIZE,
|
||||
"<%s:%s%s%s%.*s%s:%d%s%s>",
|
||||
uas_use_sips_contact(rdata) ? "sips" : "sip",
|
||||
(type & PJSIP_TRANSPORT_IPV6) ? "[" : "",
|
||||
S_OR(endpoint->contact_user, ""),
|
||||
(!ast_strlen_zero(endpoint->contact_user)) ? "@" : "",
|
||||
(type & PJSIP_TRANSPORT_IPV6) ? "[" : "",
|
||||
(int)transport->local_name.host.slen,
|
||||
transport->local_name.host.ptr,
|
||||
(type & PJSIP_TRANSPORT_IPV6) ? "]" : "",
|
||||
|
Reference in New Issue
Block a user