headers be retrieved from the REFER message and made accessible to the
dialplan in the hash TRANSFER_DATA.
+AMI
+------------------
+ * The ContactStatus and Status fields for the manager events ContactStatus
+ and ContactStatusDetail are now set to "NonQualified" when a contact exists
+ but has not been qualified.
+
+ARI
+------------------
+ * The ContactInfo event's contact_status field is now set to "NonQualified"
+ when a contact exists but has not been qualified.
+
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 15.1.0 to Asterisk 15.2.0 ------------
------------------------------------------------------------------------------
built. Users should migrate to app_stack (Gosub). A warning is logged
the first time any Macro is used.
+AMI:
+ - The ContactStatus and Status fields for the manager events ContactStatus
+ and ContactStatusDetail are now set to "NonQualified" when a contact exists
+ but has not been qualified.
+
+ARI:
+ - The ContactInfo event's contact_status field is now set to "NonQualified"
+ when a contact exists but has not been qualified.
+
New in 15.0.0:
Build System:
* \brief Status type for a contact.
*/
enum ast_sip_contact_status_type {
+ /*! Frequency > 0, but no response from remote uri */
UNAVAILABLE,
+ /*! Frequency > 0, and got response from remote uri */
AVAILABLE,
+ /*! Default last status, and when a contact status object is not found */
UNKNOWN,
+ /*! Frequency == 0, has a contact, but don't know status (non-qualified) */
CREATED,
REMOVED,
};
[UNAVAILABLE] = "Unreachable",
[AVAILABLE] = "Reachable",
[UNKNOWN] = "Unknown",
- [CREATED] = "Created",
+ [CREATED] = "NonQualified",
[REMOVED] = "Removed",
};
[UNAVAILABLE] = "Unavail",
[AVAILABLE] = "Avail",
[UNKNOWN] = "Unknown",
- [CREATED] = "Created",
+ [CREATED] = "NonQual",
[REMOVED] = "Removed",
};
return;
}
- if (is_contact_refresh
- && status->status == CREATED) {
- /*
- * The contact status hasn't been updated since creation
- * and we don't want to re-send a created status.
- */
- if (contact->qualify_frequency
- || status->rtt_start.tv_sec > 0) {
- /* Ignore, the status will change soon. */
- return;
- }
-
- /*
- * Convert to a regular contact status update
- * because the status may never change.
- */
- is_contact_refresh = 0;
- value = UNKNOWN;
+ /*
+ * If the current status is CREATED, and it's a refresh or the given value is
+ * also CREATED then there is nothing to update as nothing needs to change.
+ */
+ if (status->status == CREATED && (is_contact_refresh || status->status == value)) {
+ return;
}
update = ast_sorcery_alloc(ast_sip_get_sorcery(), CONTACT_STATUS,
schedule_qualify(contact, contact->qualify_frequency * 1000);
} else {
- update_contact_status(contact, UNKNOWN, 0);
+ update_contact_status(contact, CREATED, 0);
}
}
if (contact->qualify_frequency) {
schedule_qualify(contact, initial_interval);
} else {
- update_contact_status(contact, UNKNOWN, 0);
+ update_contact_status(contact, CREATED, 0);
}
}