Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

res_pjsip.c: Add the contact_user to the Contact header #232

Merged
merged 1 commit into from Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion res/res_pjsip.c
Expand Up @@ -1000,9 +1000,11 @@ static pjsip_dialog *create_dialog_uas(const struct ast_sip_endpoint *endpoint,

contact.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE);
contact.slen = pj_ansi_snprintf(contact.ptr, PJSIP_MAX_URL_SIZE,
"<%s:%s%.*s%s:%d%s%s>",
"<%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)) ? "@" : "",
(int)transport->local_name.host.slen,
transport->local_name.host.ptr,
(type & PJSIP_TRANSPORT_IPV6) ? "]" : "",
Expand Down