From 2f19cf2ff40dae09459f7ab62368c8070b78a5a3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 26 Sep 2022 14:46:52 -0600 Subject: [PATCH] Add sip_req_user as another alternative destination. --- .../app/xml_handler/resources/scripts/dialplan/dialplan.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua index 84a410afd0..d50551d0e0 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua @@ -116,6 +116,11 @@ destination_number = api:execute("url_decode", sip_to_user); end +--use alternative sip_req_user instead of the default + if (dialplan_destination == '${sip_req_user}' or dialplan_destination == 'sip_req_user') then + destination_number = api:execute("url_decode", sip_req_user); + end + --set the dialplan cache key local dialplan_cache_key = "dialplan:" .. call_context; if (context_name == 'public' and dialplan_mode == "single") then