res_pjsip: Fix statsd regression.

The ASTERISK-25904 change-id I8fad8aae9305481469c38d2146e1ba3a56d3108f
patch introduced several regressions when the newly created "Updated"
state goes out for each endpoint registration refresh.

1) It restarted any OPTIONS RTT ping cycle.

2) It would interfere with a currently active ping and throw off that
ping's resulting RTT calculation.

3) It cleared the RTT time each time the endpoint was refreshed.

4) The cleared RTT time was sent out as a statsd update each time.

5) It created two AMI events for each update.

* Revert the original patch and reimplement it.  Now the current contact
status state is re-sent instead of the state being momentarily toggled
every time the endpoint refreshes its registration.  The statsd events are
not created for the re-sent refresh because they are sent after every
OPTIONS ping.

ASTERISK-26160 #close
Reported by: Matt Jordan

Change-Id: Ie072be790fbb2a8f5c1c874266e4143fa31f66d1
This commit is contained in:
Richard Mudgett
2016-07-11 10:25:04 -05:00
parent 5ee205d8bb
commit 97b4c7a5b4
4 changed files with 102 additions and 46 deletions

View File

@@ -271,7 +271,6 @@ enum ast_sip_contact_status_type {
UNKNOWN,
CREATED,
REMOVED,
UPDATED,
};
/*!
@@ -294,6 +293,8 @@ struct ast_sip_contact_status {
char *aor;
/*! The original contact's URI */
char *uri;
/*! TRUE if the contact was refreshed. e.g., re-registered */
unsigned int refresh:1;
};
/*!