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.
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.
Command | Parameter | Comment |
Exit | disconnect from current CLI session | |
Quit | disconnect from current CLI session | |
CloseApp | close application | |
Else | if previous condition was not fullfilled | |
EndIf | terminate previous If statement | |
If | c | conditional execution depending on c. (see "Help If") |
Stop | discard all remaining script lines | |
Help | this help | |
Status | prints a list of current calls | |
HookOn | creates new call or answers incoming call | |
HookOff | disconnects call or rejects incoming call | |
Register | initiate new registration | |
CallWaitingOn | set call waiting to enabled | |
CallWaitingOff | set call waiting to disabled | |
ConferenceOn | enable conference mode | |
ConferenceOff | disable conference mode | |
DNDOn | enable "Do Not Disturb" | |
DNDOff | disable "Do Not Disturb" | |
HoldOn | set current call on hold | |
HoldOff | retrieve current call from hold | |
AnonymousOn | enable number suppression | |
AnonymousOff | disable number suppression | |
MicroOn | open the microphone sound device | |
MicroOff | close the microphone sound device | |
SpeakerOn | open the speaker sound device | |
SpeakerOff | close the speaker sound device | |
DesktopAlertOn | enable desktop notification for incoming calls | |
DesktopAlertOff | disable desktop notification for incoming calls | |
AutoHoldOn | enable auto hold if multiple calls exist | |
AutoHoldOff | disable auto hold if multiple calls exist | |
EchoOn | print all commands in script | |
EchoOff | don't print all commands in script | |
AutoAnswerOn | enable auto answer for incoming calls | |
AutoAnswerOff | disable auto answer for incoming calls | |
Transfer | [n] | ransfer current call to other call or new number n |
SetNumber | [n] | sets n as number for next call |
SetActive | id | sets the call with id as active call |
Digit | n | send DTMF n via active call |
ResetDigit | forget last received digit (DMTF) information | |
Wait | c | wait for condition c (see "Help Wait") |
Wave | f | play/send WAVE file f |
To [-F f] | send e-mail with optional attachment f | |
Telegram | ChatID [-F f] | send Telegramm message with optional attachment f |
Beep | Hz ms | play tone wit frequency Hz and duration ms |
Melody | n | play nth melody |
Joke | [l] | download joke, optional language l |
Say | s | transform s to wave (TTS) |
Tts | [i] | set/list available TTS engines |
Stt | [param] | set/list available STT engines |
ListenOn | experimental! start voice recognition (STT) from micro | |
ListenOff | experimental! stop voice recognition (STT) from micro | |
ListenFile | f | experimental! voice recognition (STT) from WAVE file f |
Ask | s | experimental! AI chat using Gemini asking s |
AskSay | s | experimental! AI chat using Gemini asking s, output via TTS |
ListenAskSayOn | experimental! start full audio AI chat using Gemini | |
ListenAskSayOff | experimental! stop full audio AI chat using Gemini | |
Set | [%n%=v] | assign variable n the value v or list all variables |
s | prints the string s | |
Load | f | load script lines from file f |
LoadCall | f | load script lines from file f for new call |
Record | [RemoteOnly] | start recording on actual call |
Exec | a | execute application a |
WaveIn | [i] | set/list available recording devices |
WaveOut | [i] | set/list available playback devices |
SetSilenceDuration | ms | set duration of silence in ms |
Pitch | n | pitch scale (0.1 - 1.0) |
Update | check for new available program update |
Wait c wait for condition c
If c conditional execution depending on c
Condition | Syntax |
c | 1*(time / call / state / direction / wave / digit / silence / ",") |
num | ("1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / "0") |
time | 1*num |
call | [!]"HasCall" / "NewCall" / "EndCall" |
state | ([!]"StateIsConn" / "State=Conn" / "State!=Conn" / [!]"StateIsRing" / "State=Ring" / "State!=Ring" / [!]"StateIsActive" / "State=Active" / "State!=Active" / [!]"StateIsDisc" / "State=Disc" / "State!=Disc" / "StateChanged") |
direction | ([!]"IsIncoming" / [!]"IsOutgoing") |
wave | "WavePlayed" |
silence | "IsSilence" |
digit | ("DigitIs"num / "Digit="num) |
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
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.
If there are multiple calls in parallel - it makes sense to to use a sub script per call. This can be achieved by using such distribution script:
Wait NewCall
LoadCall script_newcall.txt
Load %LOAD_FILE%
Per default an existing call will be set to hold when a further call is accepted. To avoid this you can deactivate that behaviour. The following script deactivates the notification window for incoming calls additionally.:
DesktopAlertOff
AutoHoldOff
Wait NewCall
LoadCall script_newmulticall.txt
Load %LOAD_FILE%
Using 64-bit version of PhonerLite audio transcription is supported by using a special version of Whisper.cpp. No external services via Internet will be used - all calculations are running locally on the PC. Just type "stt" to check if the needed files are available. By typing "stt install" the needed files are downloaded (~465 MB). By default the small model is downloaded. If you want a better one - type "stt install medium". But be aware that this models size is ~1.42 GB. At the moment an audio file (.wav) can be transcribed by using the "ListenFile" command. Depending of the file size and the available GPU this may last a while. The result is printed at console and also stored in variable %STT%. Using "ListenOn" and later "ListenOff" a kind of live transcription can be tried. If no call is active the microphone signal is used, else the received audio from network will be transcribed.
The language used for transcription is the one selected as language for PhonerLite GUI. To use a different language you can enter the the short id of the langage, e.g. "stt 1 de" will use the small model and German language.