Client Authentication
POSThttps://{yourserver}/webhooks/authContent-Type: application/json
This webhook is sent when a SIP client tries to authenticate, it is configured at the account level
Authentication
Authorizationheader (basic auth, required) — Basic authentication of the formBasic <base64(username:password)>.
Request
Body (application/json)
This endpoint expects an object.
methodstringsip request methodrealmstringsip realmusernamestringsip username providedexpiresdoubleexpiration requested, in secondsnoncestringnonce valueuristringsip uri in requestresponsestringdigest value calculated by the clientschemestringencryption protocolalgorithmstringencryption algorithm used, default to MD5 if not providedqopstringqop valuecnoncestringcnonce valuencstringnc value
Response
200
Your callback should return this HTTP status code in all cases. if the request was authenticated and you wish to admit the client to the network, this is indicated by setting the 'status' attribute in the body to 'ok'
statusenumindicates whether the request was successfully authenticated- Allowed values:
ok,fail messagestringa human-readable messageapplication_sidstringsid of application to invoke when this device places a callexpiresdoubleThe expires value to grant to the requesting user. If not provided, the expires value in the request is observed. If provided, must be less than the requested expires value.blacklistdoubleIf provided, represents a period in seconds during which the source IP address should be blacklisted by the platform (0 means forever).
Examples
Request
{
"method": "REGISTER",
"realm": "example.com",
"username": "taro",
"expires": 3600,
"nonce": "InFriVGWVoKeCckYrTx7wg==\"",
"uri": "sip:example.com",
"response": "be641cf7951ff23ab04c57907d59f37d"
}
Response
{
"status": "ok",
"message": "authentication granted",
"application_sid": "string",
"expires": 1.1,
"blacklist": 1.1
}