diff options
Diffstat (limited to 'channels/pjsip/dialplan_functions.c')
-rw-r--r-- | channels/pjsip/dialplan_functions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c index 704f6a4b2..91044a618 100644 --- a/channels/pjsip/dialplan_functions.c +++ b/channels/pjsip/dialplan_functions.c @@ -592,11 +592,16 @@ static int channel_read_pjsip(struct ast_channel *chan, const char *type, const dlg = channel->session->inv_session->dlg; if (!strcmp(type, "secure")) { +#ifdef HAVE_PJSIP_GET_DEST_INFO pjsip_host_info dest; pj_pool_t *pool = pjsip_endpt_create_pool(ast_sip_get_pjsip_endpoint(), "secure-check", 128, 128); pjsip_get_dest_info(dlg->target, NULL, pool, &dest); snprintf(buf, buflen, "%d", dest.flag & PJSIP_TRANSPORT_SECURE ? 1 : 0); pjsip_endpt_release_pool(ast_sip_get_pjsip_endpoint(), pool); +#else + ast_log(LOG_WARNING, "Asterisk has been built against a version of pjproject which does not have the required functionality to support the 'secure' argument. Please upgrade to version 2.3 or later.\n"); + return -1; +#endif } else if (!strcmp(type, "target_uri")) { pjsip_uri_print(PJSIP_URI_IN_REQ_URI, dlg->target, buf, buflen); buf_copy = ast_strdupa(buf); |