Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
commit
2c93f9ca1a
|
|
@ -75,11 +75,10 @@
|
|||
end
|
||||
|
||||
--set the recording path
|
||||
recording_archive = recordings_dir
|
||||
if (domain_count > 1) then
|
||||
recording_archive = recording_archive.."/"..domain_name;
|
||||
end
|
||||
recording_archive = recording_archive.."/archive/"..(os.date("%Y")).."/"..(os.date("%b")).."/"..(os.date("%d"));
|
||||
recording_archive = recordings_dir .. "/" .. domain_name .. "/archive/" .. os.date("%Y/%b/%d");
|
||||
|
||||
--set the recording file
|
||||
record_file = recording_archive:gsub("\\", "/") .. "/" .. uuid .. "." .. record_ext
|
||||
|
||||
--prepare the api object
|
||||
api = freeswitch.API();
|
||||
|
|
@ -346,6 +345,7 @@
|
|||
cmd = "user_data ".. destination_number .."@"..domain_name.." var user_record";
|
||||
user_record = trim(api:executeString(cmd));
|
||||
--set the record_session variable
|
||||
record_session = false;
|
||||
if (user_record == "all") then
|
||||
record_session = true;
|
||||
end
|
||||
|
|
@ -361,9 +361,11 @@
|
|||
|
||||
--record the session
|
||||
if (record_session) then
|
||||
cmd = "uuid_record "..uuid.." start "..recording_archive.."/"..uuid.."."..record_ext;
|
||||
response = api:executeString(cmd);
|
||||
record_session = ",api_on_answer='uuid_record "..uuid.." start ".. record_file .. "'";
|
||||
else
|
||||
record_session = ""
|
||||
end
|
||||
row.record_session = record_session
|
||||
|
||||
--process according to user_exists, sip_uri, external number
|
||||
if (user_exists == "true") then
|
||||
|
|
@ -371,26 +373,27 @@
|
|||
cmd = "user_data ".. destination_number .."@"..domain_name.." var extension_uuid";
|
||||
extension_uuid = trim(api:executeString(cmd));
|
||||
--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 == "true") then
|
||||
cmd = "show channels like "..destination_number;
|
||||
reply = trim(api:executeString(cmd));
|
||||
--freeswitch.consoleLog("notice", "[ring group] reply "..cmd.." " .. reply .. "\n");
|
||||
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
|
||||
if (string.find(reply, domain_name)) then
|
||||
--active call
|
||||
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
|
||||
else
|
||||
--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
|
||||
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
|
||||
elseif (tonumber(destination_number) == nil) then
|
||||
--sip uri
|
||||
|
|
@ -496,7 +499,6 @@
|
|||
-- end
|
||||
|
||||
--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,*1,exec:execute_extension,dx XML " .. context,
|
||||
"local,*2,exec:record_session," .. record_file,
|
||||
|
|
@ -537,7 +539,7 @@
|
|||
|
||||
--send the call to the destination
|
||||
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);
|
||||
elseif (tonumber(destination_number) == nil) then
|
||||
--sip uri
|
||||
|
|
|
|||
|
|
@ -5,15 +5,22 @@ text['label-download']['en-us'] = "Download";
|
|||
text['label-download']['es-cl'] = "Descargar";
|
||||
text['label-download']['pt-pt'] = "Baixar";
|
||||
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']['en-us'] = "Listen";
|
||||
text['label-listen']['es-cl'] = "Escuchar";
|
||||
text['label-listen']['pt-pt'] = "Ouvir";
|
||||
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']['en-us'] = "Attached";
|
||||
text['label-attached']['es-cl'] = "Adjunto";
|
||||
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_name idx="1" perm="">{$user_id_1}</user_name>
|
||||
<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_srtp idx="1" perm="">off</user_srtp>
|
||||
<user_mailbox idx="1" perm="">*97</user_mailbox>
|
||||
<user_realname idx="2" perm="">{$display_name_2}</user_realname>
|
||||
<user_name idx="2" perm="">{$user_id_2}</user_name>
|
||||
<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_srtp idx="2" perm="">off</user_srtp>
|
||||
<user_mailbox idx="2" perm="">*97</user_mailbox>
|
||||
<user_realname idx="3" perm="">{$display_name_3}</user_realname>
|
||||
<user_name idx="3" perm="">{$user_id_3}</user_name>
|
||||
<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_srtp idx="3" perm="">off</user_srtp>
|
||||
<user_mailbox idx="3" perm="">*97</user_mailbox>
|
||||
<user_realname idx="4" perm="">{$display_name_4}</user_realname>
|
||||
<user_name idx="4" perm="">{$user_id_4}</user_name>
|
||||
<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_srtp idx="4" perm="">off</user_srtp>
|
||||
<user_mailbox idx="4" perm="">*97</user_mailbox>
|
||||
<user_realname idx="5" perm="">{$display_name_5}</user_realname>
|
||||
<user_name idx="5" perm="">{$user_id_5}</user_name>
|
||||
<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_srtp idx="5" perm="">off</user_srtp>
|
||||
<user_mailbox idx="5" perm="">*97</user_mailbox>
|
||||
|
|
|
|||
Loading…
Reference in New Issue