Skip to content

Commit

Permalink
Added Transfer Building Block
Browse files Browse the repository at this point in the history
  • Loading branch information
Rabeb Othmani committed Feb 28, 2019
1 parent dbc41b6 commit 73ce946
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions NexmoDotNetQuickStarts/Controllers/VoiceController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,23 @@ public ActionResult PlayDTMFToCall()

return RedirectToAction("MakeCall");
}

[HttpPost]
public ActionResult TransferCall()
{
var UUID = Session["UUID"].ToString();

var result = Client.Call.Edit(UUID, new Call.CallEditCommand
{
Action = "transfer",
Destination = new Call.Destination
{
Type = "ncco",
Url = new[] { "https://developer.nexmo.com/ncco/transfer.json" }
}
});

return RedirectToAction("MakeCall");
}
}
}

0 comments on commit 73ce946

Please sign in to comment.