Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
@@ -75,11 +75,10 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
--set the recording path
|
--set the recording path
|
||||||
recording_archive = recordings_dir
|
recording_archive = recordings_dir .. "/" .. domain_name .. "/archive/" .. os.date("%Y/%b/%d");
|
||||||
if (domain_count > 1) then
|
|
||||||
recording_archive = recording_archive.."/"..domain_name;
|
--set the recording file
|
||||||
end
|
record_file = recording_archive:gsub("\\", "/") .. "/" .. uuid .. "." .. record_ext
|
||||||
recording_archive = recording_archive.."/archive/"..(os.date("%Y")).."/"..(os.date("%b")).."/"..(os.date("%d"));
|
|
||||||
|
|
||||||
--prepare the api object
|
--prepare the api object
|
||||||
api = freeswitch.API();
|
api = freeswitch.API();
|
||||||
@@ -346,6 +345,7 @@
|
|||||||
cmd = "user_data ".. destination_number .."@"..domain_name.." var user_record";
|
cmd = "user_data ".. destination_number .."@"..domain_name.." var user_record";
|
||||||
user_record = trim(api:executeString(cmd));
|
user_record = trim(api:executeString(cmd));
|
||||||
--set the record_session variable
|
--set the record_session variable
|
||||||
|
record_session = false;
|
||||||
if (user_record == "all") then
|
if (user_record == "all") then
|
||||||
record_session = true;
|
record_session = true;
|
||||||
end
|
end
|
||||||
@@ -361,9 +361,11 @@
|
|||||||
|
|
||||||
--record the session
|
--record the session
|
||||||
if (record_session) then
|
if (record_session) then
|
||||||
cmd = "uuid_record "..uuid.." start "..recording_archive.."/"..uuid.."."..record_ext;
|
record_session = ",api_on_answer='uuid_record "..uuid.." start ".. record_file .. "'";
|
||||||
response = api:executeString(cmd);
|
else
|
||||||
|
record_session = ""
|
||||||
end
|
end
|
||||||
|
row.record_session = record_session
|
||||||
|
|
||||||
--process according to user_exists, sip_uri, external number
|
--process according to user_exists, sip_uri, external number
|
||||||
if (user_exists == "true") then
|
if (user_exists == "true") then
|
||||||
@@ -371,26 +373,27 @@
|
|||||||
cmd = "user_data ".. destination_number .."@"..domain_name.." var extension_uuid";
|
cmd = "user_data ".. destination_number .."@"..domain_name.." var extension_uuid";
|
||||||
extension_uuid = trim(api:executeString(cmd));
|
extension_uuid = trim(api:executeString(cmd));
|
||||||
--send to user
|
--send to user
|
||||||
|
local dial_string_to_user = "[sip_invite_domain="..domain_name..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay..",dialed_extension=" .. row.destination_number .. ",extension_uuid="..extension_uuid .. row.record_session .. "]user/" .. row.destination_number .. "@" .. domain_name;
|
||||||
if (ring_group_skip_active ~= nil) then
|
if (ring_group_skip_active ~= nil) then
|
||||||
if (ring_group_skip_active == "true") then
|
if (ring_group_skip_active == "true") then
|
||||||
cmd = "show channels like "..destination_number;
|
cmd = "show channels like "..destination_number;
|
||||||
reply = trim(api:executeString(cmd));
|
reply = trim(api:executeString(cmd));
|
||||||
--freeswitch.consoleLog("notice", "[ring group] reply "..cmd.." " .. reply .. "\n");
|
--freeswitch.consoleLog("notice", "[ring group] reply "..cmd.." " .. reply .. "\n");
|
||||||
if (reply == "0 total.") then
|
if (reply == "0 total.") then
|
||||||
dial_string = "[sip_invite_domain="..domain_name..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay..",dialed_extension=" .. row.destination_number .. ",extension_uuid="..extension_uuid.."]user/" .. row.destination_number .. "@" .. domain_name;
|
dial_string = dial_string_to_user
|
||||||
else
|
else
|
||||||
if (string.find(reply, domain_name)) then
|
if (string.find(reply, domain_name)) then
|
||||||
--active call
|
--active call
|
||||||
else
|
else
|
||||||
dial_string = "[sip_invite_domain="..domain_name..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay..",dialed_extension=" .. row.destination_number .. ",extension_uuid="..extension_uuid.."]user/" .. row.destination_number .. "@" .. domain_name;
|
dial_string = dial_string_to_user;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
--look inside the reply to check for the correct domain_name
|
--look inside the reply to check for the correct domain_name
|
||||||
dial_string = "[sip_invite_domain="..domain_name..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay..",dialed_extension=" .. row.destination_number .. ",extension_uuid="..extension_uuid.."]user/" .. row.destination_number .. "@" .. domain_name;
|
dial_string = dial_string_to_user;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
dial_string = "[sip_invite_domain="..domain_name..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay..",dialed_extension=" .. row.destination_number .. ",extension_uuid="..extension_uuid.."]user/" .. row.destination_number .. "@" .. domain_name;
|
dial_string = dial_string_to_user;
|
||||||
end
|
end
|
||||||
elseif (tonumber(destination_number) == nil) then
|
elseif (tonumber(destination_number) == nil) then
|
||||||
--sip uri
|
--sip uri
|
||||||
@@ -496,7 +499,6 @@
|
|||||||
-- end
|
-- end
|
||||||
|
|
||||||
--set bind digit action
|
--set bind digit action
|
||||||
local record_file = recordings_dir.."/archive/"..os.date("%Y").."/"..os.date("%m").."/"..os.date("%d").."}/"..uuid.."."..record_ext
|
|
||||||
local bindings = {
|
local bindings = {
|
||||||
"local,*1,exec:execute_extension,dx XML " .. context,
|
"local,*1,exec:execute_extension,dx XML " .. context,
|
||||||
"local,*2,exec:record_session," .. record_file,
|
"local,*2,exec:record_session," .. record_file,
|
||||||
@@ -537,7 +539,7 @@
|
|||||||
|
|
||||||
--send the call to the destination
|
--send the call to the destination
|
||||||
if (user_exists == "true") then
|
if (user_exists == "true") then
|
||||||
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",dialed_extension=" .. destination_number .. ",extension_uuid="..extension_uuid..",domain_name="..domain_name..",domain_uuid="..domain_uuid.."]user/" .. destination_number .. "@" .. domain_name;
|
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",dialed_extension=" .. destination_number .. ",extension_uuid="..extension_uuid..",domain_name="..domain_name..",domain_uuid="..domain_uuid..row.record_session.."]user/" .. destination_number .. "@" .. domain_name;
|
||||||
session:execute("bridge", dial_string);
|
session:execute("bridge", dial_string);
|
||||||
elseif (tonumber(destination_number) == nil) then
|
elseif (tonumber(destination_number) == nil) then
|
||||||
--sip uri
|
--sip uri
|
||||||
|
|||||||
@@ -5,15 +5,22 @@ text['label-download']['en-us'] = "Download";
|
|||||||
text['label-download']['es-cl'] = "Descargar";
|
text['label-download']['es-cl'] = "Descargar";
|
||||||
text['label-download']['pt-pt'] = "Baixar";
|
text['label-download']['pt-pt'] = "Baixar";
|
||||||
text['label-download']['fr-fr'] = "Télécharger";
|
text['label-download']['fr-fr'] = "Télécharger";
|
||||||
|
text['label-download']['de-de'] = "Download";
|
||||||
|
text['label-download']['de-at'] = "Download";
|
||||||
|
|
||||||
text['label-listen'] = {};
|
text['label-listen'] = {};
|
||||||
text['label-listen']['en-us'] = "Listen";
|
text['label-listen']['en-us'] = "Listen";
|
||||||
text['label-listen']['es-cl'] = "Escuchar";
|
text['label-listen']['es-cl'] = "Escuchar";
|
||||||
text['label-listen']['pt-pt'] = "Ouvir";
|
text['label-listen']['pt-pt'] = "Ouvir";
|
||||||
text['label-listen']['fr-fr'] = "Écouter";
|
text['label-listen']['fr-fr'] = "Écouter";
|
||||||
|
text['label-listen']['de-de'] = "Anhören";
|
||||||
|
text['label-listen']['de-at'] = "Anhören";
|
||||||
|
|
||||||
text['label-attached'] = {};
|
text['label-attached'] = {};
|
||||||
text['label-attached']['en-us'] = "Attached";
|
text['label-attached']['en-us'] = "Attached";
|
||||||
text['label-attached']['es-cl'] = "Adjunto";
|
text['label-attached']['es-cl'] = "Adjunto";
|
||||||
text['label-attached']['pt-pt'] = "Ligado";
|
text['label-attached']['pt-pt'] = "Ligado";
|
||||||
text['label-attached']['fr-fr'] = "Attaché";
|
text['label-attached']['fr-fr'] = "Attaché";
|
||||||
|
text['label-attached']['de-de'] = "im Anhang";
|
||||||
|
text['label-attached']['de-at'] = "im Anhang";
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
<html>
|
||||||
|
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center"
|
||||||
|
style="border: 1px solid #cbcfd5;-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px; border-radius: 4px;">
|
||||||
|
<tr>
|
||||||
|
<td valign="middle" align="center" bgcolor="#e5e9f0" style="background-color: #e5e9f0;
|
||||||
|
color: #000; font-family: Arial; font-size: 14px; padding: 7px;-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px; border-radius: 4px;">
|
||||||
|
<strong>Neue Sprachnachricht</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" style="padding: 15px;">
|
||||||
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Nebenstelle</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${account}@${domain_name}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;" width="20%">
|
||||||
|
<strong>Anrufer</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;" width="80%">
|
||||||
|
${caller_id_number}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!--
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Received</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${message_date}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
-->
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Nachricht</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${message}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Länge</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${message_duration}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Sprachnachricht von ${caller_id_name} <${caller_id_number}> ${message_duration}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
<html>
|
||||||
|
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center"
|
||||||
|
style="border: 1px solid #cbcfd5;-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px; border-radius: 4px;">
|
||||||
|
<tr>
|
||||||
|
<td valign="middle" align="center" bgcolor="#e5e9f0" style="background-color: #e5e9f0;
|
||||||
|
color: #000; font-family: Arial; font-size: 14px; padding: 7px;-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px; border-radius: 4px;">
|
||||||
|
<strong>Neue Sprachnachricht</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" style="padding: 15px;">
|
||||||
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Nebenstelle</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${account}@${domain_name}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;" width="20%">
|
||||||
|
<strong>Anrufer</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;" width="80%">
|
||||||
|
${caller_id_number}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!--
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Received</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${message_date}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
-->
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Nachricht</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${message}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
<strong>Länge</strong>
|
||||||
|
</td>
|
||||||
|
<td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">
|
||||||
|
${message_duration}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Sprachnachricht von ${caller_id_name} <${caller_id_number}> ${message_duration}
|
||||||
@@ -36,35 +36,40 @@
|
|||||||
<user_realname idx="1" perm="">{$display_name_1}</user_realname>
|
<user_realname idx="1" perm="">{$display_name_1}</user_realname>
|
||||||
<user_name idx="1" perm="">{$user_id_1}</user_name>
|
<user_name idx="1" perm="">{$user_id_1}</user_name>
|
||||||
<user_pass idx="1" perm="">{$user_password_1}</user_pass>
|
<user_pass idx="1" perm="">{$user_password_1}</user_pass>
|
||||||
<user_host idx="1" perm="">{$server_address_1}</user_host>
|
<user_host idx="1" perm="">{$server_address_1}:{$sip_port_1};transport={$sip_transport_1}</user_host>
|
||||||
|
<user_subscription_expiry idx="1" perm="">{$register_expires_1}</user_subscription_expiry>
|
||||||
<user_server_type idx="1" perm="">Default</user_server_type>
|
<user_server_type idx="1" perm="">Default</user_server_type>
|
||||||
<user_srtp idx="1" perm="">off</user_srtp>
|
<user_srtp idx="1" perm="">off</user_srtp>
|
||||||
<user_mailbox idx="1" perm="">*97</user_mailbox>
|
<user_mailbox idx="1" perm="">*97</user_mailbox>
|
||||||
<user_realname idx="2" perm="">{$display_name_2}</user_realname>
|
<user_realname idx="2" perm="">{$display_name_2}</user_realname>
|
||||||
<user_name idx="2" perm="">{$user_id_2}</user_name>
|
<user_name idx="2" perm="">{$user_id_2}</user_name>
|
||||||
<user_pass idx="2" perm="">{$user_password_2}</user_pass>
|
<user_pass idx="2" perm="">{$user_password_2}</user_pass>
|
||||||
<user_host idx="2" perm="">{$server_address_2}</user_host>
|
<user_host idx="2" perm="">{$server_address_2}:{$sip_port_2};transport={$sip_transport_2}</user_host>
|
||||||
|
<user_subscription_expiry idx="2" perm="">{$register_expires_2}</user_subscription_expiry>
|
||||||
<user_server_type idx="2" perm="">Default</user_server_type>
|
<user_server_type idx="2" perm="">Default</user_server_type>
|
||||||
<user_srtp idx="2" perm="">off</user_srtp>
|
<user_srtp idx="2" perm="">off</user_srtp>
|
||||||
<user_mailbox idx="2" perm="">*97</user_mailbox>
|
<user_mailbox idx="2" perm="">*97</user_mailbox>
|
||||||
<user_realname idx="3" perm="">{$display_name_3}</user_realname>
|
<user_realname idx="3" perm="">{$display_name_3}</user_realname>
|
||||||
<user_name idx="3" perm="">{$user_id_3}</user_name>
|
<user_name idx="3" perm="">{$user_id_3}</user_name>
|
||||||
<user_pass idx="3" perm="">{$user_password_3}</user_pass>
|
<user_pass idx="3" perm="">{$user_password_3}</user_pass>
|
||||||
<user_host idx="3" perm="">{$server_address_3}</user_host>
|
<user_host idx="3" perm="">{$server_address_3}:{$sip_port_3};transport={$sip_transport_3}</user_host>
|
||||||
|
<user_subscription_expiry idx="3" perm="">{$register_expires_3}</user_subscription_expiry>
|
||||||
<user_server_type idx="3" perm="">Default</user_server_type>
|
<user_server_type idx="3" perm="">Default</user_server_type>
|
||||||
<user_srtp idx="3" perm="">off</user_srtp>
|
<user_srtp idx="3" perm="">off</user_srtp>
|
||||||
<user_mailbox idx="3" perm="">*97</user_mailbox>
|
<user_mailbox idx="3" perm="">*97</user_mailbox>
|
||||||
<user_realname idx="4" perm="">{$display_name_4}</user_realname>
|
<user_realname idx="4" perm="">{$display_name_4}</user_realname>
|
||||||
<user_name idx="4" perm="">{$user_id_4}</user_name>
|
<user_name idx="4" perm="">{$user_id_4}</user_name>
|
||||||
<user_pass idx="4" perm="">{$user_password_4}</user_pass>
|
<user_pass idx="4" perm="">{$user_password_4}</user_pass>
|
||||||
<user_host idx="4" perm="">{$server_address_4}</user_host>
|
<user_host idx="4" perm="">{$server_address_4}:{$sip_port_4};transport={$sip_transport_4}</user_host>
|
||||||
|
<user_subscription_expiry idx="4" perm="">{$register_expires_4}</user_subscription_expiry>
|
||||||
<user_server_type idx="4" perm="">Default</user_server_type>
|
<user_server_type idx="4" perm="">Default</user_server_type>
|
||||||
<user_srtp idx="4" perm="">off</user_srtp>
|
<user_srtp idx="4" perm="">off</user_srtp>
|
||||||
<user_mailbox idx="4" perm="">*97</user_mailbox>
|
<user_mailbox idx="4" perm="">*97</user_mailbox>
|
||||||
<user_realname idx="5" perm="">{$display_name_5}</user_realname>
|
<user_realname idx="5" perm="">{$display_name_5}</user_realname>
|
||||||
<user_name idx="5" perm="">{$user_id_5}</user_name>
|
<user_name idx="5" perm="">{$user_id_5}</user_name>
|
||||||
<user_pass idx="5" perm="">{$user_password_5}</user_pass>
|
<user_pass idx="5" perm="">{$user_password_5}</user_pass>
|
||||||
<user_host idx="5" perm="">{$server_address_5}</user_host>
|
<user_host idx="5" perm="">{$server_address_5}:{$sip_port_5};transport={$sip_transport_5}</user_host>
|
||||||
|
<user_subscription_expiry idx="5" perm="">{$register_expires_5}</user_subscription_expiry>
|
||||||
<user_server_type idx="5" perm="">Default</user_server_type>
|
<user_server_type idx="5" perm="">Default</user_server_type>
|
||||||
<user_srtp idx="5" perm="">off</user_srtp>
|
<user_srtp idx="5" perm="">off</user_srtp>
|
||||||
<user_mailbox idx="5" perm="">*97</user_mailbox>
|
<user_mailbox idx="5" perm="">*97</user_mailbox>
|
||||||
|
|||||||
Reference in New Issue
Block a user