<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>TAPI CTi Port Monitor</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=" />
  <subtitle>TAPI CTi Port Monitor</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=</id>
  <updated>2013-05-23T14:56:50Z</updated>
  <dc:date>2013-05-23T14:56:50Z</dc:date>
  <entry>
    <title>RE: TSP Media Driver CUCM 8.5</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14258251" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14258251</id>
    <updated>2013-04-15T09:21:18Z</updated>
    <published>2013-04-15T09:21:18Z</published>
    <summary type="html">If you look at the other discussion, i posted my sample code... I link the library statically and i use callbacks without any problem...</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2013-04-15T09:21:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: TSP Media Driver</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14258053" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14258053</id>
    <updated>2013-04-15T09:02:43Z</updated>
    <published>2013-04-15T09:02:43Z</published>
    <summary type="html">Hi Antonio, 
 
I agree with you, probably cisco doesn't care too much on dll naming because they give a c++ lib, which contains directly the reference to the correct dll file.
 
For your second question, I didn't find any sample application, I have to do it by myself. I developed C# libraries as interops of the rtplib and tapi, and works well now... 
I have a c++ console app that works for debug purposes... I'll post here some sample code for minimum handling...
I have a CTapiLine class, this function enables handling of dev specific events...


BOOL CTapiLine::DevSpecEnableStreamData()
{
 int dwSize = sizeof (VARSTRING) + 1024;
 VARSTRING* pDeviceID = pDeviceID = (VARSTRING *) calloc (1, dwSize);
 pDeviceID-&gt;dwTotalSize = dwSize;
 //Fill in Structure
 long lResult = lineGetID (m_LineHandle, 0, NULL, LINECALLSELECT_LINE, pDeviceID, "ciscowave/out");
 
 if(lResult != NO_ERROR)
 CSmLogger::AddLogText(1, TAPI_LOG_HANDLE, "[CTapiLine::DevSpecEnableStreamData]\r\n"
 "\tName: %s\r\n"
 "\tlineGetID Error %s", GetName(), CTapiEnvironment::GetTAPIErrorString(lResult));
 else
 {
 m_EndPointDevId = (DWORD) *((DWORD *) ((LPSTR) pDeviceID + pDeviceID-&gt;dwStringOffset));
 
 CSmLogger::AddLogText(1, TAPI_LOG_HANDLE, "[CTapiLine::DevSpecEnableStreamData]\r\n"
 "\tName: %s\r\n"
 "\m_EndPointDevId: %d", GetName(), m_EndPointDevId);
 }
 
 CCiscoLineDevSpecificSetStatusMsgs _statusMsg;
 _statusMsg.m_DevSpecificStatusMsgsFlag = DEVSPECIFIC_MEDIA_STREAM;
 
 CSmLogger::AddLogText(1, TAPI_LOG_HANDLE, "[CTapiLine::DevSpecEnableStreamData]\r\n"
 "\tName: %s\r\n"
 "\_statusMsg.GetMsgType(): %d\r\n"
 "\_statusMsg.dwSize() %d", GetName(), _statusMsg.GetMsgType(), _statusMsg.dwSize());
 
 lResult = lineDevSpecific(m_LineHandle, 0, NULL, _statusMsg.lpParams(), _statusMsg.dwSize());
 if(lResult &gt; 0)
 {
 CSmLogger::AddLogText(1, TAPI_LOG_HANDLE, "[CTapiLine::DevSpecEnableStreamData]\r\n"
 "\tName: %s\r\n"
 "\tlineDevSpecific RequestId = 0x%08x (%d)", GetName(), lResult, lResult);
 AddRequest(lResult, NULL); 
 }
 else if(lResult != NO_ERROR)
 CSmLogger::AddLogText(1, TAPI_LOG_HANDLE, "[CTapiLine::DevSpecEnableStreamData]\r\n"
 "\tName: %s\r\n"
 "\tlineDevSpecific Error %s", GetName(), CTapiEnvironment::GetTAPIErrorString(lResult));
 
 return lResult &gt; 0;
}
 
This function instead manages events from devSpecific and plays data
void CTapiLine::OnDevSpecificMessage(LINEMESSAGE message)
{
 DWORD CiscoMessageType = message.dwParam1 &amp; 0x000000FF;
 CSmLogger::AddLogText(0, TAPI_LOG_HANDLE, "[CTapiLine::OnDevSpecificMessage] CiscoMessageType 0x%08x", CiscoMessageType);
 
 switch(CiscoMessageType)
 {
 case SLDSMT_START_TRANSMISION:
 {
 CSmLogger::AddLogText(0, TAPI_LOG_HANDLE, "[CTapiLine::OnDevSpecificMessage] Received START_TRANSMISION");
 if(m_hEndPoint == NULL)
 {
 m_hEndPoint = EpOpenById(m_EndPointDevId, Both, EndPointCBK);
 }
 
 HANDLE hStream = EpGetStreamHandle(m_hEndPoint, STREAM_TYPE_AUDIO, ToNwk);
 
 if(hStream != NULL)
 {
 if(EpStreamStart(hStream, EndPointCBK))
 {
 int lSize;
 PUCHAR buffer;
 
 FILE* pFile = fopen("d:\\downloads\\test.raw", "rb");
   size_t result;
 // obtain file size:
 fseek (pFile , 0 , SEEK_END);
 lSize = ftell (pFile);
 rewind (pFile);
 
 // allocate memory to contain the whole file:
 buffer = (PUCHAR) malloc (sizeof(PUCHAR)*lSize);
 
 // copy the file into the buffer:
 result = fread (buffer,1,lSize,pFile);
 if (result != lSize) {fputs ("Reading error",stderr); exit (3);}
 /* the whole file is now loaded in the memory buffer. */
   // terminate
 fclose (pFile);
  
 EpStreamWrite(hStream, buffer, lSize, new GUID(), EndPointCBK);
 }
 }
 }
 break;
 case SLDSMT_STOP_TRANSMISION:
 {
 CSmLogger::AddLogText(0, TAPI_LOG_HANDLE, "[CTapiLine::OnDevSpecificMessage] Received STOP_TRANSMISION");
 
 if(m_hEndPoint != NULL)
 {
 HANDLE hStream = EpGetStreamHandle(m_hEndPoint, STREAM_TYPE_AUDIO, ToNwk);
 
 if(hStream != NULL)
 {
 EpStreamStop(hStream);
 }
 EpClose(m_hEndPoint, Both);
 m_hEndPoint = NULL;
 }
 }
 break;
 case SLDSMT_START_RECEPTION:
 {
 CSmLogger::AddLogText(0, TAPI_LOG_HANDLE, "[CTapiLine::OnDevSpecificMessage] Received START_RECEPTION");
 if(m_hEndPoint == NULL)
 {
 m_hEndPoint = EpOpenById(m_EndPointDevId, Both, EndPointCBK);
 }
 }
 break;
 case SLDSMT_STOP_RECEPTION:
 {
 CSmLogger::AddLogText(0, TAPI_LOG_HANDLE, "[CTapiLine::OnDevSpecificMessage] Received STOP_RECEPTION");
 if(m_hEndPoint != NULL)
 {
 HANDLE hStream = EpGetStreamHandle(m_hEndPoint, STREAM_TYPE_AUDIO, ToApp);
 
 if(hStream != NULL)
 {
 EpStreamStop(hStream);
 }
 
 EpClose(m_hEndPoint, Both);
 m_hEndPoint = NULL;
 }
 }
 break;
 }
}
 </summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2013-04-15T09:02:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: TSP Media Driver CUCM 8.5</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14253881" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14253881</id>
    <updated>2013-04-15T08:37:43Z</updated>
    <published>2013-04-15T08:37:43Z</published>
    <summary type="html">I don't know why it doesn't work, but why you don't use the header files and the lib provided from cisco? The implementation using files provided is simpler...
 
You can find these files in Cisco tsp install directory (for example: "C:\Program Files (x86)\Cisco" and subfolder "RtpLib")</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2013-04-15T08:37:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: TSP x64 DevSpecific dword size mismatch problem</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14192726" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14192726</id>
    <updated>2013-04-12T07:03:52Z</updated>
    <published>2013-04-12T07:03:52Z</published>
    <summary type="html">if you want to have a anycpu interop, you have to write your structures as follows (I post you an example of my implementation that works well...)
 
[StructLayout(LayoutKind.Sequential)]
struct CCiscoLineDevSpecificSetStatusMsgs
{
 public uint m_MsgType;
 public uint m_DevSpecificStatusMsgsFlag; // LINE_DEVSPECIFIC.
}
 
[StructLayout(LayoutKind.Explicit, Size = 16)]
struct CCiscoLineDevSpecificSetStatusMsgs_64
{
 [FieldOffset(0)]
 public uint m_MsgType;
 [FieldOffset(8)]
 public uint m_DevSpecificStatusMsgsFlag; // LINE_DEVSPECIFIC.
}
 
This because the compiler alignment used by cisco is the default one, 4byte at 32 bits, 8byte at 64 bits
Bye, D.</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2013-04-12T07:03:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: TSP Media Driver CUCM 8.5</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14192654" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14192654</id>
    <updated>2013-04-12T06:57:36Z</updated>
    <published>2013-04-12T06:57:36Z</published>
    <summary type="html">Hi Antonio,
 
you need to wait for status messages as described in documentation before open the Ep.
 
See the "Typical TAPI Application Message Flow" under Media driver section of TAPI Developers Guide for Cisco Unified Communications Manager Release 8.5(1)
 
Bye, D.</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2013-04-12T06:57:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: TSP Media Driver</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=10905632" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=10905632</id>
    <updated>2013-01-20T15:10:50Z</updated>
    <published>2013-01-20T15:10:50Z</published>
    <summary type="html">No suggestions??</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2013-01-20T15:10:50Z</dc:date>
  </entry>
  <entry>
    <title>TSP Media Driver</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9108208" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9108208</id>
    <updated>2012-12-05T14:03:06Z</updated>
    <published>2012-12-05T14:03:06Z</published>
    <summary type="html">Hello to everybody,
i'm approaching the new TSP Media Driver, in order to be compatible with the new UCM 9.0.
I have 2 questions about this argument:
  1. I found a mismatch in documentation about library naming: in 64 bit os the library ciscortplib.dll changes name in ciscortplib64.dll. Is this an error that will be fixed (the library name will remain ciscortplib.dll also in 64 bit os) or not?
  2. Is there any cisco sample application that uses media driver, which explains in a more detailed way this new integration?
Thank you all,
Davide.</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2012-12-05T14:03:06Z</dc:date>
  </entry>
  <entry>
    <title>TSP Log issue</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7159873" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7159873</id>
    <updated>2012-09-28T09:34:37Z</updated>
    <published>2012-09-28T09:34:37Z</published>
    <summary type="html">Hi Everybody,
i'm getting a log issue, i cannot match commands due to a strage difference in hCall value print. I'll post here a sample 
Here is my Log:

L2 11:24.00.674 - [CTapiCall::Terminate] Command sent
[b]	hCall: 65570 (0x00010022)[/b]
	ReqID: 65553

 
and here TSP Log:

11:24:00.674 |--&gt;TSPI_lineDrop() 
11:24:00.674 |   TSPI_lineDrop() 
 dwRequestID =0x00010011
[b] hdCall=0x0222CC38[/b]
[b][/b] lpsUserUserInfo = =0x00000000
 dwSize = 0


How can I match the two values, in order to analyze logs??


Thanks, D.</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2012-09-28T09:34:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: TAPI CTi Port Monitor</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5995041" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5995041</id>
    <updated>2012-07-05T17:03:08Z</updated>
    <published>2012-07-05T17:03:08Z</published>
    <summary type="html">Ok, i've found all documentation about 3rd party monitoring for CtiPorts, but the TSP returns LINEERR_OPERATIONFAILED in line reply message associated with lineDevSpecific async request. In the TSP log i've found a line with the message

*ERROR* Invalid msg type 0x00462390 

Here the log of my application and TSP

L1 17:48.39.935 - [CSmInterface::OnNewMessage] Party List Item
	Party: 401
	Type: STATION
	SubType: TAPI_WAVE
L3 17:48.39.935 - [CTapiLine::GetLineMediaModes] [401] SupportedMedia [AUTOMATEDVOICE,INTERACTIVEVOICE]
L1 17:48.39.935 - [CTapiLine::Open]
	Name: Cisco Line: [CTi-Port-401] (401)
	lineNegotiateExtVersion 0x800b0000
L1 17:48.39.937 - [CTapiLine::Open]
	Name: Cisco Line: [CTi-Port-401] (401)
[b]	lineDevSpecific RequestId = 0x000100b0 (65712)[/b]
L3 17:48.39.937 - [CTapiEnvironment::ThreadGetMessage] Event Signaled from TAPI
L3 17:48.39.937 - [CTapiRequest::AddRequest] Request [65712] Added
L5 17:48.39.937 - [CTapiEnvironment::ThreadGetMessage] Message Queued
	Type: LINE_REPLY
	dwCallbackInstance 15
	dwParam1 0x100b0
	dwParam2 0x80000048
	dwParam3 0x0
	hDevice 0
L2 17:48.39.945 - [CTapiEnvironment::ThreadProcessMessage]
	Ext: 401
	Message: LINE_REPLY
L3 17:48.39.995 - [CTapiLine::OnCommandReply] Command NOT Executed LINEERR_OPERATIONFAILED

this is TSP Log:

17:48:39.935 |--&gt;TSPI_lineDevSpecific() 
17:48:39.935 |   TSPI_lineDevSpecific() 
[b]        dwRequestID = 0x000100B0[/b]
        hdLine = 0x05FC2370
        dwAddressID = 0x00000000
        hdCall = 0x00000000
        lpParams = 0x00B659E8
        dwSize = 4
17:48:39.935 |--&gt;SelsiusTSP::TSPI_lineDevSpecific(0x05FC2370) 
17:48:39.935 |--&gt;CSelsiusTSPLineList::IsValidTapiLineHandle() 
17:48:39.935 |   CSelsiusTSPLineList::IsValidTapiLineHandle() Found mapping for line(0x05FC2370) to lineHandle(0x00000000)
17:48:39.935 |&lt;--CSelsiusTSPLineList::IsValidTapiLineHandle() 
17:48:39.935 |   SelsiusTSP::TSPI_lineDevSpecific(0x05FC2370) LineHandle=0x05FC2370,LineDir=401
17:48:39.935 |--&gt;CSelsiusTSPLine::DevSpecific() [0x00000000] 
17:48:39.935 |   CSelsiusTSPLine::DevSpecific() [0x00000000] *ERROR* Invalid msg type 0x00462390
17:48:39.935 |&lt;--CSelsiusTSPLine::DevSpecific() [0x00000000] 
17:48:39.935 |&lt;--SelsiusTSP::TSPI_lineDevSpecific(0x05FC2370) 
17:48:39.935 |   TSPI_lineDevSpecific() TSPI_lineDevSpecific returns = 0x80000048
17:48:39.935 |&lt;--TSPI_lineDevSpecific()</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2012-07-05T17:03:08Z</dc:date>
  </entry>
  <entry>
    <title>TAPI CTi Port Monitor</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5992291" />
    <author>
      <name>Davide Cocchi</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5992291</id>
    <updated>2012-07-05T11:52:41Z</updated>
    <published>2012-07-05T11:52:41Z</published>
    <summary type="html">Hello everybody,
 
i have a question about line monitoring. I have a process that works as an IVR with TSP and Cisco Wave Driver. It opens a set of Cti Ports with Privileges = LINECALLPRIVILEGE_OWNER | LINECALLPRIVILEGE_MONITOR.
 
On the other side I have another process, executing on another server, that tries to open the same device with privileges = LINECALLPRIVILEGE_MONITOR, in order to monitor the activity on the port. This process fails to open the device with the error LINEERR_ALLOCATED, but i think there's something wrong somewhere, because the line open with monitor only privileges should never fail.
 
Anyone has hits about this problem?
 
I'm testing this feature with CM System version: 8.5.1.10000-26, TSP 8.5(1.7) 64 Bit in monitor server and TSP 8.5(1.4) 32 bits + Cisco Wave Driver in IVR server. 
 
I tried to use different Application Users for TSP and same application user, but the result is always the same.
 
It works only if the 2 processes runs under the same TSP on the same machine.</summary>
    <dc:creator>Davide Cocchi</dc:creator>
    <dc:date>2012-07-05T11:52:41Z</dc:date>
  </entry>
</feed>

