PhonerLite logo

CLI - Command Line Interface

You can enable some kind of scripting via options menu: CLI access

If you have activated that you can connect to Port 50600 using a telnet client:

		  
	telnet localhost 50600
		  
		
An integrated script control is enabled by default.

CLI

You can enter commands like "help" or you can load a script from file. There some limitations like no nested "If" statements or no loop support. But you can load a script file - all current states and remaining commands are resetted.

The "Wait" and "If" command can check multiple conditions. They are comma separated and use a logical OR combination.

Examples

This example shows, how to initatiate an outgoing call and play a wave file when the call is established and after the file is played the call will be terminated:

		  
If HasCall
  Print Stop script due existing other call
  Stop
EndIf
SetNumber 0123456789
HookOff
Wait 5,HasCall
If !HasCall
  Print Stop script due no call could be created
  HookOn
  Stop
EndIf
Print Waiting for call is beeing answered within 30 seconds
Wait 30,!HasCall,StateIsActive
if !StateIsActive
  Print Call not answered within 30 seconds
  HookOn
  Stop
EndIf
Print Waiting 2 seconds before playing wave file
Wait 2
Wave announcement.wav
Print Waiting for wave file is being played
Wait !StateIsActive,WavePlayed
Wait 1
HookOn 
		  
		

You can't enter such script manually in that formatted way, because the "Wait" command may hide the prompt - so you can't enter further commands. You should save a script in a file (e.g. "script.txt") and enter the following command at the prompt: "load script.txt".

Alternativ kann man obiges Script auch in einer Zeile darstellen, die Zeilen werden durch "&" getrennt:

		  
If HasCall & Print Stop script due existing other call & Stop & EndIf & SetNumber 0123456789 & HookOff & Wait 5,HasCall & If !HasCall & Print Stop script due no call could be created & HookOn & Stop & EndIf & Print Waiting for call is beeing answered within 30 seconds & Wait 30,!HasCall,StateIsActive & if !StateIsActive & Print Call not answered within 30 seconds & HookOn & Stop & EndIf & Print Waiting 2 seconds before playing wave file & Wait 2 & Wave announcement.wav & Print Waiting for wave file is being played & Wait !StateIsActive,WavePlayed & Wait 1 & HookOn 
		  
		

Text-To-Speech (TTS)

You get an overview about installed languages by typing: "tts" command. The entry with asterisk (*) is the current active language.

		  
PL>tts
 0: Microsoft Hedda Desktop - German
*1: Microsoft Zira Desktop - English (United States)
 2: Microsoft Irina Desktop - Russian
		  
		
To switch to German language you can type: "tts 0".
You can initiate text to speech conversion by typing something like this: "say Hello world"
If no call is active you will hear the output via speaker - else the generated speech is transmitted instead of microphone signal.



(C) Heiko Sommerfeldt