forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various and sundry fixes (2600hz#6046)
- add anti-action for use in `dialplan condition` - allows correlation on the inbound leg - fixes connecting leg - verifies node split in kz_dist - conference events bind fix - add callflow modules for composition - answer, wait_for_noop, wait_for_hangup quick doc
- Loading branch information
1 parent
a4ad34e
commit fa51ab5
Showing
31 changed files
with
370 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Answer | ||
|
||
### About Answer | ||
|
||
Attempts to answer the call; will block callflow execution until the call is answered (`CHANNEL_ANSWER` received). | ||
|
||
#### Schema | ||
|
||
Validator for the answer callflow data object | ||
|
||
|
||
|
||
Key | Description | Type | Default | Required | Support Level | ||
--- | ----------- | ---- | ------- | -------- | ------------- | ||
`skip_module` | When set to true this callflow action is skipped, advancing to the wildcard branch (if any) | `boolean()` | | `false` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Noop | ||
|
||
### About Noop | ||
|
||
A NO-op (no operator) will send a `noop` into the call's command queue. When executed, it will generate a no-op event. This callflow action will block until the noop has been received (effectively telling you when the command queue is empty). | ||
|
||
#### Schema | ||
|
||
Validator for the noop callflow data object | ||
|
||
|
||
|
||
Key | Description | Type | Default | Required | Support Level | ||
--- | ----------- | ---- | ------- | -------- | ------------- | ||
`skip_module` | When set to true this callflow action is skipped, advancing to the wildcard branch (if any) | `boolean()` | | `false` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Answer | ||
|
||
### About Answer | ||
|
||
#### Schema | ||
|
||
Validator for the answer callflow data object | ||
|
||
|
||
|
||
Key | Description | Type | Default | Required | Support Level | ||
--- | ----------- | ---- | ------- | -------- | ------------- | ||
`skip_module` | When set to true this callflow action is skipped, advancing to the wildcard branch (if any) | `boolean()` | | `false` | | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Noop | ||
|
||
### About Noop | ||
|
||
#### Schema | ||
|
||
Validator for the noop callflow data object | ||
|
||
|
||
|
||
Key | Description | Type | Default | Required | Support Level | ||
--- | ----------- | ---- | ------- | -------- | ------------- | ||
`skip_module` | When set to true this callflow action is skipped, advancing to the wildcard branch (if any) | `boolean()` | | `false` | | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Wait For Hangup | ||
|
||
### About Wait For Hangup | ||
|
||
#### Schema | ||
|
||
Validator for the wait_for_hangup callflow data object | ||
|
||
|
||
|
||
Key | Description | Type | Default | Required | Support Level | ||
--- | ----------- | ---- | ------- | -------- | ------------- | ||
`skip_module` | When set to true this callflow action is skipped, advancing to the wildcard branch (if any) | `boolean()` | | `false` | | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Wait For Hangup | ||
|
||
### About Wait For Hangup | ||
|
||
Blocks callflow execution until the call is hungup (`CHANNEL_HANGUP` event received). | ||
|
||
#### Schema | ||
|
||
Validator for the wait_for_hangup callflow data object | ||
|
||
|
||
|
||
Key | Description | Type | Default | Required | Support Level | ||
--- | ----------- | ---- | ------- | -------- | ------------- | ||
`skip_module` | When set to true this callflow action is skipped, advancing to the wildcard branch (if any) | `boolean()` | | `false` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
%%%----------------------------------------------------------------------------- | ||
%%% @copyright (C) 2012-2019, 2600Hz | ||
%%% @doc Answers to the call | ||
%%% | ||
%%% "data":{} | ||
%%% | ||
%%% | ||
%%% This Source Code Form is subject to the terms of the Mozilla Public | ||
%%% License, v. 2.0. If a copy of the MPL was not distributed with this | ||
%%% file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
%%% | ||
%%% @end | ||
%%%----------------------------------------------------------------------------- | ||
-module(cf_answer). | ||
|
||
-behaviour(gen_cf_action). | ||
|
||
-export([handle/2]). | ||
|
||
-include("callflow.hrl"). | ||
|
||
-spec handle(kz_json:object(), kapps_call:call()) -> 'ok'. | ||
handle(_Data, Call) -> | ||
lager:info("answering call"), | ||
_ = kapps_call_command:b_answer(Call), | ||
cf_exe:continue(Call). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
%%%----------------------------------------------------------------------------- | ||
%%% @copyright (C) 2012-2019, 2600Hz | ||
%%% @doc sends a noop | ||
%%% | ||
%%% "data":{} | ||
%%% | ||
%%% | ||
%%% This Source Code Form is subject to the terms of the Mozilla Public | ||
%%% License, v. 2.0. If a copy of the MPL was not distributed with this | ||
%%% file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
%%% | ||
%%% @end | ||
%%%----------------------------------------------------------------------------- | ||
-module(cf_noop). | ||
|
||
-behaviour(gen_cf_action). | ||
|
||
-export([handle/2]). | ||
|
||
-include("callflow.hrl"). | ||
|
||
-spec handle(kz_json:object(), kapps_call:call()) -> 'ok'. | ||
handle(_Data, Call) -> | ||
NoopId = kapps_call_command:noop(Call), | ||
lager:info("noop ~s sent", [NoopId]), | ||
case kapps_call_command:wait_for_noop(Call, NoopId) of | ||
{'error', _E} -> | ||
lager:info("noop failed to be received: ~p", [_E]), | ||
cf_exe:stop(Call); | ||
{'ok', _} -> | ||
lager:info("noop received"), | ||
cf_exe:continue(Call) | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
%%%----------------------------------------------------------------------------- | ||
%%% @copyright (C) 2012-2019, 2600Hz | ||
%%% @doc waits for hangup | ||
%%% | ||
%%% "data":{} | ||
%%% | ||
%%% | ||
%%% This Source Code Form is subject to the terms of the Mozilla Public | ||
%%% License, v. 2.0. If a copy of the MPL was not distributed with this | ||
%%% file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
%%% | ||
%%% @end | ||
%%%----------------------------------------------------------------------------- | ||
-module(cf_wait_for_hangup). | ||
|
||
-behaviour(gen_cf_action). | ||
|
||
-export([handle/2]). | ||
|
||
-include("callflow.hrl"). | ||
|
||
-spec handle(kz_json:object(), kapps_call:call()) -> 'ok'. | ||
handle(_Data, Call) -> | ||
lager:info("waiting for hangup"), | ||
{'ok', 'channel_hungup'} = kapps_call_command:wait_for_hangup(), | ||
cf_exe:stop(Call). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
applications/crossbar/priv/couchdb/schemas/callflows.answer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "callflows.answer", | ||
"description": "Validator for the answer callflow data object", | ||
"properties": { | ||
"skip_module": { | ||
"description": "When set to true this callflow action is skipped, advancing to the wildcard branch (if any)", | ||
"type": "boolean" | ||
} | ||
}, | ||
"type": "object" | ||
} |
12 changes: 12 additions & 0 deletions
12
applications/crossbar/priv/couchdb/schemas/callflows.noop.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "callflows.noop", | ||
"description": "Validator for the noop callflow data object", | ||
"properties": { | ||
"skip_module": { | ||
"description": "When set to true this callflow action is skipped, advancing to the wildcard branch (if any)", | ||
"type": "boolean" | ||
} | ||
}, | ||
"type": "object" | ||
} |
12 changes: 12 additions & 0 deletions
12
applications/crossbar/priv/couchdb/schemas/callflows.wait_for_hangup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "callflows.wait_for_hangup", | ||
"description": "Validator for the wait_for_hangup callflow data object", | ||
"properties": { | ||
"skip_module": { | ||
"description": "When set to true this callflow action is skipped, advancing to the wildcard branch (if any)", | ||
"type": "boolean" | ||
} | ||
}, | ||
"type": "object" | ||
} |
Oops, something went wrong.