summaryrefslogtreecommitdiff
path: root/channels/pjsip
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-05-31 15:41:45 +0000
committerJoshua Colp <jcolp@digium.com>2017-06-06 09:46:39 -0500
commit861984eac0d9d3582db6922a89e2d75796ae108f (patch)
treed939381d1a4d848c8395636d6533a94072af3e69 /channels/pjsip
parent452e6315bb8be7578937de279aa1d906662faa20 (diff)
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
Diffstat (limited to 'channels/pjsip')
-rw-r--r--channels/pjsip/dialplan_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c
index 332df70b4..7b3434d40 100644
--- a/channels/pjsip/dialplan_functions.c
+++ b/channels/pjsip/dialplan_functions.c
@@ -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)) {