SIP Control App
Peer to Peer and Group Chat, Call, and Video Conference.
AssignTNLeasesToSIPControlApp
POST
https://api.opentact.org/rest/sip/app/{uuid}/tnlease
Assign TN Leases to SIP control App.
Path Parameters
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Headers
X-Auth-Token
string
JWT_TOKEN
Content-Type
string
application/json
Request Body
add
string
array of strings List of TNLease uuids to be assigned
remove
string
Array of strings List of TNLease uuids to be removed
{
"success": true,
"payload": [
{
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"tn": {
"tn": 0,
"class4_did_id": 0,
"registered": true,
"tnlease": {},
"profile": {},
"deleted_on": "2019-08-24T14:15:22Z"
},
"account": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"email": "string",
"level": "ServiceAccount",
"balance": 0,
"class4_id": 0,
"deleted_on": "2019-08-24T14:15:22Z",
"time_zone": {},
"users": [],
"admin": {},
"messaging_profile_default": {},
"messaging_profiles": [],
"addresses": []
},
"tnorder": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"state": "created",
"tns": [],
"account": {},
"profile": {},
"sip_connection": {},
"sip_control_app": {},
"created_by": {},
"modified_by": {},
"request": {},
"price": {},
"autorenew": true,
"tnleases": []
},
"expired_on": "2019-08-24T14:15:22Z",
"autorenew": true,
"messaging_profile": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"callback_url": "string",
"callback_url2": "string",
"number_pool_enable": true,
"long_code_weight": 0,
"tollfree_weight": 0,
"skip_unhealthy_tns": true,
"sticky_sender": true,
"account": {},
"created_by": {},
"modified_by": {},
"leases": []
},
"class4_product_item_id": 0,
"sip_connection": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"tech_prefix": 0,
"product": {},
"subdomain": "string",
"ip": "string",
"port": 0,
"class4_ingress_trunk_id": 0,
"class4_ingress_trunk_settings": {},
"class4_ingress_resource_ip_id": 0,
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {},
"class4_egress_resource_ip_id": 0,
"class4_trunk_prefix_id": 0,
"tnleases": [],
"sipusers": [],
"sip_user_invites": [],
"account": {},
"created_by": {},
"modified_by": {},
"outbound_voice_profile": {}
},
"sip_control_app": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {},
"class4_egress_resource_ip_id": 0,
"account": {},
"created_by": {},
"modified_by": {},
"outbound_voice_profile": {}
},
"created_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"modified_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
}
}
]
}
{
"success": false,
"message": "string",
"status": 401
}
{
"success": false,
"message": "string",
"status": 404
}
Code Example
curl -X POST "https://api.opentact.org/rest/sip/app/{uuid}/tnlease" \
-H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"add\":[\"string\"],\"remove\":[\"string\"]}"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN',
'Content-Type' => 'application/json'
);
$data = '{"add":["string"],"remove":["string"]}';
$response = Requests::post('https://api.opentact.org/rest/sip/app/{uuid}/tnlease', $headers, $data);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
'Content-Type': 'application/json',
}
data = '{"add":["string"],"remove":["string"]}'
response = requests.post('https://api.opentact.org/rest/sip/app/%7Buuid%7D/tnlease', headers=headers, data=data)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/sip/app/{uuid}/tnlease', {
method: 'POST',
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({"add":["string"],"remove":["string"]})
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
)
func main() {
client := &http.Client{}
var data = strings.NewReader(`{"add":["string"],"remove":["string"]}`)
req, err := http.NewRequest("POST", "https://api.opentact.org/rest/sip/app/{uuid}/tnlease", data)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
GetSIPControlAppTNLeasesList
GET
https://api.opentact.org/rest/sip/app/{uuid}/tnlease
Get SIP control app assigned TNLeases.
Path Parameters
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Headers
X-Auth-Token
string
JWT_TOKEN
{
"success": true,
"payload": [
{
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"tn": {
"tn": 0,
"class4_did_id": 0,
"registered": true,
"tnlease": {},
"profile": {},
"deleted_on": "2019-08-24T14:15:22Z"
},
"account": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"email": "string",
"level": "ServiceAccount",
"balance": 0,
"class4_id": 0,
"deleted_on": "2019-08-24T14:15:22Z",
"time_zone": {},
"users": [],
"admin": {},
"messaging_profile_default": {},
"messaging_profiles": [],
"addresses": []
},
"tnorder": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"state": "created",
"tns": [],
"account": {},
"profile": {},
"sip_connection": {},
"sip_control_app": {},
"created_by": {},
"modified_by": {},
"request": {},
"price": {},
"autorenew": true,
"tnleases": []
},
"expired_on": "2019-08-24T14:15:22Z",
"autorenew": true,
"messaging_profile": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"callback_url": "string",
"callback_url2": "string",
"number_pool_enable": true,
"long_code_weight": 0,
"tollfree_weight": 0,
"skip_unhealthy_tns": true,
"sticky_sender": true,
"account": {},
"created_by": {},
"modified_by": {},
"leases": []
},
"class4_product_item_id": 0,
"sip_connection": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"tech_prefix": 0,
"product": {},
"subdomain": "string",
"ip": "string",
"port": 0,
"class4_ingress_trunk_id": 0,
"class4_ingress_trunk_settings": {},
"class4_ingress_resource_ip_id": 0,
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {},
"class4_egress_resource_ip_id": 0,
"class4_trunk_prefix_id": 0,
"tnleases": [],
"sipusers": [],
"sip_user_invites": [],
"account": {},
"created_by": {},
"modified_by": {},
"outbound_voice_profile": {}
},
"sip_control_app": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {},
"class4_egress_resource_ip_id": 0,
"account": {},
"created_by": {},
"modified_by": {},
"outbound_voice_profile": {}
},
"created_by": {},
"modified_by": {}
}
]
}
{
"success": false,
"message": "string",
"status": 401
}
{
"success": false,
"message": "string",
"status": 404
}
Code Example
curl -X GET "https://api.stage.opentact.org/rest/sip/app/{uuid}/tnlease" \
-H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::get('https://api.stage.opentact.org/rest/sip/app/{uuid}/tnlease', $headers);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
}
response = requests.get('https://api.stage.opentact.org/rest/sip/app/%7Buuid%7D/tnlease', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.stage.opentact.org/rest/sip/app/{uuid}/tnlease', {
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN'
}
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.stage.opentact.org/rest/sip/app/{uuid}/tnlease", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
CreateSIPControlApp
POST
https://api.opentact.org/rest/sip/app
Create a new SIP control App.
Headers
X-Auth-Token
string
JWT_TOKEN
Content-Type
string
application/json
Request Body
name
string
[ 1 .. 255 ] characters
A user-assigned name to help manage the application
subdomain
string
[ 3 .. 255 ] characters
SIP domain name
is_active
boolean
Default: "true"
class4_egress_trunk_stings
object
(ISIPConnectionTrunkSettingsNewParams)
outbound_voice_profile
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Outbound Voice Profile uuid
string
{
"success": true,
"payload": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [
{}
],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {
"name": "string",
"rpid_id_type": "None",
"pdd": 0,
"rpid": "Never",
"ignore_early_media": true,
"cli_type": "white",
"pci": "Yes",
"call_limit": 0,
"is_active": true,
"t38": true,
"billing_method": "by minutes",
"ani_cap_limit": 0,
"min_profit_value": 0,
"rate_rounding": "Up",
"account_id": "string",
"ignore_early_no_sdp": true,
"enfource_cid": true,
"oli": "Yes",
"codecs": [],
"media_timeout": 0,
"us_other": "other",
"bypass_media": "Bypass Media",
"trunk_type2": "Termination Traffic",
"reg_gateway": [],
"pass_through": "transparent",
"dnis_cap_limit": 0,
"min_duration": 0,
"min_profit_type": "percentage",
"dnis_cps_limit": 0,
"reg_user": [],
"service_type": "Self Service",
"amount_per_port": 0,
"rate_decimal": "6",
"jurisdiction_use_dnis": "LRN",
"paid": "Yes",
"host_routing_strategy": "top-down",
"rate_use_rpid": true,
"ring_timeout": 0,
"ignore_ring": true,
"enable_global_404_blocking": true,
"pass_lrn": 0,
"rpid_screen": "None",
"auth_type": "Authorized by Host Only",
"ip": [],
"ani_cps_limit": 0,
"cps_limit": 0,
"max_duration": 0,
"rate_table_id": 0,
"priv": "Yes",
"rpid_party": "None",
"rpid_privacy": "None",
"transaction_fee_id": 0,
"codes": [],
"media_type": "Bypass Media",
"div": "Yes",
"prefixes": [],
"display_name": true
},
"class4_egress_resource_ip_id": 0,
"account": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"email": "string",
"level": "ServiceAccount",
"balance": 0,
"class4_id": 0,
"deleted_on": "2019-08-24T14:15:22Z",
"time_zone": {},
"users": [],
"admin": {},
"messaging_profile_default": {},
"messaging_profiles": [],
"addresses": []
},
"created_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"modified_by": {},
"outbound_voice_profile": {}
}
}
{
"success": false,
"message": "string",
"status": 401
}
{
"success": false,
"message": "string",
"status": 401
}
Code Example
curl -X POST "https://api.opentact.org/rest/sip/app" \
H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"name\":\"string\",\"is_active\":true,\"subdomain\":\"string\",\"class4_egress_trunk_settings\":{\"rpid_id_type\":\"None\",\"pdd\":0,\"rpid\":\"Never\",\"ignore_early_media\":true,\"cli_type\":\"white\",\"pci\":\"Yes\",\"call_limit\":0,\"t38\":true,\"billing_method\":\"by minutes\",\"ani_cap_limit\":0,\"min_profit_value\":0,\"rate_rounding\":\"Up\",\"account_id\":\"string\",\"ignore_early_no_sdp\":true,\"enfource_cid\":true,\"oli\":\"Yes\",\"codecs\":[\"string\"],\"media_timeout\":0,\"us_other\":\"other\",\"bypass_media\":\"Bypass Media\",\"trunk_type2\":\"Termination Traffic\",\"reg_gateway\":[{\"rofile_id\":0,\"reg_srv_ip\":\"string\",\"username\":\"string\",\"reg_srv_port\":0,\"password\":\"string\",\"expires\":0}],\"pass_through\":\"transparent\",\"dnis_cap_limit\":0,\"min_duration\":0,\"min_profit_type\":\"percentage\",\"dnis_cps_limit\":0,\"reg_user\":[{\"password\":\"string\",\"profile_id\":0,\"username\":\"string\"}],\"service_type\":\"Self Service\",\"amount_per_port\":0,\"rate_decimal\":0,\"jurisdiction_use_dnis\":\"LRN\",\"paid\":\"Yes\",\"host_routing_strategy\":\"top-down\",\"rate_use_rpid\":true,\"ring_timeout\":0,\"ignore_ring\":true,\"enable_global_404_blocking\":true,\"pass_lrn\":0,\"rpid_screen\":\"None\",\"auth_type\":\"Authorized by Host Only\",\"ip\":[{\"fqdn\":\"string\",\"port\":0,\"ip\":\"string\",\"addr_type\":\"ip\"}],\"ani_cps_limit\":0,\"cps_limit\":0,\"max_duration\":0,\"priv\":\"Yes\",\"rpid_party\":\"None\",\"rpid_privacy\":\"None\",\"transaction_fee_id\":0,\"codes\":[\"string\"],\"media_type\":\"Bypass Media\",\"div\":\"Yes\",\"prefixes\":[{\"tech_prefix\":\"string\",\"rate_table_id\":0,\"product_id\":0,\"routing_plan_id\":0,\"code\":\"string\",\"code_cps\":0,\"trunk_id\":0,\"code_cap\":0}],\"display_name\":true},\"outbound_voice_profile\":\"string\"}"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN',
'Content-Type' => 'application/json'
);
$data = '{"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"}';
$response = Requests::post('https://api.opentact.org/rest/sip/app', $headers, $data);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
'Content-Type': 'application/json',
}
data = '{"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"}'
response = requests.post('https://api.opentact.org/rest/sip/app', headers=headers, data=data)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/sip/app', {
method: 'POST',
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"})
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
)
func main() {
client := &http.Client{}
var data = strings.NewReader(`{"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"}`)
req, err := http.NewRequest("POST", "https://api.opentact.org/rest/sip/app", data)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
ListSIPControlApps
GET
https://api.opentact.org/rest/sip/app
Get SIP control App list
Headers
X-Auth-Token
string
JWT_TOKEN
{
"success": true,
"payload": [
{
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [
{}
],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {
"name": "string",
"rpid_id_type": "None",
"pdd": 0,
"rpid": "Never",
"ignore_early_media": true,
"cli_type": "white",
"pci": "Yes",
"call_limit": 0,
"is_active": true,
"t38": true,
"billing_method": "by minutes",
"ani_cap_limit": 0,
"min_profit_value": 0,
"rate_rounding": "Up",
"account_id": "string",
"ignore_early_no_sdp": true,
"enfource_cid": true,
"oli": "Yes",
"codecs": [],
"media_timeout": 0,
"us_other": "other",
"bypass_media": "Bypass Media",
"trunk_type2": "Termination Traffic",
"reg_gateway": [],
"pass_through": "transparent",
"dnis_cap_limit": 0,
"min_duration": 0,
"min_profit_type": "percentage",
"dnis_cps_limit": 0,
"reg_user": [],
"service_type": "Self Service",
"amount_per_port": 0,
"rate_decimal": "6",
"jurisdiction_use_dnis": "LRN",
"paid": "Yes",
"host_routing_strategy": "top-down",
"rate_use_rpid": true,
"ring_timeout": 0,
"ignore_ring": true,
"enable_global_404_blocking": true,
"pass_lrn": 0,
"rpid_screen": "None",
"auth_type": "Authorized by Host Only",
"ip": [],
"ani_cps_limit": 0,
"cps_limit": 0,
"max_duration": 0,
"rate_table_id": 0,
"priv": "Yes",
"rpid_party": "None",
"rpid_privacy": "None",
"transaction_fee_id": 0,
"codes": [],
"media_type": "Bypass Media",
"div": "Yes",
"prefixes": [],
"display_name": true
},
"class4_egress_resource_ip_id": 0,
"account": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"email": "string",
"level": "ServiceAccount",
"balance": 0,
"class4_id": 0,
"deleted_on": "2019-08-24T14:15:22Z",
"time_zone": {},
"users": [],
"admin": {},
"messaging_profile_default": {},
"messaging_profiles": [],
"addresses": []
},
"created_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"modified_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"outbound_voice_profile": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"channel_limit": 0,
"max_rate": 0,
"daily_spent_limit": 0,
"record_calls": 0,
"filemat": "mp3",
"audio_track_type": 0,
"account": {},
"created_by": {},
"modified_by": {},
"sip_connections": [],
"sip_control_apps": []
}
}
]
}
{
"success": false,
"message": "string",
"status": 400
}
Code Example
curl -X GET "https://api.opentact.org/rest/sip/app" \
-H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::get('https://api.opentact.org/rest/sip/app', $headers);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
}
response = requests.get('https://api.opentact.org/rest/sip/app', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/sip/app', {
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN'
}
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.opentact.org/rest/sip/app", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
GetSIPControlAppByUUID
GET
https://api.opentact.org/rest/sip/app/{uuid}
Get extended SIP control App info
Path Parameters
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Headers
X-Auth-Token
string
JWT_TOKEN
{
"success": true,
"payload": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [
{}
],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {
"name": "string",
"rpid_id_type": "None",
"pdd": 0,
"rpid": "Never",
"ignore_early_media": true,
"cli_type": "white",
"pci": "Yes",
"call_limit": 0,
"is_active": true,
"t38": true,
"billing_method": "by minutes",
"ani_cap_limit": 0,
"min_profit_value": 0,
"rate_rounding": "Up",
"account_id": "string",
"ignore_early_no_sdp": true,
"enfource_cid": true,
"oli": "Yes",
"codecs": [],
"media_timeout": 0,
"us_other": "other",
"bypass_media": "Bypass Media",
"trunk_type2": "Termination Traffic",
"reg_gateway": [],
"pass_through": "transparent",
"dnis_cap_limit": 0,
"min_duration": 0,
"min_profit_type": "percentage",
"dnis_cps_limit": 0,
"reg_user": [],
"service_type": "Self Service",
"amount_per_port": 0,
"rate_decimal": "6",
"jurisdiction_use_dnis": "LRN",
"paid": "Yes",
"host_routing_strategy": "top-down",
"rate_use_rpid": true,
"ring_timeout": 0,
"ignore_ring": true,
"enable_global_404_blocking": true,
"pass_lrn": 0,
"rpid_screen": "None",
"auth_type": "Authorized by Host Only",
"ip": [],
"ani_cps_limit": 0,
"cps_limit": 0,
"max_duration": 0,
"rate_table_id": 0,
"priv": "Yes",
"rpid_party": "None",
"rpid_privacy": "None",
"transaction_fee_id": 0,
"codes": [],
"media_type": "Bypass Media",
"div": "Yes",
"prefixes": [],
"display_name": true
},
"class4_egress_resource_ip_id": 0,
"account": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"email": "string",
"level": "ServiceAccount",
"balance": 0,
"class4_id": 0,
"deleted_on": "2019-08-24T14:15:22Z",
"time_zone": {},
"users": [],
"admin": {},
"messaging_profile_default": {},
"messaging_profiles": [],
"addresses": []
},
"created_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"modified_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"outbound_voice_profile": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"channel_limit": 0,
"max_rate": 0,
"daily_spent_limit": 0,
"record_calls": 0,
"filemat": "mp3",
"audio_track_type": 0,
"account": {},
"created_by": {},
"modified_by": {},
"sip_connections": [],
"sip_control_apps": []
}
}
}
{
"success": false,
"message": "string",
"status": 404
}
Code Example
curl -X GET "https://api.stage.opentact.org/rest/sip/app/{uuid}" \
-H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::get('https://api.stage.opentact.org/rest/sip/app/{uuid}', $headers);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
}
response = requests.get('https://api.stage.opentact.org/rest/sip/app/%7Buuid%7D', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.stage.opentact.org/rest/sip/app/{uuid}', {
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN'
}
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.stage.opentact.org/rest/sip/app/{uuid}", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
ModifySIPControlApp
PATCH
https://api.opentact.org/rest/sip/app/{uuid}
Modify SIP control App.
Path Parameters
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Headers
X-Auth-Token
string
JWT_TOKEN
Content-Type
string
application/json
Request Body
name
string
[ 1 .. 255 ] characters
A user-assigned name to help manage the application
subdomain
string
[ 3 .. 255 ] characters
SIP domain name
is_active
boolean
Default: "true"
class4_egress_trunk_stings
object
(ISIPConnectionTrunkSettingsNewParams)
outbound_voice_profile
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Outbound Voice Profile uuid
{
"success": true,
"payload": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [
{}
],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {
"name": "string",
"rpid_id_type": "None",
"pdd": 0,
"rpid": "Never",
"ignore_early_media": true,
"cli_type": "white",
"pci": "Yes",
"call_limit": 0,
"is_active": true,
"t38": true,
"billing_method": "by minutes",
"ani_cap_limit": 0,
"min_profit_value": 0,
"rate_rounding": "Up",
"account_id": "string",
"ignore_early_no_sdp": true,
"enfource_cid": true,
"oli": "Yes",
"codecs": [],
"media_timeout": 0,
"us_other": "other",
"bypass_media": "Bypass Media",
"trunk_type2": "Termination Traffic",
"reg_gateway": [],
"pass_through": "transparent",
"dnis_cap_limit": 0,
"min_duration": 0,
"min_profit_type": "percentage",
"dnis_cps_limit": 0,
"reg_user": [],
"service_type": "Self Service",
"amount_per_port": 0,
"rate_decimal": "6",
"jurisdiction_use_dnis": "LRN",
"paid": "Yes",
"host_routing_strategy": "top-down",
"rate_use_rpid": true,
"ring_timeout": 0,
"ignore_ring": true,
"enable_global_404_blocking": true,
"pass_lrn": 0,
"rpid_screen": "None",
"auth_type": "Authorized by Host Only",
"ip": [],
"ani_cps_limit": 0,
"cps_limit": 0,
"max_duration": 0,
"rate_table_id": 0,
"priv": "Yes",
"rpid_party": "None",
"rpid_privacy": "None",
"transaction_fee_id": 0,
"codes": [],
"media_type": "Bypass Media",
"div": "Yes",
"prefixes": [],
"display_name": true
},
"class4_egress_resource_ip_id": 0,
"account": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"email": "string",
"level": "ServiceAccount",
"balance": 0,
"class4_id": 0,
"deleted_on": "2019-08-24T14:15:22Z",
"time_zone": {},
"users": [],
"admin": {},
"messaging_profile_default": {},
"messaging_profiles": [],
"addresses": []
},
"created_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"modified_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"outbound_voice_profile": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"channel_limit": 0,
"max_rate": 0,
"daily_spent_limit": 0,
"record_calls": 0,
"filemat": "mp3",
"audio_track_type": 0,
"account": {},
"created_by": {},
"modified_by": {},
"sip_connections": [],
"sip_control_apps": []
}
}
}
{
"success": false,
"message": "string",
"status": 401
}
{
"success": false,
"message": "string",
"status": 404
}
Code Example
curl -X PATCH "https://api.opentact.org/rest/sip/app/{uuid}" -H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN" -H "Content-Type: application/json" \
-d "{\"name\":\"string\",\"is_active\":true,\"subdomain\":\"string\",\"class4_egress_trunk_settings\":{\"rpid_id_type\":\"None\",\"pdd\":0,\"rpid\":\"Never\",\"ignore_early_media\":true,\"cli_type\":\"white\",\"pci\":\"Yes\",\"call_limit\":0,\"t38\":true,\"billing_method\":\"by minutes\",\"ani_cap_limit\":0,\"min_profit_value\":0,\"rate_rounding\":\"Up\",\"account_id\":\"string\",\"ignore_early_no_sdp\":true,\"enfource_cid\":true,\"oli\":\"Yes\",\"codecs\":[\"string\"],\"media_timeout\":0,\"us_other\":\"other\",\"bypass_media\":\"Bypass Media\",\"trunk_type2\":\"Termination Traffic\",\"reg_gateway\":[{\"rofile_id\":0,\"reg_srv_ip\":\"string\",\"username\":\"string\",\"reg_srv_port\":0,\"password\":\"string\",\"expires\":0}],\"pass_through\":\"transparent\",\"dnis_cap_limit\":0,\"min_duration\":0,\"min_profit_type\":\"percentage\",\"dnis_cps_limit\":0,\"reg_user\":[{\"password\":\"string\",\"profile_id\":0,\"username\":\"string\"}],\"service_type\":\"Self Service\",\"amount_per_port\":0,\"rate_decimal\":0,\"jurisdiction_use_dnis\":\"LRN\",\"paid\":\"Yes\",\"host_routing_strategy\":\"top-down\",\"rate_use_rpid\":true,\"ring_timeout\":0,\"ignore_ring\":true,\"enable_global_404_blocking\":true,\"pass_lrn\":0,\"rpid_screen\":\"None\",\"auth_type\":\"Authorized by Host Only\",\"ip\":[{\"fqdn\":\"string\",\"port\":0,\"ip\":\"string\",\"addr_type\":\"ip\"}],\"ani_cps_limit\":0,\"cps_limit\":0,\"max_duration\":0,\"priv\":\"Yes\",\"rpid_party\":\"None\",\"rpid_privacy\":\"None\",\"transaction_fee_id\":0,\"codes\":[\"string\"],\"media_type\":\"Bypass Media\",\"div\":\"Yes\",\"prefixes\":[{\"tech_prefix\":\"string\",\"rate_table_id\":0,\"product_id\":0,\"routing_plan_id\":0,\"code\":\"string\",\"code_cps\":0,\"trunk_id\":0,\"code_cap\":0}],\"display_name\":true},\"outbound_voice_profile\":\"string\"}"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN',
'Content-Type' => 'application/json'
);
$data = '{"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"}';
$response = Requests::patch('https://api.opentact.org/rest/sip/app/{uuid}', $headers, $data);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
'Content-Type': 'application/json',
}
data = '{"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"}'
response = requests.patch('https://api.opentact.org/rest/sip/app/%7Buuid%7D', headers=headers, data=data)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/sip/app/{uuid}', {
method: 'PATCH',
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"})
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
)
func main() {
client := &http.Client{}
var data = strings.NewReader(`{"name":"string","is_active":true,"subdomain":"string","class4_egress_trunk_settings":{"rpid_id_type":"None","pdd":0,"rpid":"Never","ignore_early_media":true,"cli_type":"white","pci":"Yes","call_limit":0,"t38":true,"billing_method":"by minutes","ani_cap_limit":0,"min_profit_value":0,"rate_rounding":"Up","account_id":"string","ignore_early_no_sdp":true,"enfource_cid":true,"oli":"Yes","codecs":["string"],"media_timeout":0,"us_other":"other","bypass_media":"Bypass Media","trunk_type2":"Termination Traffic","reg_gateway":[{"rofile_id":0,"reg_srv_ip":"string","username":"string","reg_srv_port":0,"password":"string","expires":0}],"pass_through":"transparent","dnis_cap_limit":0,"min_duration":0,"min_profit_type":"percentage","dnis_cps_limit":0,"reg_user":[{"password":"string","profile_id":0,"username":"string"}],"service_type":"Self Service","amount_per_port":0,"rate_decimal":0,"jurisdiction_use_dnis":"LRN","paid":"Yes","host_routing_strategy":"top-down","rate_use_rpid":true,"ring_timeout":0,"ignore_ring":true,"enable_global_404_blocking":true,"pass_lrn":0,"rpid_screen":"None","auth_type":"Authorized by Host Only","ip":[{"fqdn":"string","port":0,"ip":"string","addr_type":"ip"}],"ani_cps_limit":0,"cps_limit":0,"max_duration":0,"priv":"Yes","rpid_party":"None","rpid_privacy":"None","transaction_fee_id":0,"codes":["string"],"media_type":"Bypass Media","div":"Yes","prefixes":[{"tech_prefix":"string","rate_table_id":0,"product_id":0,"routing_plan_id":0,"code":"string","code_cps":0,"trunk_id":0,"code_cap":0}],"display_name":true},"outbound_voice_profile":"string"}`)
req, err := http.NewRequest("PATCH", "https://api.opentact.org/rest/sip/app/{uuid}", data)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
RemoveSIPControlAppByUUID
DELETE
https://api.opentact.org/rest/sip/app/{uuid}
Remove SIP control App.
Path Parameters
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Headers
X-Auth-Token
string
JWT_TOKEN
{
"success": true,
"payload": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [
{}
],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {
"name": "string",
"rpid_id_type": "None",
"pdd": 0,
"rpid": "Never",
"ignore_early_media": true,
"cli_type": "white",
"pci": "Yes",
"call_limit": 0,
"is_active": true,
"t38": true,
"billing_method": "by minutes",
"ani_cap_limit": 0,
"min_profit_value": 0,
"rate_rounding": "Up",
"account_id": "string",
"ignore_early_no_sdp": true,
"enfource_cid": true,
"oli": "Yes",
"codecs": [],
"media_timeout": 0,
"us_other": "other",
"bypass_media": "Bypass Media",
"trunk_type2": "Termination Traffic",
"reg_gateway": [],
"pass_through": "transparent",
"dnis_cap_limit": 0,
"min_duration": 0,
"min_profit_type": "percentage",
"dnis_cps_limit": 0,
"reg_user": [],
"service_type": "Self Service",
"amount_per_port": 0,
"rate_decimal": "6",
"jurisdiction_use_dnis": "LRN",
"paid": "Yes",
"host_routing_strategy": "top-down",
"rate_use_rpid": true,
"ring_timeout": 0,
"ignore_ring": true,
"enable_global_404_blocking": true,
"pass_lrn": 0,
"rpid_screen": "None",
"auth_type": "Authorized by Host Only",
"ip": [],
"ani_cps_limit": 0,
"cps_limit": 0,
"max_duration": 0,
"rate_table_id": 0,
"priv": "Yes",
"rpid_party": "None",
"rpid_privacy": "None",
"transaction_fee_id": 0,
"codes": [],
"media_type": "Bypass Media",
"div": "Yes",
"prefixes": [],
"display_name": true
},
"class4_egress_resource_ip_id": 0,
"account": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"email": "string",
"level": "ServiceAccount",
"balance": 0,
"class4_id": 0,
"deleted_on": "2019-08-24T14:15:22Z",
"time_zone": {},
"users": [],
"admin": {},
"messaging_profile_default": {},
"messaging_profiles": [],
"addresses": []
},
"created_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"modified_by": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"first_name": "string",
"last_name": "string",
"avatar": "string",
"gender": "Agender",
"dob": "2019-08-24T14:15:22Z",
"role": "Admin",
"gmail_user_id": "string",
"facebook_user_id": "string",
"apple_user_id": "string",
"wechat_user_id": "string",
"deleted_on": "2019-08-24T14:15:22Z",
"token": "string",
"account": {}
},
"outbound_voice_profile": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"channel_limit": 0,
"max_rate": 0,
"daily_spent_limit": 0,
"record_calls": 0,
"filemat": "mp3",
"audio_track_type": 0,
"account": {},
"created_by": {},
"modified_by": {},
"sip_connections": [],
"sip_control_apps": []
}
}
}
{
"success": false,
"message": "string",
"status": 404
}
{
"success": false,
"message": "string",
"status": 409
}
Code Example
curl -X DELETE "https://api.opentact.org/rest/sip/app/{uuid}" \
-H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::delete('https://api.opentact.org/rest/sip/app/{uuid}', $headers);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
}
response = requests.delete('https://api.opentact.org/rest/sip/app/%7Buuid%7D', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/sip/app/{uuid}', {
method: 'DELETE',
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN'
}
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("DELETE", "https://api.opentact.org/rest/sip/app/{uuid}", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
ExecuteSIPControlAppCallExecuteCallFlow
POST
https://api.opentact.org/rest/sip/app/call/{uuid}
This route will post call an XML file, this must be correct or it will return an error.
Path Parameters
uuid
string
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Headers
X-Auth-Token
string
Bearer or JWT Token
{
"success": true,
"payload": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"account_uuid": "string",
"state": "started",
"channel": {
"uuid": "string",
"callstate": "ACTIVE",
"state": "CS_NEW",
"created": "2019-08-24T14:15:22Z",
"created_epoch": 0,
"cid_name": "string",
"cid_num": "string",
"name": "string",
"direction": "string",
"ip_addr": "string",
"dest": "string",
"application": "string",
"application_data": "string",
"dialplan": "string",
"context": "string",
"read_codec": "string",
"read_rate": "string",
"read_bit_rate": "string",
"write_codec": "string",
"write_rate": "string",
"write_bit_rate": "string",
"secure": "string",
"hostname": "string",
"presence_id": "string",
"presence_data": "string",
"callee_name": "string",
"callee_num": "string",
"callee_direction": "string",
"call_uuid": "string",
"sent_callee_name": "string",
"sent_callee_num": "string"
},
"sip_control_app": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"name": "string",
"is_active": true,
"subdomain": "string",
"tnleases": [],
"class4_egress_trunk_id": 0,
"class4_egress_trunk_settings": {},
"class4_egress_resource_ip_id": 0,
"account": {},
"created_by": {},
"modified_by": {},
"outbound_voice_profile": {},
"webhook_url": "string",
"webhook_method": "GET",
"webhook_request_timeout": 0,
"call_flow_url": "string",
"call_flow_request_timeout": 0,
"logs": [],
"call_flow_method": "GET"
}
}
}
{
"success": false,
"message": "string",
"status": 404
}
Last updated
Was this helpful?