PDA

View Full Version : 518 caller id component



mhwlng
May 13th, 2007, 06:32 AM
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



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 :


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 :



-- 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

Promixis
May 14th, 2007, 07:55 PM
Marcel, this is probably best done outside of the existing calleridmodem class

mhwlng
May 15th, 2007, 02:26 AM
I'm trying very hard not to introduce any non-official files in your component directory tree, as it changes a lot....

could promixis manage this code (very simple modification as mentioned above) ?



Marcel

Promixis
May 18th, 2007, 10:43 AM
I'm trying very hard not to introduce any non-official files in your component directory tree, as it changes a lot....

could promixis manage this code (very simple modification as mentioned above) ?



Marcel

That of course assumes that it doesn't break any existing installs -> especially the order of initialization.

mhwlng
May 18th, 2007, 11:00 AM
Mike, after your last comment, I thought that you wanted this code in a separate component with a different plugin id and not touch the original file ?

my comment was, that it would be easier, if you would manage this (slightly different) new callerid plugin, because your code changes regularly...

If you don't want to do that, then please give me a new plugin id, and I'll create a new plugin based on yours with just a few lines different...

Marcel

Promixis
May 23rd, 2007, 11:53 PM
Do most modems generate a NoCarrier when the line is picked up?

mhwlng
May 24th, 2007, 12:51 AM
I don't know, :) this is the only modem that I've use for callerid purposes...

I've got an ISDN line, so can't test other analog modems...


maybe if you want a separate callerid plugin for my dynalink modem, you can call it calleridisdn ?
Marcel