1.2.9 Session State Monitoring

Enter the command to create a hook on a session which will periodically send information on the session whenever a change occurs in the session. Defined by the Id = SessionId parameters. If this parameter is -1, the hook will be created for all sessions.

Request

<msg Id="CTI_NSPK_CREATE_HOOK_REQ">
<CTI_NSPK_IE_OBJECT Type="SESSION_SOURCE" Id="2"/>
</msg>

<msg Id="CTI_NSPK_CREATE_HOOK_REQ">
<CTI_NSPK_IE_OBJECT Type="SESSION_SOURCE" Id="-1"/>
</msg>

Response and Indication

<msg Id="CTI_NSPK_CREATE_HOOK_CONF">
<CTI_IE_RESULT Result="OK"/>
</msg>

<msg Id="CTI_NSPK_SESSION_SOURCE_INFO_IND">
<CTI_NSPK_IE_SESSION_SOURCE_INFO SessionId="0x2" SourceId="0x3" PlayState="PLAYING" ActFileId="0x11" ActFile="C:\Documents and Settings\jsvoboda\Plocha\Download\Adele - 21\01 Rolling in the Deep.mp3" ActDuration="229347" State="ACTIVE" StateInfo="File(ACTIVE); Resampler(ACTIVE)"/>
<CTI_NSPK_IE_SESSION_SOURCE_VOL SessionId="0x2" SourceId="0x3" Level="11" ActFilePos="54545"/>

  </msg>

IE

<documentation IE="CTI_NSPK_IE_SESSION_SOURCE_INFO">
<member Type="KER_T_INT" Name="SessionId" Brief="Primary key source (link to SESSION) "/>
<member Type="KER_T_INT" Name="SourceId" Brief="Primary key source (link to SESSION_SOURCE) "/>
<member Type="NSPK_E_SES_PLAY_STATE" Name="PlayState" Brief="Playback status according NSPK_E_SES_PLAY_STATE "/>
<member Type="KER_T_INT" Name="ActFileId" Brief="Currently playing file (id corresponds FileId of PLAY_LIST table) "/>
<member Type="KER_P_CHAR" Name="ActFile" OffsetPointer="true" Brief="Name of the currently playing file "/>
<member Type="KER_T_INT" Name="ActDuration" Brief="The length of the file in ms "/>
<member Type="NSPK_E_STATE" Name="State" Brief="Current status of source session, according NSPK_E_STATE "/>
<member Type="KER_P_CHAR" Name="StateInfo" OffsetPointer="true" Brief="Text description of resources state "/>
<documentation>

<documentation Enum="NSPK_E_SES_PLAY_STATE">
<item Name="STOPPED" Brief="Play is stopped "/>
<item Name="READING" Brief="Reads the next file in the "/>
<item Name="PLAYING" Brief="Now Playing "/>
<item Name="PAUSED" Brief="Playback is zapausováno "/>
<documentation>

<documentation Enum="NSPK_E_STATE">
<!-- sure these items are sorted according to priority!! -->
<item Name="ERROR" Brief="When opening the device error "/>
<item Name="OPENING" Brief="The device is currently open "/>
<item Name="CLOSING" Brief="The device is just closing "/>
<item Name="IDLE" Brief="The device is not open "/>
<item Name="ACTIVE" Brief="The facility is open and functional "/>
<documentation>

<documentation IE="CTI_NSPK_IE_SESSION_SOURCE_VOL">
<member Type="INT" Name="SessionId" Brief="Primary key source (link to SESSION)"/>
<member Type="INT" Name="SourceId" Brief="Primary key source (link to SESSION_SOURCE)"/>
<member Type="INT" Name="Level" Brief="Source level"/>
<member Type="INT" Name="ActFilePos" Brief="Actual position in playing file [ms]"/>
</documentation>