示例#1
0
 public static bool RedirectCall(ManagerConnection ami, string destination, string channel = null)
 {
     try
     {
         RedirectAction r = new RedirectAction()
         {
             Channel  = channel,
             Exten    = destination,
             Context  = "bbs-pabx",
             Priority = 1
         };
         r.Dump();
         var res = (ami.SendAction(r));
         return(res.IsSuccess());
     }
     catch
     {
         MessageBox.Show("Failed to transfer call, sorry for any inconveniences.", "Call Transfer Failed", MessageBoxButton.OK, MessageBoxImage.Error);
         return(false);
     }
 }