TEXT 8
Path establish Guest on 20th January 2025 05:26:43 AM
  1. public void device_CallEstablished(object sender, CallEstablishedEventArgs e)
  2. {
  3.     //APICallAsync(e.ConnectedDevice.DeviceNumber, e.Line, false, DateTime.Now);
  4.  
  5.     if (e.ConnectedDevice.DeviceNumber[0] != '#' && e.ConnectedDevice.DeviceNumber.Length >= 4)
  6.     {
  7.  
  8.         if (
  9.          e.ControllerDevice.DialedDigits == "#840" ||
  10.          e.ControllerDevice.DialedDigits == "#845" ||
  11.          e.ControllerDevice.DialedDigits == "0130" ||
  12.          e.ControllerDevice.DialedDigits == "" ||
  13.          e.ControllerDevice.DialedDigits == "#848" ||
  14.          e.ControllerDevice.DialedDigits == "#120")
  15.         {
  16.             APICallAsync(e.ConnectedDevice.DeviceNumber, e.Line, false, DateTime.Now);
  17.         }
  18.         else
  19.         {
  20.             DBContext dal = new DBContext();
  21.            
  22.             dal.InsertOutboundAsync(e.ConnectedDevice.DeviceNumber, e.Line);
  23.             APICallAsync(e.ConnectedDevice.DeviceNumber, e.Line, true, DateTime.Now);
  24.         }
  25.  
  26.  
  27.     }
  28.  
  29.     if (menuEventsCallEstablished.Checked)
  30.     {
  31.         CallEventsListViewEventArgs args = new CallEventsListViewEventArgs(
  32.             sender as Device, EVENT_NAME_CALL_ESTABLISHED,
  33.             e.EventTime, string.Empty, e.DeviceNumber,
  34.             string.Empty, string.Empty, string.Empty);
  35.  
  36.         UpdateCallEventsListViewWrapper(sender as Device, args);
  37.     }
  38. }

Hightechrobo bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.