ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
Re: RE: RE: [ECS] Database Idea
Scott Danks
Tue, 11 Jul 2000 15:26:39 -0500

 Tue, 11 Jul 2000 15:26:39 -0500
Let me tell you what I did and why I'm looking for a better way.  I wrote a complex
(to me at least) event that will do several things.  When someone calls I wanted to
have a special greeting played for them, and then based on who they were have different
options on how to handle their call.  I surmised that I wanted to have a special wave
file played for probably 30-40 people, and for certain people, I would like to have
a range, so if they dont have a specific wav file, but are in the 3000-3200 range they
would get a generic message for that range.  i.e. friends, or business associates etc.
 So rather than have hundreds of if then statements, I get the callerid and got to the
file and opwn it and parse the first few characters of line for the phone number, if
it is a match (sometimes with wildcard characters) then it plays the wav file associated.
 Also if they are greater than say 3000 but less than 3200 and no special wav file is
recorded they get the 3200 general wav file played for them.  The idea is if there is
a special wav file then the program finds it before it hits the general wav file for
that group.  This works fine and all i have to do to add someone is edit the file and
record a special greeting for them.  Then in the file put the wav file name and the
event renames the greeting message to their wav file name and plays it.  This was an
interesting coding problem with having to read the file one byte at a time and I would
have loved to be able to check the phone number again the "pnumber" field of a database
and if it is not a match check the next record etc.  Then if a match, just set my other
variables to the other fields for that record.  I have an i/o card that I want to do
this with, and now I want to add flags for if this phone call should be sent to pager
or not and maybe what hours, and if it should be allowed to ring through after hours,
maybe based on if I'm in bed or not.  So I thought it might be easier to reference fieldnames
(variables) in a database rather than read a byte and build my text variable and if
a delimiter is read, then transfer that variable to right one for the next event etc....
 I was just wondering if you guys did anything different.  My hope was to use access
to make a form with the person's name, phone number, and dropdowns that set fields based
on the above, then if ECS could open the database with dde or obdc, it could read these
entries and not have to parse through the files.....  good idea or bad idea?


>>> "Michael David" <michael@michaeldavid.com> 07/11 12:18 PM >>>
Hi Scott!

You can write a simple ECS event to play a specific .wav file when a
particular person calls.  I'm not sure why you'd want to do this outside of
ECS.  What am I missing?

What exactly are you trying to accomplish?

Cheers!

Michael David
michael@michaeldavid.com 


-----Original Message-----
From: Scott Danks [mailto:sdanks@ci.tulsa.ok.us] 
Sent: Tuesday, July 11, 2000 10:33 AM
To: ecs-list@netbloc.com 
Subject: Re: RE: [ECS] Database Idea

For any of you that are playing unique wav files based on callerid, are you
doing a lookup in a text file, and if you are, how are you doing this?  I
wrote one that opens the text file and parses through it looking for a space
as a delimiter and then copies the contents of the characters read into a
variable and then renames the default wav file to play, and then it answers
the phone.  But reading the characters one at a time and concatenating and
looping, . . . .   I dread the idea of writing another one, as complicated
as this one was.

How does everyone else do this?





  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.