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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
nameStringTelephone line to register with.Yes

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404An 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

VersionChanges
4.3Function added.