Wipple CPaaS
Menu
Webhooks / Client Authentication

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

  • Authorization header (basic auth, required) — Basic authentication of the form Basic <base64(username:password)>.

Request

Body (application/json)

This endpoint expects an object.

  • methodstringrequiredsip request method
  • realmstringrequiredsip realm
  • usernamestringrequiredsip username provided
  • expiresdoublerequiredexpiration requested, in seconds
  • noncestringrequirednonce value
  • uristringrequiredsip uri in request
  • responsestringrequireddigest value calculated by the client
  • schemestringoptionalencryption protocol
  • algorithmstringoptionalencryption algorithm used, default to MD5 if not provided
  • qopstringoptionalqop value
  • cnoncestringoptionalcnonce value
  • ncstringoptionalnc 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'

  • statusenumrequiredindicates whether the request was successfully authenticated
  • Allowed values: ok, fail
  • messagestringoptionala human-readable message
  • application_sidstringoptionalsid of application to invoke when this device places a call
  • expiresdoubleoptionalThe 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.
  • blacklistdoubleoptionalIf 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
}