]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Change log message from error to warning for valid use cases
authorFlorian Floimair <f.floimair@commend.com>
Tue, 24 Jul 2018 09:57:25 +0000 (11:57 +0200)
committerFlorian Floimair <f.floimair@commend.com>
Tue, 24 Jul 2018 12:19:28 +0000 (07:19 -0500)
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

res/res_pjsip.c
res/res_pjsip_messaging.c

index 0dbfc41caf10cc82548f0b4b37a126907d038d1c..4e967f998ca7f294e56eb36fa65e91436ff880f9 100644 (file)
@@ -3555,7 +3555,7 @@ static int create_out_of_dialog_request(const pjsip_method *method, struct ast_s
                        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;
                }
index c6ea1dc44701312536d1cb22562e52f21baa42d6..10c5f293b1eb1a8e2e3ddc58918b3dcf2a5ab76e 100644 (file)
@@ -656,7 +656,7 @@ static int msg_send(void *data)
        }
 
        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;
        }