Seit der Version 3.1beta beinhaltet PhonerLite eine einfache Möglichkeit der Steuerung per CLI (Command Line Interface).
Dieses muss man jedoch im Optionen-Menü erst aktivieren. Danach kann man mit einem Telnet-Client sich zu PhonerLite verbinden (Port 50600):
telnet localhost 50600
Ein Beispielscript um die Rufnummer 0123456780 anzurufen und wenn die Gegenstelle angenommen hat eine Wave-Datei (Beispiel: announcement.wav) abzuspielen:
If HasCall
Print Stop script due existing other call
Stop
EndIf
SetNumber 01234567890
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
Dies kann man jedoch nicht per Copy&Paste einfügen, da bei aktivem"Wait"-Kommando keine Eingabe möglich ist. Deshalb kann man ein Script in eine Datei speichern (Beispiel: script.txt") und dieses per
load script.txt
laden und ausführen.
Alternativ kann man das alles auch in eine Zeile schreiben, dann geht das auch per Copy&Paste, aber es sieht nicht mehr einfach lesbar aus:
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