skills$openclaw/dsiprouter
mackhendricks7.7kβ˜…

by mackhendricks

dsiprouter – OpenClaw Skill

dsiprouter is an OpenClaw Skills integration for coding workflows. Call the dSIPRouter REST API using the Postman collection (curl + jq).

7.7k stars6.0k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namedsiprouter
descriptionCall the dSIPRouter REST API using the Postman collection (curl + jq). OpenClaw Skills integration.
ownermackhendricks
repositorymackhendricks/dsiprouter-skill
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @mackhendricks/dsiprouter-skill
last updatedFeb 7, 2026

Maintainer

mackhendricks

mackhendricks

Maintains dsiprouter in the OpenClaw Skills directory.

View GitHub profile
File Explorer
8 files
.
bin
dsiprouter.sh
15.8 KB
postman
dsiprouter.postman_collection.json
27.5 KB
_meta.json
285 B
LICENSE.txt
16.3 KB
README.md
6.5 KB
SKILL.md
4.0 KB
SKILL.md

name: dsiprouter description: Call the dSIPRouter REST API using the Postman collection (curl + jq). metadata: {"openclaw":{"emoji":"πŸ“‘","requires":{"bins":["curl","jq"],"env":["DSIP_ADDR","DSIP_TOKEN"]}}}

dSIPRouter API skill

This skill is generated from the Postman collection and provides:

  • a safe curl calling convention
  • a bin/dsiprouter.sh helper CLI with subcommands for the collection’s requests
  • example payloads (where present in Postman)

Required environment

  • DSIP_ADDR β€” hostname/IP of your dSIPRouter node (no scheme)
  • DSIP_TOKEN β€” API bearer token
  • Optional: DSIP_INSECURE=1 to allow self-signed TLS (adds -k)

Base URL:

  • https://$DSIP_ADDR:5000/api/v1

Auth header:

  • Authorization: Bearer $DSIP_TOKEN

Safe calling convention

dsip_api() {
  local method="$1"; shift
  local path="$1"; shift

  local insecure=()
  if [ "${DSIP_INSECURE:-}" = "1" ]; then insecure=(-k); fi

  curl "${insecure[@]}" --silent --show-error --fail-with-body \
    --connect-timeout 5 --max-time 30 \
    -H "Authorization: Bearer ${DSIP_TOKEN}" \
    -H "Content-Type: application/json" \
    -X "${method}" "https://${DSIP_ADDR}:5000${path}" \
    "$@"
}

Preferred usage: the bundled helper CLI

# list subcommands
dsiprouter.sh help

# list endpoint groups
dsiprouter.sh endpointgroups:list | jq .

# create inbound mapping with your own JSON payload
dsiprouter.sh inboundmapping:create '{"did":"13132222223","servers":["#22"],"name":"Taste Pizzabar"}' | jq .

# or send the Postman sample body
dsiprouter.sh inboundmapping:create --sample | jq .

Kamailio

dsiprouter.sh kamailio:stats | jq .
dsiprouter.sh kamailio:reload | jq .

Endpoint catalog (from Postman)

endpointgroups

  • endpointgroups:list β†’ GET /api/v1/endpointgroups
  • endpointgroups:get β†’ GET /api/v1/endpointgroups/9 β€” Get a single endpointgroup
  • endpointgroups:create β†’ POST /api/v1/endpointgroups β€” Create an endpointgroup
  • endpointgroups:create_1 β†’ POST /api/v1/endpointgroups β€” Create an endpointgroup
  • endpointgroups:create_2 β†’ POST /api/v1/endpointgroups β€” Create an endpointgroup
  • endpointgroups:create_3 β†’ POST /api/v1/endpointgroups β€” Create an endpointgroup
  • endpointgroups:delete β†’ DELETE /api/v1/endpointgroups/53 β€” Delete endpointgroup
  • endpointgroups:update β†’ PUT /api/v1/endpointgroups/34 β€” Update an endpointgroup

kamailio

  • kamailio:reload β†’ POST /api/v1/reload/kamailio β€” Trigger a reload of Kamailio. This is needed after changes are made
  • kamailio:list β†’ GET /api/v1/kamailio/stats β€” Obtain call statistics

inboundmapping

  • inboundmapping:list β†’ GET /api/v1/inboundmapping β€” Get a list of inboundmappings
  • inboundmapping:create β†’ POST /api/v1/inboundmapping β€” Create new inboundmapping
  • inboundmapping:update β†’ PUT /api/v1/inboundmapping?did=13132222223 β€” Create new inboundmapping
  • inboundmapping:delete β†’ DELETE /api/v1/inboundmapping?did=13132222223 β€” Create new inboundmapping

leases

  • leases:list β†’ GET /api/v1/lease/endpoint?email=mack@goflyball.com&ttl=5m β€” Get a single endpointgroup
  • leases:list_1 β†’ GET /api/v1/lease/endpoint?email=mack@goflyball.com&ttl=1m&type=ip&auth_ip=172.145.24.2 β€” Get a single endpointgroup
  • leases:revoke β†’ DELETE /api/v1/lease/endpoint/34/revoke β€” Get a single endpointgroup

carriergroups

  • carriergroups:list β†’ GET /api/v1/carriergroups
  • carriergroups:create β†’ POST /api/v1/carriergroups

auth

  • auth:create β†’ POST /api/v1/auth/user
  • auth:update β†’ PUT /api/v1/auth/user/2
  • auth:delete β†’ DELETE /api/v1/auth/user/2
  • auth:list β†’ GET /api/v1/auth/user
  • auth:login β†’ POST /api/v1/auth/login

cdr

  • cdr:get β†’ GET /api/v1/cdrs/endpointgroups/17?type=csv&dtfilter=2022-09-14&email=True
  • cdr:get_1 β†’ GET /api/v1/cdrs/endpoint/54

Included files

  • bin/dsiprouter.sh
README.md

dSIPRouter Skill

A powerful Bash-based skill for interacting with the dSIPRouter REST API. Generated from the included Postman collection, this skill provides a convenient CLI and a safe curl-based calling convention.

Are you looking for our MCP Server? It's located here

Installation

Prerequisites

Before installing this skill, ensure you have the following tools available on your system:

  • curl β€” For making HTTP requests
  • jq β€” For JSON processing and formatting
  • Bash β€” Version 4.0 or later

You can verify these are installed:

command -v curl && command -v jq && bash --version

On macOS, install missing tools using Homebrew:

brew install curl jq

On Linux (Ubuntu/Debian):

sudo apt-get install curl jq

Installation Steps

  1. Clone or copy the repository:
git clone https://github.com/dOpensource/dsiprouter-skill
cd dsiprouter-skill
  1. Make the CLI executable:
chmod +x bin/dsiprouter.sh
  1. Add to your PATH (optional but recommended):
# Copy to a directory in your PATH
sudo cp bin/dsiprouter.sh /usr/local/bin/

# Or add the current directory to PATH in your shell profile
export PATH="$PWD/bin:$PATH"
  1. Configure environment variables:

Set the required environment variables for your dSIPRouter instance:

export DSIP_ADDR="your-dsiprouter-host"    # e.g., "192.168.1.100" or "dsip.example.com"
export DSIP_TOKEN="your-api-bearer-token"  # Your API token from dSIPRouter

For self-signed certificates, you can also set:

export DSIP_INSECURE=1  # Allows connections to servers with self-signed TLS certificates

To make these permanent, add them to your shell profile (~/.bashrc, ~/.zshrc, etc.).

Quick Start

List Available Commands

dsiprouter.sh help

Basic Usage Examples

List all endpoint groups:

dsiprouter.sh endpointgroups:list | jq .

Get a specific endpoint group:

dsiprouter.sh endpointgroups:get | jq .

Create an inbound mapping:

dsiprouter.sh inboundmapping:create '{"did":"13132222223","servers":["#22"],"name":"My Location"}' | jq .

Check Kamailio statistics:

dsiprouter.sh kamailio:list | jq .

Reload Kamailio after making changes:

dsiprouter.sh kamailio:reload | jq .

Available Skills

This skill provides command groups organized by resource type. Each command follows the pattern:

dsiprouter.sh <resource>:<action> [options]

Endpoint Groups

Manage endpoint groups and SIP endpoints:

  • endpointgroups:list β€” List all endpoint groups
  • endpointgroups:get β€” Get details of a specific endpoint group
  • endpointgroups:create β€” Create a new endpoint group
  • endpointgroups:update β€” Update an existing endpoint group
  • endpointgroups:delete β€” Delete an endpoint group

Kamailio Management

Monitor and manage the Kamailio SIP server:

  • kamailio:list β€” Get Kamailio call statistics
  • kamailio:reload β€” Trigger a Kamailio reload (required after configuration changes)

Inbound Mapping

Configure DID (Direct Inward Dialing) to endpoint mapping:

  • inboundmapping:list β€” List all inbound mappings
  • inboundmapping:create β€” Create a new inbound mapping
  • inboundmapping:update β€” Update an existing inbound mapping
  • inboundmapping:delete β€” Delete an inbound mapping

Leases

Manage endpoint leases:

  • leases:list β€” List active endpoint leases
  • leases:revoke β€” Revoke an endpoint lease

Carrier Groups

Manage carrier/trunk configurations:

  • carriergroups:list β€” List all carrier groups
  • carriergroups:create β€” Create a new carrier group

Authentication

User management:

  • auth:create β€” Create a new API user

Safe Calling Convention

This skill implements a safe curl wrapper with the following features:

  • Automatic authentication β€” Includes the Bearer token from DSIP_TOKEN
  • Error handling β€” Shows errors and exits on failure
  • Timeout protection β€” 5-second connection timeout, 30-second max time
  • TLS flexibility β€” Optional insecure mode for self-signed certificates
  • Content negotiation β€” Automatically sets JSON headers

The underlying function:

dsip_api() {
  local method="$1"; shift
  local path="$1"; shift

  local insecure=()
  if [ "${DSIP_INSECURE:-}" = "1" ]; then insecure=(-k); fi

  curl "${insecure[@]}" --silent --show-error --fail-with-body \
    --connect-timeout 5 --max-time 30 \
    -H "Authorization: Bearer ${DSIP_TOKEN}" \
    -H "Content-Type: application/json" \
    -X "${method}" "https://${DSIP_ADDR}:5000${path}" \
    "$@"
}

Environment Variables

VariableRequiredDescription
DSIP_ADDRYesHostname or IP address of your dSIPRouter instance (without scheme)
DSIP_TOKENYesBearer token for API authentication
DSIP_INSECURENoSet to 1 to allow self-signed TLS certificates

API Base URL

All requests are sent to:

https://$DSIP_ADDR:5000/api/v1

Common Workflows

1. Verify Connection

dsiprouter.sh endpointgroups:list | jq '.count'

2. Create an Endpoint Group

dsiprouter.sh endpointgroups:create '{
  "name": "My Endpoints",
  "sip_profile_id": 1
}' | jq .

3. Create an Inbound Mapping

dsiprouter.sh inboundmapping:create '{
  "did": "13132222223",
  "servers": ["#22"],
  "name": "Main Office",
  "prefix": "",
  "strip": 0
}' | jq .

4. Reload Configuration

After making changes, reload Kamailio:

dsiprouter.sh kamailio:reload | jq .

Troubleshooting

Connection timeout:

error: Failed to connect to dSIPRouter
  • Verify DSIP_ADDR is correct and accessible
  • Check network connectivity: ping $DSIP_ADDR
  • Ensure port 5000 is open

Authentication error (401):

error: Unauthorized
  • Verify DSIP_TOKEN is correct
  • Check that your token hasn't expired

SSL/TLS certificate errors:

error: SSL certificate problem
  • For self-signed certificates, set DSIP_INSECURE=1
  • Or add your certificate to the system trust store

Command not found:

dsiprouter: command not found
  • Verify the script is executable: chmod +x bin/dsiprouter.sh
  • Ensure the directory is in your PATH or use the full path: ./bin/dsiprouter

Additional Resources

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install dsiprouter?

Run openclaw add @mackhendricks/dsiprouter-skill in your terminal. This installs dsiprouter into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/mackhendricks/dsiprouter-skill. Review commits and README documentation before installing.