[Asterisk-code-review] res_pjsip: Add user=phone on From and PAID for usereqphone=yes (asterisk[certified/18.9])

Michael Bradeen asteriskteam at digium.com
Tue Sep 13 10:41:50 CDT 2022


Michael Bradeen has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/19251 )


Change subject: res_pjsip: Add user=phone on From and PAID for usereqphone=yes
......................................................................

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
---
A doc/CHANGES-staging/res_pjsip_usereqphone.txt
M res/res_pjsip.c
2 files changed, 19 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/51/19251/1

diff --git a/doc/CHANGES-staging/res_pjsip_usereqphone.txt b/doc/CHANGES-staging/res_pjsip_usereqphone.txt
new file mode 100644
index 0000000..01d59a7
--- /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 d722bbe..72d8e0e 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -905,6 +905,7 @@
 	/* 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;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19251
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: certified/18.9
Gerrit-Change-Id: Id3bfb5d225d762e7d2668c023fe09e4541ae8600
Gerrit-Change-Number: 19251
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220913/351d2659/attachment-0001.html>


More information about the asterisk-code-review mailing list