Skip to content
Snippets Groups Projects
Commit 2e8b6d44 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Fetch URL only if enabled in the user config

parent d1e9d14c
Branches
Tags
No related merge requests found
...@@ -1954,6 +1954,8 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e ...@@ -1954,6 +1954,8 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e
/******************************************* URL HOOK *********************************************/ /******************************************* URL HOOK *********************************************/
if (Manager::instance().getConfigString (HOOKS, URLHOOK_SIP_ENABLED) == "1") {
std::string header_value; std::string header_value;
header_value = fetch_header_value (rdata->msg_info.msg, Manager::instance().getConfigString (HOOKS, URLHOOK_SIP_FIELD)); header_value = fetch_header_value (rdata->msg_info.msg, Manager::instance().getConfigString (HOOKS, URLHOOK_SIP_FIELD));
...@@ -1962,6 +1964,7 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e ...@@ -1962,6 +1964,7 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e
urlhook->addAction (header_value, urlhook->addAction (header_value,
Manager::instance().getConfigString (HOOKS, URLHOOK_COMMAND)); Manager::instance().getConfigString (HOOKS, URLHOOK_COMMAND));
} }
}
/************************************************************************************************/ /************************************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment