[Asterisk-code-review] res pjsip: Change log message from error to warning for vali... (asterisk[15])

Florian Floimair asteriskteam at digium.com
Tue Jul 24 07:18:04 CDT 2018


Florian Floimair has uploaded this change for review. ( https://gerrit.asterisk.org/9639


Change subject: res_pjsip: Change log message from error to warning for valid use cases
......................................................................

res_pjsip: Change log message from error to warning for valid use cases

If a SIP MESSAGE is triggered for an endpoint that is currently not registered
- and therefore has no valid contact associated - an error message was logged.
Since this is a valid request in a valid use cases this is now changed to a
warning, as discussed with Matt Fredrickson on the asterisk-dev mailing list.

Change-Id: I55eb62d2712818a58c7532119dec288bd98cf0c0
---
M res/res_pjsip.c
M res/res_pjsip_messaging.c
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/39/9639/1

diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index ba06277..4c10051 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3604,7 +3604,7 @@
 			contact = ast_sip_location_retrieve_contact_from_aor_list(endpoint->aors);
 		}
 		if (!contact || ast_strlen_zero(contact->uri)) {
-			ast_log(LOG_ERROR, "Unable to retrieve contact for endpoint %s\n",
+			ast_log(LOG_WARNING, "Unable to retrieve contact for endpoint %s\n",
 					ast_sorcery_object_get_id(endpoint));
 			return -1;
 		}
diff --git a/res/res_pjsip_messaging.c b/res/res_pjsip_messaging.c
index 45315d5..224721e 100644
--- a/res/res_pjsip_messaging.c
+++ b/res/res_pjsip_messaging.c
@@ -656,7 +656,7 @@
 	}
 
 	if (ast_sip_create_request("MESSAGE", NULL, endpoint, uri, NULL, &tdata)) {
-		ast_log(LOG_ERROR, "PJSIP MESSAGE - Could not create request\n");
+		ast_log(LOG_WARNING, "PJSIP MESSAGE - Could not create request\n");
 		return -1;
 	}
 

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I55eb62d2712818a58c7532119dec288bd98cf0c0
Gerrit-Change-Number: 9639
Gerrit-PatchSet: 1
Gerrit-Owner: Florian Floimair <f.floimair at commend.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180724/59b2c240/attachment.html>


More information about the asterisk-code-review mailing list