[Asterisk-code-review] res_pjsip_pidf_digium_body_supplement: Support Sangoma user agent. (asterisk[master])

Friendly Automation asteriskteam at digium.com
Wed Dec 16 09:04:14 CST 2020


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

Change subject: res_pjsip_pidf_digium_body_supplement: Support Sangoma user agent.
......................................................................

res_pjsip_pidf_digium_body_supplement: Support Sangoma user agent.

This adds support for both Digium and Sangoma user agent strings
for the Sangoma specific body supplement.

Change-Id: Ib99362b24b91d3cbe888d8b2fce3fad5515d9482
---
M res/res_pjsip_pidf_digium_body_supplement.c
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/res/res_pjsip_pidf_digium_body_supplement.c b/res/res_pjsip_pidf_digium_body_supplement.c
index 832f423..4150340 100644
--- a/res/res_pjsip_pidf_digium_body_supplement.c
+++ b/res/res_pjsip_pidf_digium_body_supplement.c
@@ -42,9 +42,11 @@
 	pj_xml_node *node;
 	char sanitized[1024];
 
+	/* The res_pjsip_exten_state module converts the user agent to lower case */
 	if (ast_strlen_zero(state_data->user_agent) ||
-	    !strstr(state_data->user_agent, "digium")) {
-		/* not a digium phone */
+	    (!strstr(state_data->user_agent, "digium") &&
+		!strstr(state_data->user_agent, "sangoma"))) {
+		/* not a Sangoma phone */
 		return 0;
 	}
 
@@ -107,7 +109,7 @@
 	return 0;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP PIDF Digium presence supplement",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP PIDF Sangoma presence supplement",
 	.support_level = AST_MODULE_SUPPORT_CORE,
 	.load = load_module,
 	.unload = unload_module,

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ib99362b24b91d3cbe888d8b2fce3fad5515d9482
Gerrit-Change-Number: 15248
Gerrit-PatchSet: 2
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201216/26c3fb43/attachment.html>


More information about the asterisk-code-review mailing list