mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-10 10:38:22 +00:00
Add ring group cid number prefix to the database and to the ring group lua script
This commit is contained in:
@@ -140,7 +140,11 @@
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_cid_name_prefix";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the caller ID prefix.";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the caller ID name prefix.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_cid_number_prefix";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the caller ID number prefix.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_strategy";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
ring_group_forward_enabled = row["ring_group_forward_enabled"];
|
||||
ring_group_forward_destination = row["ring_group_forward_destination"];
|
||||
ring_group_cid_name_prefix = row["ring_group_cid_name_prefix"];
|
||||
ring_group_cid_number_prefix = row["ring_group_cid_number_prefix"];
|
||||
end);
|
||||
|
||||
--set the caller id
|
||||
@@ -109,6 +110,9 @@
|
||||
if (string.len(ring_group_cid_name_prefix) > 0) then
|
||||
session:execute("set", "effective_caller_id_name="..ring_group_cid_name_prefix.."#"..caller_id_name);
|
||||
end
|
||||
if (string.len(ring_group_cid_number_prefix) > 0) then
|
||||
session:execute("set", "effective_caller_id_number="..ring_group_cid_number_prefix..caller_id_number);
|
||||
end
|
||||
end
|
||||
|
||||
--process the ring group
|
||||
@@ -118,7 +122,7 @@
|
||||
else
|
||||
--get the ring group destinations
|
||||
sql =
|
||||
[[ SELECT r.ring_group_strategy, r.ring_group_timeout_app, d.destination_number, d.destination_delay, d.destination_timeout, d.destination_prompt, r.ring_group_timeout_data, r.ring_group_cid_name_prefix, r.ring_group_ringback, r.ring_group_skip_active
|
||||
[[ SELECT r.ring_group_strategy, r.ring_group_timeout_app, d.destination_number, d.destination_delay, d.destination_timeout, d.destination_prompt, r.ring_group_timeout_data, r.ring_group_cid_name_prefix, r.ring_group_cid_number_prefix, r.ring_group_ringback, r.ring_group_skip_active
|
||||
FROM v_ring_groups as r, v_ring_group_destinations as d
|
||||
where d.ring_group_uuid = r.ring_group_uuid
|
||||
and d.ring_group_uuid = ']]..ring_group_uuid..[['
|
||||
@@ -189,6 +193,7 @@
|
||||
ring_group_timeout_app = row.ring_group_timeout_app;
|
||||
ring_group_timeout_data = row.ring_group_timeout_data;
|
||||
ring_group_cid_name_prefix = row.ring_group_cid_name_prefix;
|
||||
ring_group_cid_number_prefix = row.ring_group_cid_number_prefix;
|
||||
ring_group_ringback = row.ring_group_ringback;
|
||||
ring_group_skip_active = row.ring_group_skip_active;
|
||||
destination_number = row.destination_number;
|
||||
|
||||
Reference in New Issue
Block a user