Commit a56b3e9a authored by Kulya's avatar Kulya 😊

Change LogDeletes5

parent dd5c9421
{"bitrix_domain":"4uz.bitrix24.ru","alovoice_host":"https:\/\/sms.4u.uz\/bx24\/","files_folder":"files\/","asterisk_host":"127.0.0.1","asterisk_scheme":"tcp:\/\/","asterisk_port":"5038","asterisk_username":"alvBX24Bitrix","asterisk_secret":"alv0c3BX24#B1trix","connect_timeout":100,"read_timeout":1000,"basedir":"\/var\/www\/html\/bx24","asterisk_user":"alvBX24Bitrix","asterisk_pass":"alv0c3BX24#B1trix","unumbers_from":"3001","unumbers_to":"3099","sipaddress_local":"192.168.123.6","sipport_local":"5060","sipaddress_out":"alovoice.4u.uz","sipport_out":"5060","showcallcard":"true","autocreatelead":"true","miscallagentid":"1","miscallagentname":"TECHNO UNIT","add_to_chat":"true"}
\ No newline at end of file
--incom_tgmessage
local json = require('cjson')
local cURL = require "cURL"
function callback(extra, success, result)
if success then
print('File downloaded to:', result)
else
print('Error downloading: '..extra)
end
end
function on_msg_receive (msg)
if msg.out then
return
end
if (msg.text=='ping') then
send_msg (msg.from.print_name, 'pong', ok_cb, false)
end
if msg.media then
if msg.media.type == 'photo' then
print('Loading photo'..msg.id.."\n")
local loadans = load_photo(msg.id,callback,msg.id)
print('Receiving Photo:[')
print(loadans)
print(']')
--postpone (cb_function, cb_extra, 100);
end
end
--[[
mtb = json.encode(msg)
cURL.easy()
:setopt_url('http://127.0.0.1:8888/bitrix/tools/alovoice/receiver.php')
:setopt_writefunction(io.write)
:setopt_httppost(cURL.form() -- Lua-cURL guarantee that form will be alive
:add_content('tgevent', 'incom_tgmessage', text_plain)
:add_content('datas', mtb, "text/plain")
)
:perform()
:close()
]]--
-- :add_buffer("test_file", "filename", "text data", "text/plain", {
-- "Description: my file description"
-- })
-- :add_file("test_file2", "BuildLog.htm", "application/octet-stream", {
-- "Description: my file description"
-- })
--os.execute("/usr/bin/php /home/kulya/inc.php msg " .. mtb)
--os.execute("/usr/bin/php /home/kulya/inc.php msg " .. msg.from.print_name )
--os.execute("/usr/bin/php /home/kulya/upd.php msg " .. mtb )
end
function on_our_id (id)
end
function on_secret_chat_created (peer)
end
function on_user_update (user)
end
function on_chat_update (user)
end
function on_get_difference_end ()
end
function on_binlog_replay_end ()
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment