]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: chatty verbose messages 02/2902/2
authorAlexei Gradinari <alex2grad@gmail.com>
Tue, 24 May 2016 21:56:49 +0000 (17:56 -0400)
committerJoshua Colp <jcolp@digium.com>
Wed, 25 May 2016 14:38:01 +0000 (09:38 -0500)
There are a lot of verbose messages about Endpoint and Contact status
changes if there are many dynamic endpoints.
The patch sets verbose level 2 for Endpoint status changes
and verbose level 3 for Contact status changes.

ASTERISK-26055 #close

Change-Id: Ie64e261ddbbc41bfff0f0190241152cc123fe6d7

res/res_pjsip/pjsip_configuration.c

index 2e0df75e3ad9d9db6bd2828424a3831d8213d448..368f0d8a21c863539a1bac812ace4a10a7857105 100644 (file)
@@ -131,7 +131,7 @@ static int persistent_endpoint_update_state(void *obj, void *arg, int flags)
                        }
                }
 
-               ast_verb(1, "Endpoint %s is now Reachable\n", ast_endpoint_get_resource(endpoint));
+               ast_verb(2, "Endpoint %s is now Reachable\n", ast_endpoint_get_resource(endpoint));
        } else {
                ast_endpoint_set_state(endpoint, AST_ENDPOINT_OFFLINE);
                blob = ast_json_pack("{s: s}", "peer_status", "Unreachable");
@@ -144,7 +144,7 @@ static int persistent_endpoint_update_state(void *obj, void *arg, int flags)
                        }
                }
 
-               ast_verb(1, "Endpoint %s is now Unreachable\n", ast_endpoint_get_resource(endpoint));
+               ast_verb(2, "Endpoint %s is now Unreachable\n", ast_endpoint_get_resource(endpoint));
        }
 
        ast_free(regcontext);
@@ -176,7 +176,7 @@ static void persistent_endpoint_contact_created_observer(const void *object)
        }
        contact_status->status = CREATED;
 
-       ast_verb(1, "Contact %s/%s has been created\n",contact->aor, contact->uri);
+       ast_verb(2, "Contact %s/%s has been created\n",contact->aor, contact->uri);
 
        ao2_callback(persistent_endpoints, OBJ_NODATA, persistent_endpoint_update_state, contact_status);
        ao2_cleanup(contact_status);
@@ -195,7 +195,7 @@ static void persistent_endpoint_contact_deleted_observer(const void *object)
                return;
        }
 
-       ast_verb(1, "Contact %s/%s has been deleted\n", contact->aor, contact->uri);
+       ast_verb(2, "Contact %s/%s has been deleted\n", contact->aor, contact->uri);
        ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GAUGE,
                "-1", 1.0, ast_sip_get_contact_status_label(contact_status->status));
        ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GAUGE,
@@ -223,7 +223,7 @@ static void persistent_endpoint_contact_status_observer(const void *object)
        }
 
        if (contact_status->status != contact_status->last_status) {
-               ast_verb(1, "Contact %s/%s is now %s.  RTT: %.3f msec\n", contact_status->aor, contact_status->uri,
+               ast_verb(3, "Contact %s/%s is now %s.  RTT: %.3f msec\n", contact_status->aor, contact_status->uri,
                        ast_sip_get_contact_status_label(contact_status->status),
                        contact_status->rtt / 1000.0);