-
Notifications
You must be signed in to change notification settings - Fork 1
API for getting TURN creds #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -316,6 +316,7 @@ var iceServers = [ | |
|
|
||
|
|
||
| ## callstats.stopPrecallTests() | ||
|
|
||
| ```javascript | ||
| callstats.stopPrecallTests(); | ||
| ``` | ||
|
|
@@ -337,3 +338,22 @@ 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) => { | ||
|
|
||
| }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doesnt this API make it very easy to abuse? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lennart-csio No, This is api is not accessible by everyone. We have a postgress flag for the appID called taasEnabled, This flag has to be true to obtain turnCredentials. At the moment there is no way to set the flag without contacting us. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be we can add "Contact us for enabling turn usage" in the documentation to prevent the confusion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does say already "This is an on-demand feature, please contact [email protected] for enabling this feature. " There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @karthikbr82 yes, i see. however, if there is an app that is taasEnabled and has this integrated, then any user can extract the line from the source code and use it himself without the app knowing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lennart-csio Exactly, Noting can be hidden in javascript. It was possible to do get the same when we were sending the credentials in recomenedConfig callback. Users can also extract turn credentials from authenticate response which we use for PCT. Or user can also write a peerconnection SHIM and extract iceServers from pcConfig. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aren't the credentials rotating? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes they are |
||
| ``` | ||
| - This API will fetch the TURN credentials from callstats.io without enabling callstats.io monitoring. This is an on-demand feature, please contact [email protected] 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. | ||
Uh oh!
There was an error while loading. Please reload this page.