[Asterisk-code-review] res pjsip: Add/update ERROR msg if invalid URI. (asterisk[certified/13.13])

Anonymous Coward asteriskteam at digium.com
Mon Dec 19 23:26:35 CST 2016


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4628 )

Change subject: res_pjsip: Add/update ERROR msg if invalid URI.
......................................................................


res_pjsip: Add/update ERROR msg if invalid URI.

ASTERISK-24499

Change-Id: Ie305153e47e922233b2ff24715e0e326e5fa3a6c
---
M res/res_pjsip.c
M res/res_pjsip_session.c
2 files changed, 4 insertions(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 91daa7f..0f13687 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -2909,7 +2909,8 @@
 	res = pjsip_dlg_create_uac(pjsip_ua_instance(), &local_uri, NULL, &remote_uri, &target_uri, &dlg);
 	if (res != PJ_SUCCESS) {
 		if (res == PJSIP_EINVALIDURI) {
-			ast_log(LOG_ERROR, "Could not create dialog to endpoint '%s' as URI '%s' is not valid\n",
+			ast_log(LOG_ERROR,
+				"Endpoint '%s': Could not create dialog to invalid URI '%s'.  Is endpoint registered?\n",
 				ast_sorcery_object_get_id(endpoint), uri);
 		}
 		return NULL;
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 9e363a1..60850f0 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -1736,6 +1736,8 @@
 
 	/* If we still have no URI to dial fail to create the session */
 	if (ast_strlen_zero(uri)) {
+		ast_log(LOG_ERROR, "Endpoint '%s': No URI available.  Is endpoint registered?\n",
+			ast_sorcery_object_get_id(endpoint));
 		return NULL;
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/4628
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie305153e47e922233b2ff24715e0e326e5fa3a6c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list