summaryrefslogtreecommitdiffstats
path: root/doc/examples/mobile/lua_sms_receive.lua
blob: 4be4e0a59efc4a19caa635a9cbb02ac4b2570985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- See https://www.lua.org/manual/5.3/ for Lua
-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua

function sms_cb(sms, cause, valid)
	print("SMS data cb", sms, cause, valid)
	for i, v in pairs(sms) do
		print(i, v)
	end
end

local cbs = {
	Sms=sms_cb,
}

osmo.ms():register(cbs)