Scannex ip.buffer User Manual
© UK 2007-2021 Scannex Electronics Ltd. All rights reserved worldwide.
(Will email if more than ten alarms occur within 60 minutes, and repeat the
email every 2 hours while triggered.)
alert.alarm(id[, msg])
Triggers an alert with the optional override message.
e.g. alert.alarm(“PBXFailure”, “CPU fail”)
15.2.2. Delivery Trigger System
trigger.push(n)
Forces a delivery push for channel “n”.
e.g. trigger.push(1)
trigger.cancel(n)
Cancels the “trigger” value for the delivery push for channel “n”.
e.g. trigger.cancel(1)
15.2.3. Comments within Lua code
//
--
Both “//” and “--” comments. The “//” is for those familiar with C++, while
“--” is the native Lua comment.
15.2.4. Sending data to the channel source
sources[1]:write(
string
)
Writes the
string
to the source on channel 1. If the call is made within the
context of channel 1 (e.g. in the “onrecord” event for channel 1), then the
call will block until all data has been sent. In all other cases the data is sent
through to a 4k buffer – if the buffer is filled faster than it can be
transmitted then it overflows and data is lost.
To send data through to channel 2, uses sources[2], etc.
Note: use a colon, not a dot! Equivalent to source.write(sources[1],
string
)
Page 122
Scannex ip.buffer User Manual
© UK 2007-2021 Scannex Electronics Ltd. All rights reserved worldwide.
(Will email if more than ten alarms occur within 60 minutes, and repeat the
email every 2 hours while triggered.)
alert.alarm(id[, msg])
Triggers an alert with the optional override message.
e.g. alert.alarm(“PBXFailure”, “CPU fail”)
15.2.2. Delivery Trigger System
trigger.push(n)
Forces a delivery push for channel “n”.
e.g. trigger.push(1)
trigger.cancel(n)
Cancels the “trigger” value for the delivery push for channel “n”.
e.g. trigger.cancel(1)
15.2.3. Comments within Lua code
//
--
Both “//” and “--” comments. The “//” is for those familiar with C++, while
“--” is the native Lua comment.
15.2.4. Sending data to the channel source
sources[1]:write(
string
)
Writes the
string
to the source on channel 1. If the call is made within the
context of channel 1 (e.g. in the “onrecord” event for channel 1), then the
call will block until all data has been sent. In all other cases the data is sent
through to a 4k buffer – if the buffer is filled faster than it can be
transmitted then it overflows and data is lost.
To send data through to channel 2, uses sources[2], etc.
Note: use a colon, not a dot! Equivalent to source.write(sources[1],
string
)
Page 122