Message Trace Log
-----------------

This message trace file shows the message flow between 
the TS Call application and the Telephony Server for a variety
of call processing tasks.  It is provided to aid developers
of PBX drivers in supporting TS Call with their driver
implementations.


This file shows the message trace involved in performing 
the following activities:

1.) Open a stream to the Tserver
2.) Begin monitoring a device
3.) Make a local on-PBX call
4.) Hang up the call
5.) Make an off-PBX trunk call
6.) Hang up the call
7.) Make a local on-PBX call
8.) Place the call on hold from the telephone set
9.) Retrieve the Held call from the telephone set
10.) Hang up the call
11.) Stop monitoring the device
12.) Close the stream to the Tserver

The file is divided into two parts.  The first part shows the message 
trace in the application to Tserver direction and the second part shows 
the messages sent from the Tserver to the application.  All events are 
labeled to correspond to one of the actions listed above.


I. Application -> Tserver
-------------------------

// Open a stream (1)
value ACSOpenStream ::= 
{
  streamType 1,
  serverID "ATT#G3_SWITCH#CSTA#TSRVMTLAB",
  loginID "supervisor",
  cryptPass '3D08B33C54682F0B'H,
  applicationName "TSCall",
  level 1,
  apiVer "V1.6",
  libVer "V0.2a",
  tsrvVer ""
}

// Monitor the users device (2)
value CSTAMonitorDevice ::= 
{
  deviceID "4470",
  monitorFilter 
  {
    call '0000'H,
    feature '00'H,
    agent '00'H,
    maintenance '00'H,
    privateFilter 0
  }
}

// Make a on-PBX call from the users device (4470) to extension 4460 (3)
value CSTAMakeCall ::= 
{
  callingDevice "4470",
  calledDevice "4460"
}

// Clear the connection.  The call ID was returned to the application
// from the Tserver in various events as can be seen in the section of
// this file that shows the message trace from the Tserver 
// to the application. (4)
value CSTAClearConnection ::= 
{
  call 
  {
    callID 231,
    deviceID "4470",
    devIDType 0
  }
}

// Make a trunk call (5) 
value CSTAMakeCall ::= 
{
  callingDevice "4470",
  calledDevice "99575750"
}

// Clear the connection (6)
value CSTAClearConnection ::= 
{
  call 
  {
    callID 232,
    deviceID "4470",
    devIDType 0
  }
}

// (7)
value CSTAMakeCall ::= 
{
  callingDevice "4470",
  calledDevice "4460"
}


// At this point the call is placed on hold from the telephone
// set (8) and then retrieved from the telephone set (9).  As
// such, no events are generated from the application to the
// Tserver.  The application however does receive unsolicited
// HELD and RETRIEVE events from the Tserver as seen in the 
// second part of this trace file.


// (10)
value CSTAClearConnection ::= 
{
  call 
  {
    callID 233,
    deviceID "4470",
    devIDType 0
  }
}

// Stop monitoring - the monitorCrossRefID was returned in the 
// Monitor confirmation event (11)
value CSTAMonitorStop ::= 
{
  monitorCrossRefID 1
}

// Close the stream without waiting for a confirmation (12)
value ACSAbortStream ::= 
{
  null NULL
}


II. Tserver -> Application
-------------------------

// Open Stream Confirmation Event (1)
value ACSOpenStreamConfEvent ::= 
{
  apiVer "V1.6",
  libVer "V0.2a",
  tsrvVer "V0.2a",
  drvrVer "V0.1f"
}

// Monitor Confirmation Event (2)
value CSTAMonitorConfEvent ::= 
{
  monitorCrossRefID 1,
  monitorFilter 
  {
    call '0040'H,
    feature 'F0'H,
    agent 'FC'H,
    maintenance 'C0'H,
    privateFilter 0
  }
}

// Unsolicited "off-hook" event - we've been taken offhook to make the call 
// and a callID has been assigned (3)
value ServiceInitiatedEvent ::= 
{
  initiatedConnection 
  {
    callID 231,
    deviceID "4470",
    devIDType 0
  },
  localConnectionInfo 255,
  cause 255
}

// Make Call Confirmation Event (3)
value CSTAMakeCallConfEvent ::= 
{
  newCall 
  {
    callID 231,
    deviceID "4470",
    devIDType 0
  }
}

// Unsolicited "alerting" event - the called party is alerting (ringing) (3)
value DeliveredEvent ::= 
{
  connection 
  {
    callID 231,
    deviceID "4460",
    devIDType 0
  },
  alertingDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  callingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  calledDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  lastRedirectionDevice 
  {
    deviceID "",
    deviceIDType 30,
    deviceIDStatus 2
  },
  localConnectionInfo 255,
  cause 255
}

// Unsolicited "call established" event - the called party has answered (3)
value EstablishedEvent ::= 
{
  establishedConnection 
  {
    callID 231,
    deviceID "4460",
    devIDType 0
  },
  answeringDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  callingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  calledDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  lastRedirectionDevice 
  {
    deviceID "",
    deviceIDType 30,
    deviceIDStatus 2
  },
  localConnectionInfo 255,
  cause 255
}

// Unsolicited - the call is gone (4)
value ConnectionClearedEvent ::= 
{
  droppedConnection 
  {
    callID 231,
    deviceID "4470",
    devIDType 0
  },
  releasingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  localConnectionInfo 255,
  cause 255
}

// Clear connection confirmation event (4)
value CSTAClearConnectionConfEvent ::= 
{
  null NULL
}

// (5)
value ServiceInitiatedEvent ::= 
{
  initiatedConnection 
  {
    callID 232,
    deviceID "4470",
    devIDType 0
  },
  localConnectionInfo 255,
  cause 255
}

// (5)
value CSTAMakeCallConfEvent ::= 
{
  newCall 
  {
    callID 232,
    deviceID "4470",
    devIDType 0
  }
}

// For an off-PBX call the unsolicited Network Reached Event indicates 
// that this call has reached the network.  There will be no Delivered 
// or Established event for calls of this type. (5)
value NetworkReachedEvent ::= 
{
  connection 
  {
    callID 232,
    deviceID "T232#2",
    devIDType 1
  },
  trunkUsed 
  {
    deviceID "",
    deviceIDType 70,
    deviceIDStatus 1
  },
  calledDevice 
  {
    deviceID "",
    deviceIDType 30,
    deviceIDStatus 1
  },
  localConnectionInfo 255,
  cause 255
}

// (6)
value ConnectionClearedEvent ::= 
{
  droppedConnection 
  {
    callID 232,
    deviceID "4470",
    devIDType 0
  },
  releasingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  localConnectionInfo 255,
  cause 255
}

// (6)
value CSTAClearConnectionConfEvent ::= 
{
  null NULL
}

// (7)
value ServiceInitiatedEvent ::= 
{
  initiatedConnection 
  {
    callID 233,
    deviceID "4470",
    devIDType 0
  },
  localConnectionInfo 255,
  cause 255
}

// (7)
value CSTAMakeCallConfEvent ::= 
{
  newCall 
  {
    callID 233,
    deviceID "4470",
    devIDType 0
  }
}

// (7)
value DeliveredEvent ::= 
{
  connection 
  {
    callID 233,
    deviceID "4460",
    devIDType 0
  },
  alertingDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  callingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  calledDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  lastRedirectionDevice 
  {
    deviceID "",
    deviceIDType 30,
    deviceIDStatus 2
  },
  localConnectionInfo 255,
  cause 255
}

// (7)
value EstablishedEvent ::= 
{
  establishedConnection 
  {
    callID 233,
    deviceID "4460",
    devIDType 0
  },
  answeringDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  callingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  calledDevice 
  {
    deviceID "4460",
    deviceIDType 0,
    deviceIDStatus 0
  },
  lastRedirectionDevice 
  {
    deviceID "",
    deviceIDType 30,
    deviceIDStatus 2
  },
  localConnectionInfo 255,
  cause 255
}

// Call was placed on hold from telephone so no confirmation event but
// we do get this unsolicited Held event (8)
value HeldEvent ::= 
{
  heldConnection 
  {
    callID 233,
    deviceID "4470",
    devIDType 0
  },
  holdingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  localConnectionInfo 255,
  cause 255
}

// Call retreived via the telephone (9)
value RetrievedEvent ::= 
{
  retrievedConnection 
  {
    callID 233,
    deviceID "4470",
    devIDType 0
  },
  retrievingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  localConnectionInfo 255,
  cause 255
}

// (10)
value ConnectionClearedEvent ::= 
{
  droppedConnection 
  {
    callID 233,
    deviceID "4470",
    devIDType 0
  },
  releasingDevice 
  {
    deviceID "4470",
    deviceIDType 0,
    deviceIDStatus 0
  },
  localConnectionInfo 255,
  cause 255
}

// (10)
value CSTAClearConnectionConfEvent ::= 
{
  null NULL
}
