From db0788b2e07302dd355e6fac86d5b52cc4c9d075 Mon Sep 17 00:00:00 2001 From: Binoy Chemmagate Date: Wed, 9 Oct 2019 14:44:43 +0300 Subject: [PATCH 1/2] API for getting TURN creds --- source/includes/_api.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/includes/_api.md b/source/includes/_api.md index 744d69e215d..4267e6281e5 100644 --- a/source/includes/_api.md +++ b/source/includes/_api.md @@ -316,6 +316,7 @@ var iceServers = [ ## callstats.stopPrecallTests() + ```javascript callstats.stopPrecallTests(); ``` @@ -337,3 +338,17 @@ var callAttributes = { `pc` | Required | Object | RTCPeerConnection associated with this connection. `conferenceID` | Required | String (256 bytes) | It is generated by the origin server. `callAttributes` | Required | JSON | Contains information about the call. + +## callstats.getTurnCredentials() + +```javascript +callstats.getTurnCredentials(appId, appSecret) + .then((iceServers) => { + var pc_config = {'iceTransports': 'all','iceServers': iceServers}; + var pc = new RTCPeerConnection(pc_config, {optional: [{DtlsSrtpKeyAgreement: true}]}); + }) + .catch((err) => { + + }); +``` +- This API will fetch the TURN credentials from callstats.io without enabling callstats.io monitoring. This is an on-demand feature, please contact sales@callstats.io for enabling this feature. \ No newline at end of file From 9af5bcdb7010b4db64e7f30eeb04545a4f45243b Mon Sep 17 00:00:00 2001 From: Binoy Chemmagate Date: Tue, 15 Oct 2019 11:05:02 +0300 Subject: [PATCH 2/2] param --- source/includes/_api.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/includes/_api.md b/source/includes/_api.md index 4267e6281e5..b9b78d19a4c 100644 --- a/source/includes/_api.md +++ b/source/includes/_api.md @@ -351,4 +351,9 @@ callstats.getTurnCredentials(appId, appSecret) }); ``` -- This API will fetch the TURN credentials from callstats.io without enabling callstats.io monitoring. This is an on-demand feature, please contact sales@callstats.io for enabling this feature. \ No newline at end of file +- This API will fetch the TURN credentials from callstats.io without enabling callstats.io monitoring. This is an on-demand feature, please contact sales@callstats.io for enabling this feature. + + Params | Argument | Type | Description +----------- | ----------- | -------- | ---------- +appId | Required | String | Application ID is obtained from callstats.io +appSecret | Required | String | Application secret is obtained from callstats.io. \ No newline at end of file