diff options
author | Kinsey Moore <kmoore@digium.com> | 2014-08-20 13:06:33 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2014-08-20 13:06:33 +0000 |
commit | 36f4bff943c0ea83b3d1a3ab5243658d64b16ba3 (patch) | |
tree | 7bc49bbdb265bfae3c007c1b23f9964c202ae5f9 /res/ari | |
parent | 01f1ff1f77101b2612ddb885dc6e22125e46a9fb (diff) |
Stasis: Add information to blind transfer event
When a blind transfer occurs that is forced to create a local channel
pair to satisfy the transfer request, information about the local
channel pair is not published. This adds a field to describe that
channel to the blind transfer message struct so that this information
is conveyed properly to consumers of the blind transfer message.
This also fixes a bug in which Stasis() was unable to properly identify
the channel that was replacing an existing Stasis-controlled channel
due to a blind transfer.
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3921/
........
Merged revisions 421537 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 421538 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ari')
-rw-r--r-- | res/ari/ari_model_validators.c | 9 | ||||
-rw-r--r-- | res/ari/ari_model_validators.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/res/ari/ari_model_validators.c b/res/ari/ari_model_validators.c index be1a244df..06c3cf7ee 100644 --- a/res/ari/ari_model_validators.c +++ b/res/ari/ari_model_validators.c @@ -2062,6 +2062,15 @@ int ast_ari_validate_bridge_blind_transfer(struct ast_json *json) res = 0; } } else + if (strcmp("replace_channel", ast_json_object_iter_key(iter)) == 0) { + int prop_is_valid; + prop_is_valid = ast_ari_validate_channel( + ast_json_object_iter_value(iter)); + if (!prop_is_valid) { + ast_log(LOG_ERROR, "ARI BridgeBlindTransfer field replace_channel failed validation\n"); + res = 0; + } + } else if (strcmp("result", ast_json_object_iter_key(iter)) == 0) { int prop_is_valid; has_result = 1; diff --git a/res/ari/ari_model_validators.h b/res/ari/ari_model_validators.h index 64dd1b071..3a0bdb94a 100644 --- a/res/ari/ari_model_validators.h +++ b/res/ari/ari_model_validators.h @@ -1304,6 +1304,7 @@ ari_validator ast_ari_validate_application_fn(void); * - context: string (required) * - exten: string (required) * - is_external: boolean (required) + * - replace_channel: Channel * - result: string (required) * - transferee: Channel * BridgeCreated |