]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Add/update ERROR msg if invalid URI. 22/4622/1
authorRichard Mudgett <rmudgett@digium.com>
Tue, 13 Dec 2016 20:34:54 +0000 (14:34 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 14 Dec 2016 17:30:58 +0000 (11:30 -0600)
ASTERISK-24499

Change-Id: Ie305153e47e922233b2ff24715e0e326e5fa3a6c

res/res_pjsip.c
res/res_pjsip_session.c

index 227a903cdcc19ee3eb205fe82ae8c2110a6258fd..b1adf0e394ae485c54bc452c172198b8b3ad3c50 100644 (file)
@@ -2909,7 +2909,8 @@ pjsip_dialog *ast_sip_create_dialog_uac(const struct ast_sip_endpoint *endpoint,
        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;
index 9e363a18fc4ce0d744d8add1f1bba8a69b2eafcc..60850f04d34b556980db9a7002dbac520ddcbeb0 100644 (file)
@@ -1736,6 +1736,8 @@ struct ast_sip_session *ast_sip_session_create_outgoing(struct ast_sip_endpoint
 
        /* 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;
        }