I've switched from my serial lua plugin to your caller id component.
But I had to change Classes\CallerIDModem.lua
I have a Dynalink IS128AE modem and, for callerid, it requires the init string : AT#C1
so, I changed
Code:
local ModemInitStrings = {
"AT#CID=1",
"AT+VCID=1",
"AT#C1", -- Dynalink modem
"AT#CLS=8#CID=1",
"AT#CC1",
"AT*ID1",
"AT%CCID=1",
"AT%CCID=3"}
(note that AT+VCID=1 also succeeds on my modem, but has no effect on caller id)
the second problem is that the data returned is in this format :
Code:
RING
Caller: 1234567
RING
RING
RING
RING
NO CARRIER <- when picking up the phone
and the third problem is that I needed two events : one to send the number(+name after lookup in access db) to NR and G2G and another event when the phone is picked up (to remove the OSD from the screen/lcd display etc.)
So, I changed OnReceiveData :
Code:
-- parse response
if ( string.find(data, "Caller: ") ) then
self.Call.Number = string.sub(data,9,-1)
_, _,self.Call.Number = string.find(self.Call.Number, '^%s*(.-)%s*$')
self:CallerIDCollected ()
elseif ( string.find(data, "NO CARRIER") ) then -- clear call
self.Call.Number = "CALL ENDED"
self:CallerIDCollected ()
elseif ( string.find(data, "RING") ) then -- clear call
...
...
Could you please add something like above to your official release, or alternatively, add something like this in a class with a different plugin id ?
Marcel