Skip to content

Commit

Permalink
add quickcall (2600hz#4821)
Browse files Browse the repository at this point in the history
remove extra colon

add missing pages
  • Loading branch information
icehess authored and jamesaimonetti committed Apr 30, 2018
1 parent add6527 commit 76ce671
Show file tree
Hide file tree
Showing 9 changed files with 222 additions and 207 deletions.
2 changes: 1 addition & 1 deletion applications/blackhole/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ From here, you can write your own Javascript callbacks, triggered every time a r

You can add one or multiple bindings by using:

!!! note:
!!! note
Binding will be picked first over bindings in case both are added

```javascript
Expand Down
4 changes: 2 additions & 2 deletions applications/crossbar/doc/pivot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About Pivot

The Pivot Crossbar resource allows the client to query and inspect data related to the [Pivot](/applications/pivot/README.md) application (real-time call control).
The Pivot Crossbar resource allows the client to query and inspect data related to the [Pivot](../../pivot/doc/README.md) application (real-time call control).

## Enabling in Crossbar

Expand All @@ -17,7 +17,7 @@ The Pivot endpoint is not loaded on start in a default Kazoo installation.
* Click 'Save Document' in top left of the screen

!!! note
Adding `cb_pivot` to the crossbar `system_config` doc will not start the endpoint; only on restarting Crossbar will `cb_pivot` be loaded. Use the [sup](./sup.md) command above to start the endpoint at runtime.
Adding `cb_pivot` to the crossbar `system_config` doc will not start the endpoint; only on restarting Crossbar will `cb_pivot` be loaded. Use the `sup` command above to start the endpoint at runtime.

## Callflow Schema

Expand Down
61 changes: 32 additions & 29 deletions applications/crossbar/doc/quickcall.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
### Quickcall
# Quickcall

#### About Quickcall
## About Quickcall

#### Schema
Quickcall allows you to create legs between endpoints (user, device, ...).

### Target Call ID

If you know ahead of time that this new quickcall leg will be interacting with an existing call leg, you can supply the existing call-id to the API call to ensure the new leg will be created on the same media server as the existing call leg.

### Endpoints supported

Supported endpoints for quickcalls:

Endpoint Type | Endpoint Id
------------- | -----------
`users` | `{USER_ID}`
`devices` | `{DEVICE_ID}`

### Custom Application Vars

CAVs allow you to set custom data that will appear on subsequent call events (found in [Webhook](./webhooks.md) and [Websocket](./websockets.md) payloads) as well as the final CDR.

You can specify CAVs in two way:

* As query-string parameters: `/quickcall/{NUMBER}?foo=bar`
* As POST body: `{"data":{"custom_application_vars":{"foo":"bar"}}}`

## Schema

Request options (query string in a GET or POST body):

Expand All @@ -18,19 +42,7 @@ Key | Type | Description
`target_call_id` | `string()` | An existing call-id used to determine what media server to create the quickcall leg on
`timeout` | `integer(3..)` | In seconds, how long to ring the device(s) (defaults to 30)

##### Target Call ID

If you know ahead of time that this new quickcall leg will be interacting with an existing call leg, you can supply the existing call-id to the API call to ensure the new leg will be created on the same media server as the existing call leg.

##### Custom Application Vars

CAVs allow you to set custom data that will appear on subsequent call events (found in webhook and websocket payloads) as well as the final CDR.

As query-string parameters: `/quickcall/{NUMBER}?foo=bar`

As POST body: `{"data":{"custom_application_vars":{"foo":"bar"}}}`

#### Non-blocking Quickcall
## Non-blocking Quickcall

This returns a 202 immediately. The drawback is that if no endpoints are found to originate to, there will be no channel events generated to let an external application know the quickcall failed.

Expand All @@ -42,7 +54,7 @@ curl -v -X GET \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/{ENDPOINTS}/{ENDPOINT_ID}/quickcall/{NUMBER}
```

#### Blocking Quickcall
## Blocking Quickcall

This will return a 202 if the quickcall successfully originates (meaning a channel is started). It will return errors if the originate fails to start a channel or if there aren't any endpoints available.

Expand All @@ -54,16 +66,7 @@ curl -v -X POST \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/{ENDPOINTS}/{ENDPOINT_ID}/quickcall/{NUMBER}
```

#### Endpoints supported

Supported endpoints for quickcalls:

Endpoint Type | Endpoint Id
------------- | -----------
`users` | `{USER_ID}`
`devices` | `{DEVICE_ID}`

#### Execute a quick call for a device
## Execute a quick call for a device

Ring the device; once answered, connect to `{PHONE_NUMBER}`

Expand Down Expand Up @@ -141,7 +144,7 @@ curl -v -X GET \
}
```

#### Execute a quick call for a user
## Execute a quick call for a user

Ring user's devices; once answered, connect to `{PHONE_NUMBER}`

Expand Down Expand Up @@ -219,7 +222,7 @@ curl -v -X GET \
}
```

### Failing Requests
## Failing Requests

If issued with a `GET` to an unregistered device (or a user with no available devices), quickcall will return the call setup information immediately but no channel events will be generated (no events for webhooks/websockets). This can lead external apps to not know if the quickcall was originated properly or not.

Expand Down
2 changes: 1 addition & 1 deletion applications/crossbar/doc/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Crossbar API to configure authentication for an account.
Crossbar authenticator modules can have their own account's version configuration to control some aspect of them like enabling/disabling the module or use multi factor authenticator for that specific module.

!!! note
This API endpoint is _only_ configuring the authentication for a account, for configuring the system, you should use [System Configuration](./system_configs.md) instead. System config category is `crossbar.auth`.
This API endpoint is _only_ configuring the authentication for a account, for configuring the system, you should use `system_configs` instead as super duper admin. System config category is `crossbar.auth`.

### How Crossbar is looking for authentication configuration

Expand Down
Loading

0 comments on commit 76ce671

Please sign in to comment.