Script Examples
50
40-400-00025, Rev. D
Example of a Dual Scr
Example of a Dual Scr
Example of a Dual Scr
Example of a Dual Scr
Example of a Dual Script:
ipt:
ipt:
ipt:
ipt:
Note that in a dual script the first script can only access lines 1 & 2 and the second script can only access
lines 3 & 4.
;send a dual script
:0,TS_SCRIPTMODE,TP_SCRIPT_DUAL
;start of script number 1
:0,TS_STARTDEF,1
;use configuration 1 for line 1
:0,TS_EXECUTE,TC_SELECTCONFIG,1,TP_LINE1
;wait until line 2 is on-hook
:0,TS_WAITONHOOK,TP_LINE2
;wait until line 1 is off-hook
:0,TS_WAITOFFHOOK,TP_LINE1
;send dialtone to line 1
:0,TS_EXECUTE,TC_SENDTONE,TP_DIALTONE,TP_LINE1
;enable dtmf detection on line 1
:0,TS_EXECUTE,TC_DIALDETECT,TP_LINE1,TP_ENABLE
Note 1
Note 1
Note 1
Note 1
Note 1
;set 5 sec delay
:0,TS_DELAY,5000
;if dtmf is detected on line 1 jump to the start of the script
:0,TS_RESTARTCONDITION,TP_DIALDETECTED,TP_LINE1
Note 2
Note 2
Note 2
Note 2
Note 2
;ring line 2 using group 1 cadence and
;send caller ID using name and number from line 1
:0,TS_EXECUTE,TC_RING,TP_RING_GROUP1,TP_LINE2,TP_LINE1
;wait until line 2 goes off-hook
:0,TS_WAITOFFHOOK,TP_LINE2
;wait until line 1 goes on-hook
:0,TS_WAITONHOOK,TP_LINE1
;wait until line 2 goes on-hook
:0,TS_WAITONHOOK,TP_LINE2
;end script 1
:0,TS_ENDDEF
;start of script number 2
:0,TS_STARTDEF,2
;use configuration 1 for line 3
:0,TS_EXECUTE,TC_SELECTCONFIG,1,TP_LINE3
;wait for on-hook on line 4
:0,TS_WAITONHOOK,TP_LINE4
;wait for off-hook on line 3
:0,TS_WAITOFFHOOK,TP_LINE3
;send dialtone to line 3
:0,TS_EXECUTE,TC_SENDTONE,TP_DIALTONE,TP_LINE3
;enable dtmf detection on line 3
:0,TS_EXECUTE,TC_DIALDETECT,TP_LINE3,TP_ENABLE
Note 1
Note 1
Note 1
Note 1
Note 1
;wait for detection of dial string 5551212
:0,TS_WAITDIAL,5551212,TP_LINE3
Note 3
Note 3
Note 3
Note 3
Note 3
;wait 5 seconds
:0,TS_DELAY,5000
;ring line 4 using group 1 cadence and
;send caller ID using name and number from line 3
:0,TS_EXECUTE,TC_RING,TP_RING_GROUP1,TP_LINE4,TP_LINE3
;wait for off-hook on line 4