api:pbx:sipphone:webrtc
Table of Contents
API : PBX : SIP phone WebRTC
Introduction
This request will create or update a SIP phone, that is to be used by a WebRTC client.
After this request has completed, the SIP phone account will be open for registration, and should be registered by the client asap.
Request
| URL | https://api.telecomx.dk/pbx/sipphone/webrtc | ||
|---|---|---|---|
| Method | POST | ||
| Access level | PERSONAL, VIEWER, MANAGER, OWNER, RESELLER, ADMIN. | ||
| Body | instanceId | String | ID of WebRTC instance (e.g. Communicator Desktop) that this phone belongs to. |
| v2 | Boolean | True for WebRTC version 2 clients. | |
Request body example
{ instanceId: '5376fghrhghjn4ehfbnje3hucbnjd', v2: true }
Response
The response will be the created/updated SIP phone, if no errors occurred.
| Json object | ||
|---|---|---|
| _id | Id | Unique id of the SIP phone. |
| servers | Array | List of hostnames of WebRTC servers the client may connect to, in order of preference (non-v2). |
| server | String | URL for WebRTC over SIP server, e.g. wss://wssip.telecomx.dk (v2 only). |
| username | String | Username for SIP authentication, auto-generated 32-char string. |
| password | String | Password for SIP authentication, auto-generated 32-char string. |
| extensionNumber | Number | Local extension phone number of the extension the phone is attached to. |
| extensionName | String | Name of user who owns the extension. |
Example
{ _id: '12345678901234567890ABCD', servers: [ 'webrtc1.telecomx.dk', 'webrtc2.telecomx.dk' ], username: '48gjh4ufghfhu3hufbfjksfhjkecv', password: 'fuhiehi0jejicdoj2i0jchiwnpdcc', extensionNumber: '200', extensionName: 'Joakim Von And' }
Example (v2=true)
{ _id: '12345678901234567890ABCD', server: 'wss://wssip.telecomx.dk', username: '48gjh4ufghfhu3hufbfjksfhjkecv', password: 'fuhiehi0jejicdoj2i0jchiwnpdcc', extensionNumber: '200', extensionName: 'Joakim Von And' }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/sipphone/webrtc.txt · Last modified: 2022/06/22 08:24 by Per Møller