Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # API Routes for creating and provisioning a sip-to-webrtc record and users
- To create a record for accepting incoming sessions as well as potentially forwarding register requests.
- ## POST /sip-to-webrtc/my-voxbone-webrtc-username
- ### Body
- ```json
- {
- "registrarURI": "sip:{username}@sip.company.com",
- "allowedIPs": ["81.192.61.123"]
- }
- ```
- * registrarURI - a URI string for us to forward registrations onto, allowing for variable substitutions, can be null
- * allowedIPs - an array of strings which include IPs to accept traffic from
- 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.
- ### Response 200
- ```
- {
- "message": "OK"
- }
- ```
- ## GET /sip-to-webrtc/my-voxbone-webrtc-username
- ### Response
- 404 or 200
- ```json
- {
- "registrarURI": "sip:{username}@sip.company.com",
- "allowedIPs": ["81.192.61.123"]
- }
- ```
- ## POST /sip-to-webrtc/my-voxbone-webrtc-username/user
- ### Body
- ```json
- {
- "browserUsername": "alice",
- "sipUsername": "bob",
- "sipPassword": "secret"
- }
- ```
- * sipPassword - is it possible to pre-hash the sip secret? How would we do that? An extra flag?
- ## POST /sip-to-webrtc/my-voxbone-webrtc-username/users
- ### Body
- ```json
- [
- {
- "browserUsername": "alice",
- "sipUsername": "bob",
- "sipPassword": "secret"
- },
- {
- "browserUsername": "bob",
- "sipUsername": "alice",
- "sipPassword": "secret"
- }
- ]
- ```
- ## GET /sip-to-webrtc/my-voxbone-webrtc-username/alice
- ### Response
- 404 or 200
- ```json
- {
- "browserUsername": "bob",
- "sipUsername": "alice",
- "sipPassword": "secret"
- }
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement