From: Mike Bradeen Date: Mon, 15 Aug 2022 19:30:53 +0000 (-0600) Subject: res_pjsip: Add user=phone on From and PAID for usereqphone=yes X-Git-Tag: 19.7.0-rc1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9227fb4d52f527e76179e3c03260836e923605f6;p=thirdparty%2Fasterisk.git res_pjsip: Add user=phone on From and PAID for usereqphone=yes Adding user=phone to local-side uri's when user_eq_phone=yes is set for an endpoint. Previously this would only add the header to the To and R-URI. ASTERISK-30178 Change-Id: Id3bfb5d225d762e7d2668c023fe09e4541ae8600 --- diff --git a/doc/CHANGES-staging/res_pjsip_usereqphone.txt b/doc/CHANGES-staging/res_pjsip_usereqphone.txt new file mode 100644 index 0000000000..01d59a7ad9 --- /dev/null +++ b/doc/CHANGES-staging/res_pjsip_usereqphone.txt @@ -0,0 +1,4 @@ +subject: res_pjsip + +user_eq_phone=yes flag on a pjsip endpoint will now set user=phone on +the From and Prviacy headers in addition to the existing To and RURI diff --git a/res/res_pjsip.c b/res/res_pjsip.c index c6d9a89707..0ad5ec23b5 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -905,6 +905,7 @@ pjsip_dialog *ast_sip_create_dialog_uac(const struct ast_sip_endpoint *endpoint, /* Add the user=phone parameter if applicable */ ast_sip_add_usereqphone(endpoint, dlg->pool, dlg->target); ast_sip_add_usereqphone(endpoint, dlg->pool, dlg->remote.info->uri); + ast_sip_add_usereqphone(endpoint, dlg->pool, dlg->local.info->uri); if (!ast_strlen_zero(outbound_proxy)) { pjsip_route_hdr route_set, *route;