Documentation - Microsip Api

MicroSIP primarily interacts with external systems through command-line arguments and event-driven execution defined in the microsip.ini configuration file.

Core Parameters Table

| Parameter | Description | Example | |-----------|-------------|---------| | --dn | Display Name | --dn "John Doe" | | --user | SIP Username (auth ID) | --user 101 | | --domain | SIP Domain / Registrar | --domain sip.mycompany.com | | --password | SIP Password (plain text, be cautious) | --password secret123 | | --proxy | Outbound proxy (optional) | --proxy 192.168.1.100:5060 | | --stun | STUN server for NAT | --stun stun.l.google.com:19302 | | --call | Immediately dial a number after launch | --call "5551234" | | --autoanswer | Automatically answer incoming calls (0/1) | --autoanswer 1 | | --dialplan | Prepend digits for external calls (e.g., 9 for outside line) | --dialplan "9,<.*>" | | --show | Window state: normal, minimized, hidden | --show hidden | | --debug | Enable SIP trace to file | --debug C:\logs\sip.log | | --log | Log calls to CSV | --log C:\logs\calls.csv | | --setvolume | Initial speaker volume (0–100) | --setvolume 80 | | --micvolume | Microphone volume | --micvolume 90 | microsip api documentation

3.2.3 Example C++ Snippet

COPYDATASTRUCT cds;
cds.dwData = 1; // 1 = DIAL command
std::string number = "1001";
cds.cbData = number.size() + 1;
cds.lpData = (void*)number.c_str();
SendMessage(hWnd, WM_COPYDATA, (WPARAM)hwndSender, (LPARAM)&cds);

Typical use cases for integrating MicroSIP Asterisk/FreeSWITCH as a SIP server (has REST APIs)

[Account]
Account=name@example.com      ; The SIP username/domain
Domain=example.com            ; SIP Domain (optional)
Proxy=sip:proxy.example.com   ; Outbound proxy (optional)
AuthID=1001                   ; Authentication ID (if different from username)
Password=secret123            ; Plain text password
DisplayName=John Doe          ; Caller ID Name

For deep integration where your app needs to know the status of a call (e.g., is it ringing, connected, or ended?), you must use Windows Messages (WM_COPYDATA). This allows bidirectional communication: is it ringing

Ensure your external scripts do not lock up or create infinite loops. Because MicroSIP executes these scripts synchronously, a hung script could cause the softphone UI to freeze. Always run heavy operations asynchronously or in the background from your initial trigger script. Next Steps for Your Integration