13.04.2023, 07:55
I'm trying to setup event notification for the grandstream GDS3710.
I cannot use an lp script since the gds3710 only accepts an ip and port
I've searched the forum for a simple resident script which is able to capture the data the gds3710 sends when an event occurs but without any luck.
I've found a script which at least generates some output but not the whole body.
Can someone point me to the right direction or alter the script below.
Thanks in advance!
I cannot use an lp script since the gds3710 only accepts an ip and port
I've searched the forum for a simple resident script which is able to capture the data the gds3710 sends when an event occurs but without any luck.
I've found a script which at least generates some output but not the whole body.
Code:
* string: POST / HTTP/1.1User-Agent: Wget/1.16.1 (linux-gnu)Accept: */*Accept-Encoding: identityHost: 192.x.x.x:7777Connection: Keep-AliveContent-Type: application/x-www-form-urlencodedContent-Length: 29
Can someone point me to the right direction or alter the script below.
Code:
local socket = require("socket")
local server = assert(socket.bind("*", 7777))
local header
while 1 do
local client = server:accept()
local line = client:receive()
header = line
while (#line > 0) do
line = client:receive()
header = header .. line
end
log(header)
end
Thanks in advance!