This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LM phone call to phone number
#4
It should be combined with the SMS script.

Change udphandler function in the resident script like this:
Code:
-- check local udp server for messages to send
udphandler = function(server)
  -- check for local sms to send
  local msg = server:receive()
  -- got no message
  if not msg then
    return
  end

  -- split into number and message
  local sep = msg:find(' ')
  if not sep then
    return
  end

  local num = msg:sub(1, sep - 1)
  local txt = msg:sub(sep + 1)

  if txt == 'CALL' then
    alert('calling: ' .. num)
    modem:call(num)
  else
    alert('sending sms: ' .. msg)
    modem:sendsms(num, txt)
  end
end

Then try this script (number should probably start with 00):
Code:
require('user.sms')
sendsms('003711234567', 'CALL')
Reply


Messages In This Thread
LM phone call to phone number - by AlexLV - 28.07.2023, 22:07
RE: LM phone call to phone number - by admin - 08.08.2023, 08:01
RE: LM phone call to phone number - by AlexLV - 17.08.2023, 07:24
RE: LM phone call to phone number - by admin - 17.08.2023, 07:48
RE: LM phone call to phone number - by AlexLV - 19.08.2023, 11:04
RE: LM phone call to phone number - by Daniel - 21.08.2023, 07:36
RE: LM phone call to phone number - by AlexLV - 22.08.2023, 21:11
RE: LM phone call to phone number - by Daniel - 23.08.2023, 14:11

Forum Jump: