Hi DigitalDaz - I appreciate you trying to help.
I am not real clear on what you are saying to do here
This is where I went
if (r.dialplan_detail_tag == "condition") then
if (r.dialplan_detail_type == "destination_number") then
if (api:execute("regex", "m:~"..destination_number.."~"..r.dialp$
--get the regex result
destination_result = trim(api:execute("regex", "$
--set match equal to true
regex_match = true
end
end
end
if (r.dialplan_detail_tag == "action") then
if (regex_match) then
--replace $1
dialplan_detail_data = r.dialplan_detail_data:gsub("$1",$
--if the session is set then process the actions
if (y == 0) then
square = "[domain_name="..domain_name..",domain_$
end
if (r.dialplan_detail_type == "set") then
--session:execute("eval", dialplan_detail_data);
if (dialplan_detail_data == "sip_h_X-accountcode$
if (session) then
accountcode = session:getVariabl$
if (accountcode) then
square = square .. "sip_$
end
I am not real clear on what you are saying to do here
This is where I went
if (r.dialplan_detail_tag == "condition") then
if (r.dialplan_detail_type == "destination_number") then
if (api:execute("regex", "m:~"..destination_number.."~"..r.dialp$
--get the regex result
destination_result = trim(api:execute("regex", "$
--set match equal to true
regex_match = true
end
end
end
if (r.dialplan_detail_tag == "action") then
if (regex_match) then
--replace $1
dialplan_detail_data = r.dialplan_detail_data:gsub("$1",$
--if the session is set then process the actions
if (y == 0) then
square = "[domain_name="..domain_name..",domain_$
end
if (r.dialplan_detail_type == "set") then
--session:execute("eval", dialplan_detail_data);
if (dialplan_detail_data == "sip_h_X-accountcode$
if (session) then
accountcode = session:getVariabl$
if (accountcode) then
square = square .. "sip_$
end