Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.95 KB

http-hooks.md

File metadata and controls

59 lines (38 loc) · 1.95 KB

Web Hooks

Global Request Headers

  • realm - string - turn server realm
  • nonce - string - The runtime id of the turn server

nonce: A new ID is generated each time the server is started. This is a random string. Its main function is to determine whether the turn server has been restarted.


GET - /password?address=&interface=&transport=&username=

Get the current user's password, which is mainly used to provide authentication for the turn server.


POST - /events - Events

[Session]:

  • address - string - The IP address and port number of the UDP or TCP connection used by the client.
  • interface - string - The network interface used by the current session.

allocate request:

  • session - Session
  • kind - string - "allocated"
  • username - string - The username used for the turn session.
  • port - uint16 - The port to which the request is assigned.

channel binding request:

  • session - Session
  • kind - string - "channel_bind"
  • username - string - The username used for the turn session.
  • channel - uint16 - The channel to which the request is binding.

create permission request:

  • session - Session
  • kind - string - "create_permission"
  • username - string - The username used for the turn session.
  • ports - uint16[] - The port number of the other side specified when the privilege was created.

refresh request:

  • session - Session
  • kind - string - "refresh"
  • username - string - The username used for the turn session.
  • lifetime - uint32 - Time to expiration in seconds.

session closed:

  • session - Session
  • kind - string - "abort"
  • username - string - The username used for the turn session.