JSON API » phones » phones/ephemeral
Returns ephemeral credentials for Kamailio to be used with the web based phone.
Input parameters
Requires authentication and the residential, user, or wholesale role privileges.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| name | String | Telephone line to register with. | Yes |
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 404 | An ephemeral key is not set in the global system configuration or the telephone line does not exist, or you do not have permission to unlock it. |
Data returned
An ephemeral username and password are returned for the phone as well as a TTL value.
Example: With required parameters
http://enswitch.example.com/api/json/phones/ephemeral/?auth_username=user;auth_password=password;name=1234567{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "username":"1667576194:1234567", "password":"<HMAC SHA512 base64 encoded ephemeral key>", "ttl":"8600" } }
Change history
| Version | Changes |
|---|---|
| 4.3 | Function added. |
