Multiple revisions 397921-397922

........
  r397921 | mmichelson | 2013-08-29 10:42:10 -0500 (Thu, 29 Aug 2013) | 6 lines
  
  Resolve assumptions that bridge snapshots would be non-NULL for transfer stasis events.
  
  Attempting to transfer an unbridged call would result in crashes in either CEL code or
  in the conversion to AMI messages.
........
  r397922 | mmichelson | 2013-08-29 10:42:29 -0500 (Thu, 29 Aug 2013) | 3 lines
  
  Remove extra debug message.
........

Merged revisions 397921-397922 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2013-08-29 15:43:23 +00:00
parent 72cf2779e8
commit 0bc2a77365
3 changed files with 28 additions and 7 deletions

View File

@@ -1197,10 +1197,24 @@ static void cel_blind_transfer_cb(
struct ast_channel_snapshot *chan_snapshot = obj->channel;
struct ast_bridge_snapshot *bridge_snapshot = obj->bridge;
struct ast_json *blob = obj->blob;
struct ast_json *json_exten = ast_json_object_get(blob, "exten");
struct ast_json *json_context = ast_json_object_get(blob, "context");
struct ast_json *json_result = ast_json_object_get(blob, "result");
struct ast_json *json_exten;
struct ast_json *json_context;
RAII_VAR(struct ast_json *, extra, NULL, ast_json_unref);
const char *exten, *context;
enum ast_transfer_result result;
if (!json_result) {
return;
}
result = ast_json_integer_get(json_result);
if (result != AST_BRIDGE_TRANSFER_SUCCESS) {
return;
}
json_exten = ast_json_object_get(blob, "exten");
json_context = ast_json_object_get(blob, "context");
if (!json_exten || !json_context) {
return;
@@ -1211,6 +1225,7 @@ static void cel_blind_transfer_cb(
if (!exten || !context) {
return;
}
extra = ast_json_pack("{s: s, s: s, s: s}",
"extension", exten,
"context", context,