summaryrefslogtreecommitdiff
path: root/channels/pjsip/dialplan_functions.c
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 14:45:49 +0000
commit746c2c574578608a6b48d4794ba33cda5a6dd484 (patch)
tree94dbaca4c282026c0faa95eccb60e9bfe52ee414 /channels/pjsip/dialplan_functions.c
parentdc05183f4b7d728534ec6fa5f3fc21802396aabf (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/dialplan_functions.c')
-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 652a6b7f3..d11636ccc 100644
--- a/channels/pjsip/dialplan_functions.c
+++ b/channels/pjsip/dialplan_functions.c
@@ -898,7 +898,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)) {