Most settings, including account credentials and behavior (like auto-answer), are stored in microsip.ini
You want to build a Python script that auto-configures a SIP account, waits for a call, and logs the duration. microsip api documentation
that provides a Pythonic way to interact with MicroSIP, though it is a community-maintained tool. waits for a call
MicroSIP.exe report:status