SIP Trunk

The SIP Trunk API in the Integrari system allows you to manage SIP trunk configurations, enabling seamless connectivity for voice communication. This API facilitates operations such as creating, listing, editing, and deleting SIP trunks. With these functionalities, you can efficiently integrate SIP trunk capabilities within their applications.

Languages
Servers
https://api.integrari.com/

List SIP Trunk

Request

Retrieve a list of all configured SIP trunks.

Query
idstring

Unique identifier for the SIP trunk.

Example: id=trunk123
endPointIpstring

Endpoint IP address of the SIP trunk to filter by.

Example: endPointIp=192.168.1.100
namestring

Filter by the name of the SIP trunk.

Example: name=Primary Trunk
statusstring

Operational status of the SIP trunk to filter by (e.g., Active, Inactive).

Example: status=Active
Headers
accountIdstring

Unique identifier for the customer's account.

Example: 12345
curl -i -X GET \
  'https://api.integrari.com/o/sip-trunk/v1.0/list?endPointIp=192.168.1.100&id=trunk123&name=Primary%20Trunk&status=Active' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'accountId: 12345'

Responses

A List of SIP Trunks

Body
dataArray of objects
messagestring
Example: "The request has succeeded"
totalinteger
Example: "1"
Response
{ "data": [ { "allowOutgoingCalls": "Yes", "capacity": "100", "cps": "100", "createdBy": "449542034", "createdOn": "2024-09-23 18:31:05", "groupId": "310", "groupName": "Test Group", "modifiedBy": "449542115", "modifiedOn": "2024-09-23 19:02:08", "outBoundTransparent": "Transparent", "routingPolicy": "Priority", "status": "active", "sipTrunk": [ { "endPointIp": "10.30.0.58", "id": "293", "isDefault": "true", "name": "SIP_Trunk_1", "portNumber": "9080", "status": "active" } ] } ], "message": "The request has succeeded", "total": "1" }

Add SIP Trunk

Request

Create a new SIP trunk.

Headers
accountIdstring

Unique identifier for the customer's account.

Body

SIPTrunk Add Request

namestring

Name of the SIP trunk.

Example: "Primary Trunk"
typeinteger

Type of the SIP trunk.

Example: "1"
userNamestring

Username for authenticating the SIP trunk.

Example: "sip_user"
dialingPrefixinteger

Prefix used for dialing through the SIP trunk.

Example: "91"
endPointIpstring

Endpoint IP address of the SIP trunk.

Example: "192.168.1.100"
portNumberinteger

Port number for SIP trunk communication.

Example: "5060"
statusstring

Operational status of the SIP trunk (e.g., Active, Inactive).

Example: "Active"
isDefaultboolean

Indicates if this is the default SIP trunk.

Example: "true"
curl -i -X POST \
  https://api.integrari.com/o/sip-trunk/v1.0/add \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'accountId: string' \
  -d '{
    "name": "Primary Trunk",
    "type": "1",
    "userName": "sip_user",
    "dialingPrefix": "91",
    "endPointIp": "192.168.1.100",
    "portNumber": "5060",
    "status": "Active",
    "isDefault": "true"
  }'

Responses

Body
messagestring
Example: "The request has succeeded"
Response
{ "message": "The request has succeeded" }

Update SIP Trunk

Request

Modify an existing SIP trunk.

Headers
accountIdstring

Unique identifier for the customer's account.

Body

SIPTrunk Edit Request

idstring

Unique identifier of the SIP trunk to be edited.

Example: "trunk123"
capacityinteger

Maximum capacity of concurrent calls for the SIP trunk.

Example: "100"
dialingPrefixinteger

Prefix used for dialing through the SIP trunk.

Example: "91"
endPointIpstring

Updated endpoint IP address of the SIP trunk.

Example: "192.168.1.101"
portNumberinteger

Updated port number for SIP trunk communication.

Example: "5061"
statusstring

Updated operational status of the SIP trunk (e.g., Active, Inactive).

Example: "Inactive"
isDefaultboolean

Indicates if this is the default SIP trunk.

Example: "false"
curl -i -X PATCH \
  https://api.integrari.com/o/sip-trunk/v1.0/edit \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'accountId: string' \
  -d '{
    "id": "trunk123",
    "capacity": "100",
    "dialingPrefix": "91",
    "endPointIp": "192.168.1.101",
    "portNumber": "5061",
    "status": "Inactive",
    "isDefault": "false"
  }'

Responses

Body
messagestring
Example: "The request has succeeded"
Response
{ "message": "The request has succeeded" }

Delete SIP Trunk

Request

Remove a SIP trunk from your configuration.

Query
idinteger

Id

Example: id=234
Headers
accountIdstring

Unique identifier for the customer's account.

curl -i -X DELETE \
  'https://api.integrari.com/o/sip-trunk/v1.0/delete?id=234' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'accountId: string'

Responses

Body
messagestring
Example: "The request has succeeded"
Response
{ "message": "The request has succeeded" }