Create SIP Endpoint
Creating SIP Endpoint allows you to make and receive, audio and video calls. Making audio and video calls can be made to APP to APP, APP to Browser and browser to browser calling.
Prerequisites
-
Sign up for a free PIOPIY demo account
-
Create your endpoint and add capacity.
-
Setup your webserver and map your POST method URL in answer URL.
Create SIP Endpoint
To create a SIP Endpoint, send your POST method request with valid parameters to the following base URL.
Base URL
https:/.telecmi.com/v1/endpoint/add_sip
Required Parameters
These are the required POST method parameters with description.
Parameter Name | Type | Description |
---|---|---|
*appid | number | Your app id |
*secret | string | Your app secret |
*username | string | The name of the user |
*password | string | Password for the user |
Note
Sample JSON Request
Below is the following sample JSON POST method request to create SIP endpoint
{
"appid": 2222223,
"secret": "635a5e93-3e5f-4aa5-b7ab-2a04cd5es039",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}
Sample JSON Response
If the provided information is valid, your web server will get a sample response from PIOPIY Platform as given below
{
"code": "cmi-200",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"connect_URL": "YOUR_NAMESPACE_SBC_URL",
"audio": true,
"video": true,
"type": "SIP"
}
Properties
These are the list of properties and its description
Property | Type | Description |
---|---|---|
username | string | Your endpoint username |
password | string | Your endpoint password |
connect_URL | string | Your namespace SBC connection URL |
audio | string | Audio enabled in this call |
video | string | Video enabled in this call |
type | string | Type of call SIP or PSTN |
HTTP status codes
PIOPIY API platform represents the following status code to identity the errors.
Status code | Status code | Description |
---|---|---|
200 | OK | We received the request |
400 | Error | Username already exists |
420 | Error | Invalid app id or secret, failed to authenticate token |
502 | Error | Missing required property |