MCP is live.Set upAsk the community
OmniDimension
Phone numbers

Import SIP trunk

Import a phone number associated with a SIP trunk.

POST/phone_number/import/sip
Body
11 fields
·

Reseller keys only: act as one of your clients by its user id. Omit it to act on your own account. [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).

Phone number in E.164 format (starting with +).

SIP server hostname or IP.

Name for this SIP trunk (must be unique within your account).

Optional friendly name for the imported number.

curl -X POST 'https://omnidim.io/api/v1/phone_number/import/sip' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_id": 1234,
  "phone_number": "+12025550123",
  "sip_host": "sip.yourprovider.com",
  "sip_port": 5060
}'
Example response
{
  "success": true,
  "message": "SIP trunk registered successfully",
  "id": 3360
}

Authorization

BearerAuth
headerAuthorizationBearer <token>

Bearer token authentication. Obtain your API key from the OmniDimension dashboard.

Request Body

application/json
user_id?ClientUserId

Reseller keys only: act as one of your clients by its user id. Omit it to act on your own account. How acting for a client works.

phone_number*string

Phone number in E.164 format (starting with +).

sip_host*string

SIP server hostname or IP.

sip_trunk_name*string

Name for this SIP trunk (must be unique within your account).

name?string

Optional friendly name for the imported number.

sip_port?integer

SIP server port.

Default5060
sip_username?string

SIP authentication username.

sip_password?string

SIP authentication password.

Formatpassword
sip_dial_prefix?string

Digits added in front of every number dialed through this trunk. See sip_strip_country_code for how it combines with the country code.

sip_strip_country_code?boolean

When true, the country code is removed from every number dialed through this trunk. When omitted and sip_dial_prefix is set, the country code is removed, so send false to keep it.

sip_strip_plus?boolean

When true, strips the leading + from the dialed number.

Response body

application/json

Response Body

SIP trunk imported.

application/json
success?boolean
message?string
id?integer

ID of the newly imported phone number record. Use this with /phone_number/attach.

Was this page helpful?