res_pjsip: Add AMI events for chan_pjsip contact lifecycle changes

Add a new ContactStatus AMI event.
Publish the following status/state changes:
Created
Removed
Reachable
Unreachable
Unknown

Contact URI, new status/state, aor and endpoint names, and the
last qualify rtt result are included in the event.

ASTERISK-25114 #close

Change-Id: Id25aae5f7122facba183273efb3e8f36c20fb61e
Reported-by: George Joseph <george.joseph@fairview5.com>
Tested-by: George Joseph <george.joseph@fairview5.com>
This commit is contained in:
George Joseph
2015-05-21 16:21:01 -06:00
parent 87c03b792b
commit 262d590819
7 changed files with 174 additions and 34 deletions

View File

@@ -39,12 +39,17 @@ static const char *status_map [] = {
[UNAVAILABLE] = "Unreachable",
[AVAILABLE] = "Reachable",
[UNKNOWN] = "Unknown",
[CREATED] = "Created",
[REMOVED] = "Removed",
};
static const char *short_status_map [] = {
[UNAVAILABLE] = "Unavail",
[AVAILABLE] = "Avail",
[UNKNOWN] = "Unknown",
[CREATED] = "Created",
[REMOVED] = "Removed",
};
const char *ast_sip_get_contact_status_label(const enum ast_sip_contact_status_type status)