Ejemplo n.º 1
0
 static void dam_ExtensionStatus(object sender, ExtensionStatusEvent e)
 {
     Console.WriteLine("ExtensionStatus Event"
         + "\n\tContext\t\t" + e.Context
         + "\n\tExten\t\t" + e.Exten
         + "\n\tStatus\t\t" + e.Status
     );
 }
Ejemplo n.º 2
0
 private LineControl getLineControlFromExtensionStatusEvent(ExtensionStatusEvent ese)
 {
     log.Debug("Extension status event: " + ese.Exten + ", "  + ese.Channel + ", status:" + ese.Status.ToString());
     LineControl lc = getLineControl(ese.Exten);
     
     switch (ese.Status)
     {
         case 0:
             if (lc.lineControlConnection == null)
             {
                 lc.status = Status.available;
             }
             break;
         case 1:
             lc.status = Status.busy;
             break;
         case 8:
             lc.status = Status.busy;
             break;
         case 4:
             lc.status = Status.inactive;
             lc.lineControlConnection = null;
             break;
     }
     return lc;
 }