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

Friendly Automation asteriskteam at digium.com
Wed Sep 14 07:20:14 CDT 2022


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18973 )

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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




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 c52ceec..e072c84 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -870,6 +870,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/+/18973
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Id3bfb5d225d762e7d2668c023fe09e4541ae8600
Gerrit-Change-Number: 18973
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220914/b57e6167/attachment-0001.html>


More information about the asterisk-code-review mailing list