mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
res_pjsip: Add support for returning only reachable contacts and use it.
This introduces the ability for PJSIP code to specify filtering flags when retrieving PJSIP contacts. The first flag for use causes the query code to only retrieve contacts that are not unreachable. This change has been leveraged by both the Dial() process and the PJSIP_DIAL_CONTACTS dialplan function so they will now only attempt calls to contacts which are not unreachable. ASTERISK-26281 Change-Id: I8233b4faa21ba3db114f5a42e946e4b191446f6c
This commit is contained in:
@@ -896,7 +896,7 @@ int pjsip_acf_dial_contacts_read(struct ast_channel *chan, const char *cmd, char
|
||||
if (!aor) {
|
||||
/* If the AOR provided is not found skip it, there may be more */
|
||||
continue;
|
||||
} else if (!(contacts = ast_sip_location_retrieve_aor_contacts(aor))) {
|
||||
} else if (!(contacts = ast_sip_location_retrieve_aor_contacts_filtered(aor, AST_SIP_CONTACT_FILTER_REACHABLE))) {
|
||||
/* No contacts are available, skip it as well */
|
||||
continue;
|
||||
} else if (!ao2_container_count(contacts)) {
|
||||
|
Reference in New Issue
Block a user