I have a problem with Caller ID detection from a modem.
I am using the Serial plugin which works great. When the phone rings I see the modem events. This is a great thing if I want to react on the
Serial.\nRING event (when the phone is ringing), however the Caller ID is transferred as Serial.\nNMBR = 555123456
As you can see the Caller ID is transferred as a part of the event name.
The macro would work fine if I had a gneric event:
Code: Select all
#get current event
event = eg.EventString
#check if it is the Caller ID Event
sfind = 'NMBR' in event
if sfind is True : print sfind
else : eg.StopMacro
#get the caller ID starting at the 16th digit
event = event[16:len(event)]
#store the number in global variable
eg.globals.myCallerID = event
Serial.
Serial.*
Serial.\nNMBR{*}
Serial.{*}
Serial{*}
the Wildcards don't seem to have an effect...
Any ideas what can help?