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:
Outgoing Call logging with Weeder DTMF unit
Bill Walters
Thu, 26 Aug 1999 00:27:22 -0500
Thu, 26 Aug 1999 00:27:22 -0500
All,

I have successfully modified Garnett Bailey's original event to use the Weeder DTMF
unit.  I've also used code from Mike Hardy who first worked with the Weeder unit several
years ago; however, he never posted his "final" code.

With apologies for formatting and "shorthand" in defining events, here's the code:

If you have any specific questions, I'll try to answer them.

Bill Walters





Items Needed:
=============

If not listed specifically, the initial state of each item is (None)


Weeder Telephone IX (Serial-Byte, user/user, 1200/8/n/1 & port connected to)

Weeder T/C I   (Telephone Interface custom type; see itpcst.def at end,
  user/owner, init.state=none)

NUMBER-DIALED (Text item, user/user, init. state = none, Text="")

Log Call (True/False item, user/user, init.state = false)

MSG-NUM DIALED (Text item, user/user, Text = "Outgoing call to ==> "

LOG TELEPHONE (Text item, user/user, Text = " "

Outgoing Call (Text item, user/user, Text = " "

DIGIT NUMBER 1 (True/False,user/user, init.state = false

DIGIT NUMBER 2 (True/False,user/user, init.state = false

LOG telephone (State Log,owner/owner, init.state = none, name="TEL 9908.LOG"
              note:  Log maintenance event changes name of log file on 1st of
                     each month, i.e. TEL 9908.log = August 99

LOCAL CONTROL (Text, user/user, Text = "Local Control"

FIRST BUTTON (True/False, user/user, init.state = false

second num-dialed (True/False, user/user, init.state = false

Here's the event:


: Original Event Programming by Garnett Bailey as taken from his
;   discussion in the ECS Archives @ ftp.gallops.com
;
;
; Edited 8/18/99
; ECS DOS "Local-Phone-Button" references deleted
; and changes made to reflect addition of Weeder telephone interface
; which intercepts touchtones and after 5 seconds of silence, sends
; them out in a string prefaced with "O" (Letter Oh, not zero), and
; terminated with C/R

If         Weeder Telephone IX Is         Disconnected
Then       Event-Exit          Set        True

If         Weeder Telephone IX Is Not     None
Then       Weeder T/C I        Set        Weeder Telephone IX

;
;  Test for letter Oh (not zero) and throw it away, next characters are valid
;
If         Weeder T/C I        Is         O
Then       FIRST BUTTON        Set        True
Then       second num-dialed   Set        False
Then       Event-Exit          Set        True
;
;    Test for CR (carrage return) and if true, write number to logs
;       and reset various flags
;
BEGINIF    Weeder T/C I        Is         CR
If         LOG-CALL            Is         True
Then       Outgoing Call       T1<-T1     MSG-NUM DIALED
Then       Outgoing Call       T1/A<-T1   NUMBER-DIALED
Then       Outgoing Call       Set        Log
Then       LOG telephone       Set        Outgoing Call

;the line above copies the outgoing number into
;the TEL XXXX.LOG file

Do         LOG-CALL            Set        False
Do         DIGIT NUMBER 1      Set        False
Do         DIGIT NUMBER 2      Set        False
Do         DIGIT NUMBER        Set        0
Do         Event-Exit          Set        True
ENDIF      

BEGINIF    FIRST BUTTON        Is         True
If         Weeder T/C I        Is         *
Or         Weeder T/C I        Is         #
hen       FIRST BUTTON        Set        False
Then       LOG telephone       Set        Local Control
Then       Local Control       Set        Log
Then       Event-Exit          Set        True
Else If    Weeder T/C I        Is GE      0
And        Weeder T/C I        Is LE      9
Then       LOG-CALL            Set        True
Then       NUMBER-DIALED       Set        Re-Define Text
Then       FIRST BUTTON        Set        False
Do         second num-dialed   Set        True
ENDIF      

If         LOG-CALL            Is         True
Then       DIGIT NUMBER        Add        1
Then       NUMBER-DIALED       Set        Weeder T/C I

BEGINIF    second num-dialed   Is         True
If         Weeder T/C I        Is         1
Then       NUMBER-DIALED       Set        -
Then       DIGIT NUMBER 1      Set        True
Do         second num-dialed   Set        False
ENDIF      

If         DIGIT NUMBER        Is         3
And        DIGIT NUMBER 1      Is         False
Then       NUMBER-DIALED       Set        -

If         DIGIT NUMBER        Is         4
And        DIGIT NUMBER 1      Is         True
Then       NUMBER-DIALED       Set        -
Then       DIGIT NUMBER 2      Set        True

If         DIGIT NUMBER        Is         7
And        DIGIT NUMBER 1      Is         True
And        DIGIT NUMBER 2      Is         True
Then       NUMBER-DIALED       Set        -

END




Here is the addition to your ITPCST.DEF file:


|TYPE:  Telephone Interface
|       0                       48        
|       1                       49
|       2                       50
|       3                       51
|       4                       52
|       5                       53
|       6                       54
|       7                       55
|       8                       56
|       9                       57
|       A                       65
|       B                       66
|       C                       67
|       D                       68
|       *                       42
|       #                       35
|       O                       79
|       CR                      13
|










All,
 
I have successfully modified Garnett Bailey's original event to use the Weeder DTMF unit.  I've also used code from Mike Hardy who first worked with the Weeder unit several years ago; however, he never posted his "final" code.
 
With apologies for formatting and "shorthand" in defining events, here's the code:
 
If you have any specific questions, I'll try to answer them.
 
Bill Walters
 
 
 
 
 
Items Needed:
=============
 
If not listed specifically, the initial state of each item is (None)
 

Weeder Telephone IX (Serial-Byte, user/user, 1200/8/n/1 & port connected to)
 
Weeder T/C I   (Telephone Interface custom type; see itpcst.def at end,
  user/owner, init.state=none)
 
NUMBER-DIALED (Text item, user/user, init. state = none, Text="")
 
Log Call (True/False item, user/user, init.state = false)
 
MSG-NUM DIALED (Text item, user/user, Text = "Outgoing call to ==> "
 
LOG TELEPHONE (Text item, user/user, Text = " "
 
Outgoing Call (Text item, user/user, Text = " "
 
DIGIT NUMBER 1 (True/False,user/user, init.state = false
 
DIGIT NUMBER 2 (True/False,user/user, init.state = false
 
LOG telephone (State Log,owner/owner, init.state = none, name="TEL 9908.LOG"
              note:  Log maintenance event changes name of log file on 1st of
                     each month, i.e. TEL 9908.log = August 99
 
LOCAL CONTROL (Text, user/user, Text = "Local Control"
 
FIRST BUTTON (True/False, user/user, init.state = false
 
second num-dialed (True/False, user/user, init.state = false
 
Here's the event:
 

: Original Event Programming by Garnett Bailey as taken from his
;   discussion in the ECS Archives @ ftp.gallops.com
;
;
; Edited 8/18/99
; ECS DOS "Local-Phone-Button" references deleted
; and changes made to reflect addition of Weeder telephone interface
; which intercepts touchtones and after 5 seconds of silence, sends
; them out in a string prefaced with "O" (Letter Oh, not zero), and
; terminated with C/R
 
If         Weeder Telephone IX Is         Disconnected
Then       Event-Exit          Set        True
 
If         Weeder Telephone IX Is Not     None
Then       Weeder T/C I        Set        Weeder Telephone IX
 
;
;  Test for letter Oh (not zero) and throw it away, next characters are valid
;
If         Weeder T/C I        Is         O
Then       FIRST BUTTON        Set        True
Then       second num-dialed   Set        False
Then       Event-Exit          Set        True
;
;    Test for CR (carrage return) and if true, write number to logs
;       and reset various flags
;
BEGINIF    Weeder T/C I        Is         CR
If         LOG-CALL            Is         True
Then       Outgoing Call       T1<-T1     MSG-NUM DIALED
Then       Outgoing Call       T1/A<-T1   NUMBER-DIALED
Then       Outgoing Call       Set        Log
Then       LOG telephone       Set        Outgoing Call
 
;the line above copies the outgoing number into
;the TEL XXXX.LOG file
 
Do         LOG-CALL            Set        False
Do         DIGIT NUMBER 1      Set        False
Do         DIGIT NUMBER 2      Set        False
Do         DIGIT NUMBER        Set        0
Do         Event-Exit          Set        True
ENDIF     
 
BEGINIF    FIRST BUTTON        Is         True
If         Weeder T/C I        Is         *
Or         Weeder T/C I        Is         #
hen       FIRST BUTTON        Set        False
Then       LOG telephone       Set        Local Control
Then       Local Control       Set        Log
Then       Event-Exit          Set        True
Else If    Weeder T/C I        Is GE      0
And        Weeder T/C I        Is LE      9
Then       LOG-CALL            Set        True
Then       NUMBER-DIALED       Set        Re-Define Text
Then       FIRST BUTTON        Set        False
Do         second num-dialed   Set        True
ENDIF     
 
If         LOG-CALL            Is         True
Then       DIGIT NUMBER        Add        1
Then       NUMBER-DIALED       Set        Weeder T/C I
BEGINIF    second num-dialed   Is         True
If         Weeder T/C I        Is         1
Then       NUMBER-DIALED       Set        -
Then       DIGIT NUMBER 1      Set        True
Do         second num-dialed   Set        False
ENDIF     
If         DIGIT NUMBER        Is         3
And        DIGIT NUMBER 1      Is         False
Then       NUMBER-DIALED       Set        -
If         DIGIT NUMBER        Is         4
And        DIGIT NUMBER 1      Is         True
Then       NUMBER-DIALED       Set        -
Then       DIGIT NUMBER 2      Set        True
If         DIGIT NUMBER        Is         7
And        DIGIT NUMBER 1      Is         True
And        DIGIT NUMBER 2      Is         True
Then       NUMBER-DIALED       Set        -
 
END
 
 
 

Here is the addition to your ITPCST.DEF file:
 

|TYPE:  Telephone Interface
|       0                       48       
|       1                       49
|       2                       50
|       3                       51
|       4                       52
|       5                       53
|       6                       54
|       7                       55
|       8                       56
|       9                       57
|       A                       65
|       B                       66
|       C                       67
|       D                       68
|       *                       42
|       #                       35
|       O                       79
|       CR                      13
|
 
 
 
 
 
 
 
 

  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
.