Microsip Api Documentation

MicroSIP does not provide a formal REST or web API. Instead, it offers a robust Command Line Interface (CLI) external event triggers

that allow other applications to control the softphone or react to incoming calls. 🔌 Controlling MicroSIP (Outbound) You can control an active MicroSIP instance by running microsip.exe

with specific command-line arguments. If the application is already running, it will process the command without opening a new window. Make a Call: microsip.exe sip:number@domain microsip.exe number Hang Up Call: microsip.exe /hangup Answer Call: microsip.exe /answer Minimize to Tray: microsip.exe /hide Restore Window: microsip.exe /show Exit Application: microsip.exe /exit 🔔 Handling Events (Inbound)

MicroSIP can trigger external scripts or applications based on call status. This is configured in App events Incoming Call: You can specify a command to run when a call arrives. Placeholders: %callerid% to pass the caller's number to your custom script. C:\Scripts\log_call.bat %callerid% Call End/Answer:

Similar triggers exist for when a call is answered or terminated. Spiceworks Community 🛠️ Developer Resources Since MicroSIP is based on the PJSIP stack

, developers looking for deep integration often look at the underlying library documentation. Source Code: Available on the MicroSIP Source Page for custom builds. PJSIP Documentation: microsip api documentation

Essential for understanding how the core SIP signaling works. Python Wrapper: A community-maintained microsip-api

exists on PyPI, though it is often used for interacting with MicroSIP's local database or configuration files rather than live call control. 💡 Integration Examples Click-to-Call: Many CRMs use the

protocol handlers. You can register MicroSIP as the default handler for these links in Windows Settings. Database Access: MicroSIP stores contacts and call logs in a FirebirdSQL database ( Contacts.db or similar), which can be read by external reporting tools. If you'd like, I can help you with: batch script to handle incoming %callerid% Setting up URL protocol handling for click-to-call. Locating specific PJSIP library functions for a custom build. MicroSIP online help

This is a comprehensive guide to interacting with MicroSIP programmatically.

Unlike modern VoIP softphones (like Zoiper or Linphone), MicroSIP does not have a built-in HTTP/REST API or a WebSocket interface. Instead, it relies on Standard Windows Command Line Arguments and Windows Message Hooks. MicroSIP does not provide a formal REST or web API

This guide covers how to control MicroSIP externally using these methods.


6. Integration Best Practices

1. Command-Line Interface (CLI)

MicroSIP accepts command-line arguments for basic control:

# Make a call
MicroSIP.exe "sip:number@domain"

Scenario 3: DTMF Automation for IVR Navigation

# PowerShell script to dial a conference bridge
Start-Process "MicroSIP.exe" -ArgumentList "callto:5551234567"
Start-Sleep -Seconds 5
Start-Process "MicroSIP.exe" -ArgumentList "dtmf:123456#"
Start-Sleep -Seconds 2
Start-Process "MicroSIP.exe" -ArgumentList "dtmf:1"

Part 3: The DDE API – Runtime Control (Most Important)

The DDE interface is what transforms MicroSIP into an integrated telephony component. You can send commands while the softphone runs in the background (even in system tray).

Part 3: Advanced API – Windows Messaging (WM_COPYDATA)

For real-time integration without launching new processes, MicroSIP listens for Windows WM_COPYDATA messages. This allows you to control an existing instance from another app (e.g., C#, C++, AutoHotkey, or Python with win32gui).

Sending Commands

You can use SendMessage or PostMessage to interact with the application. Part 3: The DDE API – Runtime Control

Command IDs (Decimal): These IDs correspond to menu items and buttons within the app. You send the WM_COMMAND message to the main window handle.

| Action | Command ID (Approximate) | | :--- | :--- | | Answer Call | 40001 | | Hangup / Reject | 40002 | | Redial | 40003 |

Note: Command IDs can change between versions. Use a tool like Spy++ to verify IDs in your specific version.


Part 8: Security Best Practices for the API

  1. Avoid --password in plain-text batch files – Use Windows Credential Manager or environment variables.
  2. Restrict local DDE clients – Any running app can send DDE; sandbox your CRM accordingly.
  3. Run MicroSIP under a low-privilege Windows user if used in a kiosk.
  4. Obfuscate dialplan – Do not hardcode long-distance prefixes in visible scripts.

3. Configuration "API" (INI File)

MicroSIP stores all settings in a standard .ini file. You can programmatically read and write to this file to configure accounts, codecs, and network settings.

File Location: By default, the configuration file is located in the user's AppData folder: %APPDATA%\MicroSIP\microsip.ini

(Note: If you are using the portable version, the .ini file is in the same folder as the executable.)