@echo off
:loop
MicroSIP.exe report:status | find "Ringing" > nul
if %errorlevel% equ 0 (
MicroSIP.exe answer
echo Answered at %time%
)
timeout /t 1
goto loop
To get audio device IDs for SetDevice:
MicroSIP.exe --listdevices
Output:
Output devices:
0: Speakers (Realtek)
1: Headphones (USB Audio)
Input devices:
0: Microphone (Realtek)
1: Headset mic (USB)
Then send: [SetDevice(output,1)]
The simplest way to interact with MicroSIP is through command-line arguments. You can call these from cmd, PowerShell, CreateProcess, or any scripting language. microsip api documentation
MicroSIP.exe [command] [parameter]
MicroSIP does not push events to an API. To get call status programmatically, you have two options: @echo off :loop MicroSIP