Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. # API Routes for creating and provisioning a sip-to-webrtc record and users
  2.  
  3. To create a record for accepting incoming sessions as well as potentially forwarding register requests.
  4.  
  5. ## POST /sip-to-webrtc/my-voxbone-webrtc-username
  6.  
  7. ### Body
  8.  
  9. ```json
  10. {
  11. "registrarURI": "sip:{username}@sip.company.com",
  12. "allowedIPs": ["81.192.61.123"]
  13.  
  14. }
  15. ```
  16.  
  17. * registrarURI - a URI string for us to forward registrations onto, allowing for variable substitutions, can be null
  18. * allowedIPs - an array of strings which include IPs to accept traffic from
  19.  
  20. The `{username}` variable could be filled by an extra `X-` header within the registration from the browser or from the `/sip-to-webrtc/my-voxbone-webrtc-username/{username}` route.
  21.  
  22. ### Response 200
  23.  
  24. ```
  25. {
  26. "message": "OK"
  27. }
  28. ```
  29.  
  30. ## GET /sip-to-webrtc/my-voxbone-webrtc-username
  31.  
  32. ### Response
  33.  
  34. 404 or 200
  35.  
  36. ```json
  37. {
  38. "registrarURI": "sip:{username}@sip.company.com",
  39. "allowedIPs": ["81.192.61.123"]
  40.  
  41. }
  42.  
  43. ```
  44.  
  45. ## POST /sip-to-webrtc/my-voxbone-webrtc-username/user
  46.  
  47. ### Body
  48.  
  49. ```json
  50. {
  51. "browserUsername": "alice",
  52. "sipUsername": "bob",
  53. "sipPassword": "secret"
  54. }
  55. ```
  56.  
  57. * sipPassword - is it possible to pre-hash the sip secret? How would we do that? An extra flag?
  58.  
  59. ## POST /sip-to-webrtc/my-voxbone-webrtc-username/users
  60.  
  61. ### Body
  62.  
  63. ```json
  64. [
  65. {
  66. "browserUsername": "alice",
  67. "sipUsername": "bob",
  68. "sipPassword": "secret"
  69. },
  70. {
  71. "browserUsername": "bob",
  72. "sipUsername": "alice",
  73. "sipPassword": "secret"
  74. }
  75. ]
  76. ```
  77.  
  78. ## GET /sip-to-webrtc/my-voxbone-webrtc-username/alice
  79.  
  80. ### Response
  81.  
  82. 404 or 200
  83.  
  84. ```json
  85. {
  86. "browserUsername": "bob",
  87. "sipUsername": "alice",
  88. "sipPassword": "secret"
  89. }
  90. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement