-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pretend to be busy or block unwanted calls.
- Loading branch information
Showing
1 changed file
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,10 @@ Requirements | |
|
||
|
||
|
||
Documentation | ||
============= | ||
|
||
The POST request | ||
---------------- | ||
================ | ||
|
||
Our API sends a simple POST request with an `application/x-www-form-urlencoded` payload. The payload contains the following parameters: | ||
sipgate.io sends a simple POST request with an `application/x-www-form-urlencoded` payload. The request contains the following parameters: | ||
|
||
Parameter | Description | ||
--------- | ----------- | ||
|
@@ -33,6 +30,46 @@ You can simulate this POST request and test your server with a simple cURL comma | |
curl -X POST --data "from=492111234567&to=4915791234567" http://localhost:3000 | ||
``` | ||
|
||
The XML response | ||
============ | ||
After sending the POST request sipgate.io will accept an XML response to determine what to do. Make sure to set ```application/xml``` in the ```Content-Type``` header of your response and you are ready to go! | ||
|
||
sipgate.io currently supports the following responses: | ||
|
||
Action | Description | ||
----------------- | ----------- | ||
[Reject](#reject) | Reject call or pretend to be busy | ||
|
||
Reject | ||
------ | ||
|
||
Pretend to be busy or block unwanted calls. | ||
|
||
Possible attributes | Possible values | Default value | ||
------------------- | --------------- | ------------- | ||
reason | rejected, busy | rejected | ||
|
||
|
||
**Example 1: Reject call** | ||
```xml | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Response> | ||
<Reject /> | ||
</Response> | ||
``` | ||
|
||
**Example 2: Reject call signaling busy** | ||
```xml | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Response> | ||
<Reject reason="busy" /> | ||
</Response> | ||
``` | ||
|
||
More to come | ||
------------ | ||
Stay tuned... | ||
|
||
|
||
|
||
Server Examples | ||
|
@@ -61,7 +98,7 @@ Troubleshooting | |
sipgate.io Log | ||
-------------- | ||
|
||
You can enable logging within your account for debugging purposes. You will find each request and the corresponding response in the logging table. | ||
You can enable logging for debugging purposes from your simquadrat dashboard. You will find each request and the corresponding response in the logging table. | ||
|
||
How do I inspect network traffic? | ||
--------------------------------- | ||
|
@@ -79,16 +116,16 @@ A word about security | |
HTTP vs. HTTPS | ||
-------------- | ||
|
||
We strongly encourage you to use a HTTPS server. Although we support plain HTTP connections we do not recommend pushing sensitive call details over unencrypted connections. By default, the API does not accept [self-signed certificates](http://stackoverflow.com/a/10176685), but you can enable them in the dashboard. | ||
We strongly encourage you to use a HTTPS server. Although we support plain HTTP connections we do not recommend pushing sensitive call details over unencrypted connections. By default sipgate.io does not accept [self-signed certificates](http://stackoverflow.com/a/10176685), but you can allow them in the simquadrat dashboard. | ||
|
||
Authentication | ||
-------------- | ||
|
||
The API supports HTTP Basic Authentication. You can include your username and password within the URL (e.g. `https://username:[email protected]:8080`). | ||
sipgate.io supports HTTP Basic Authentication. You can include your username and password within the URL (e.g. `https://username:[email protected]:8080`). | ||
|
||
|
||
|
||
Help us make it better | ||
====================== | ||
|
||
Please tell us how we can make the API better. If you have a specific feature request or if you found a bug or would like to add an example, please use [GitHub Issues](https://github.com/sipgate/sipgate.io/issues) or fork these docs and send a [pull request](https://github.com/sipgate/sipgate.io/pulls) with your improvements. | ||
Please tell us how we can improve sipgate.io. If you have a specific feature request, found a bug or would like to add an example, please use [GitHub Issues](https://github.com/sipgate/sipgate.io/issues) or fork these docs and send a [pull request](https://github.com/sipgate/sipgate.io/pulls) with your improvements. |