<?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>Cisco TAPI Questions</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_category?p_l_id=&amp;mbCategoryId=1053529" />
  <subtitle />
  <id>http://developer.cisco.com/c/message_boards/find_category?p_l_id=&amp;mbCategoryId=1053529</id>
  <updated>2013-05-25T13:58:04Z</updated>
  <dc:date>2013-05-25T13:58:04Z</dc:date>
  <entry>
    <title>get LINECONNECTEDMODE const from HCall</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=15040046" />
    <author>
      <name>David Nguyen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=15040046</id>
    <updated>2013-05-07T21:54:41Z</updated>
    <published>2013-05-07T21:54:41Z</published>
    <summary type="html">Which API function can I use to get the value of the LINECONNECTEDMODE const from an HCall?

On a scenario that includes shared line :

      1. the answering line gets LINE_CALLSTATE = CONNECTED with dwParam2: LINECONNECTEDMODE_ACTIVE)
      2. the line that didn't answer gets LINE_CALLSTATE = CONNECTED with dwParam2: LINECONNECTEDMODE_INACTIVE)

How to get the "LINECONNECTEDMODE" data while processing the LINE_CALLINFO message to determine if this HCall belongs to an active particiapt or inactive participant?

Thanks in advance.

Regards,

David</summary>
    <dc:creator>David Nguyen</dc:creator>
    <dc:date>2013-05-07T21:54:41Z</dc:date>
  </entry>
  <entry>
    <title>lineBlindTransfer to CUCILync bug?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14956067" />
    <author>
      <name>Bernhard Beckmann</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14956067</id>
    <updated>2013-05-05T21:18:46Z</updated>
    <published>2013-05-05T21:16:19Z</published>
    <summary type="html">TAPI lineBlindTransfer (on a CTI Route Point) to a shared line (same number on 2 different Cisco IP phones) works. Both phones ring, both can answer the transferred call.
 
Same lineBlindTransfer to a phone and to a CUCILync (CSF) device (both same number/user) does not work: the phone rings but CUCILync does NOT!!! Not even an incoming call signalling, neither in softphone nor in hardphone mode.
 
lineRedirect works for both but cannot be used here (for CSS reasons).
 
Is this a bug?
 
Thank you. Bernie
 
CUCM = 8.0.3</summary>
    <dc:creator>Bernhard Beckmann</dc:creator>
    <dc:date>2013-05-05T21:16:19Z</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=14795110" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14795110</id>
    <updated>2013-04-30T10:32:12Z</updated>
    <published>2013-04-30T10:32:12Z</published>
    <summary type="html">Hello again.
I found where the problem was. this is the right call that I have to do.
[color=#525252][DllImport(MEDIA_DRIVER_DLL,CallingConvention = CallingConvention.Cdecl, EntryPoint = "?EpOpenById@@YAPAXKW4eStreamDirection@@P6GXPAX1KPAEK1_N0@Z@Z")][/color]
[color=#525252]        public static extern System.Int32 EpOpenById(System.Int32 device,System.Int32 streamDir,IntPtr pRTPDataCallBack);[/color]</summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-30T10:32:12Z</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=14764391" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14764391</id>
    <updated>2013-04-29T17:05:50Z</updated>
    <published>2013-04-29T17:05:50Z</published>
    <summary type="html">Hi Davide.
Like I told in my post, I did a little example in C++ and now everything is working fine. But now I want to use the ciscortplib.dll from C#, and I am having some problems.
 
I do not have any problem to do the init using this method:
[DllImport(MEDIA_DRIVER_DLL, CharSet = CharSet.Auto, SetLastError = true)]
        internal static extern bool _TspApiInitDefault(
            DLG_RTPTraceCallBack prtpLibTraceCallBack);
 
But if I try to use this other one: 
[DllImport(MEDIA_DRIVER_DLL, CharSet = CharSet.Auto, SetLastError = true)]
        internal static extern bool EpApiInitDefault(
            DLG_RTPTraceCallBack prtpLibTraceCallBack);
I have the exception that EpApiInitDefault does not exist in the dll.
 
In the same way EpOpenById does not exists, according to C#, but _EpOpenById exists, but here I have the problem that C# is telling me:
"A call to PInvoke function 'NeatTapi_Class!NeatTapi_Class.CTapi_MediaDriver::_EpOpenById' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."
I have tried these option and I have always the same result.
[DllImport(MEDIA_DRIVER_DLL, EntryPoint = "_EpOpenById", CharSet = CharSet.Auto, SetLastError = true, CallingConvention = CallingConvention.StdCall)]
        internal static extern IntPtr _EpOpenById(
            uint deviceId,
            StreamDirection streamDir ,
            DLG_RTPEndPointCallBack pRTPDataCallBack);
[DllImport(MEDIA_DRIVER_DLL, EntryPoint = "_EpOpenById", CharSet = CharSet.Auto, SetLastError = true)]
        internal static extern IntPtr _EpOpenById(
            uint deviceId,
            StreamDirection streamDir ,
            DLG_RTPEndPointCallBack pRTPDataCallBack);
 
Definitions:
 - private const string MEDIA_DRIVER_DLL= "C:\\windows\\system32\\ciscortplib.dll";
 - public enum StreamDirection
        {
            Undef = 0x00,
            ToApp = 0x01,         //In,
            ToNwk = 0x02,         //Out
            Both = 0x03          //In/Out
         }
- public delegate void DLG_RTPEndPointCallBack(IntPtr hEp, IntPtr hStream, uint dwError, IntPtr pData, uint dwBytes, IntPtr pUser, bool isSilence, StreamDirection streamDir);
 
I hope you can help me. Thanks in advance.
 </summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-29T17:05:50Z</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=14299105" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14299105</id>
    <updated>2013-04-16T09:19:37Z</updated>
    <published>2013-04-16T09:19:37Z</published>
    <summary type="html">Hello everybody.
 
We have solved the problem. This was not in the code, which is working fine. The problem was in the computer where we were doing the tests. The computer has two IPs and the initialization with the CUCM was being done for the first one and the audio was going out through the second one, so el CUCM couldn't play the wave in the cisco device.
 
When we have disabled the second IP, everything started working fine.
 </summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-16T09:19:37Z</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=14298967" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14298967</id>
    <updated>2013-04-16T09:11:06Z</updated>
    <published>2013-04-16T09:11:06Z</published>
    <summary type="html">Hi Davide.
Thank you for this sample of your code. 
At the end, we have discovered where our problem was. Our code was working fine, but we were doing the tests in the computer which had two IPs, the first belongs to the domain where the CUCM is, and second one, which does not belong to the domain. The audio was going out through the private IP. So we were doing the call and the media driver functions using the first IP but the audio went for the second one, so el CUCM could not reproduce the wave.
Thank you for your help.</summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-16T09:11:06Z</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=14295189" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14295189</id>
    <updated>2013-04-16T06:07:15Z</updated>
    <published>2013-04-16T06:07:15Z</published>
    <summary type="html">Hi Davide.
Please, do you mind telling me how you declare the EndPointCBK function? 
Thanks a lot.</summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-16T06:07:15Z</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=14259786" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14259786</id>
    <updated>2013-04-15T11:37:53Z</updated>
    <published>2013-04-15T11:37:53Z</published>
    <summary type="html">I am seeing your code and reviewing mine. 
I will tell you if we get some advance. 
Thank you.</summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-15T11:37:53Z</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=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 CUCM 8.5</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14258166" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14258166</id>
    <updated>2013-04-15T09:14:56Z</updated>
    <published>2013-04-15T09:14:56Z</published>
    <summary type="html">We are doing it, we are using the .lib and the headers, but we had problems with some functions, which did not work when we loaded only statically the ciscortplib.lib. Functions as EpApiInitDefault or EpOpenById do not work us if we use the headers and the .lib, we had linked problems.
We read in a ppt, found in internet, that we had to load dynamically ciscortplib.dll to use the methods with callback functions, and it was true, for example, the previos two methods started working without problem. But we discovered, not all methods, with callback functions, need to be loaded dynamically.
In any case, I have the same problem if I statically  use EpStreamWrite or dinamically _EpWrite .
 </summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-15T09:14:56Z</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</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14253943" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14253943</id>
    <updated>2013-04-15T08:40:41Z</updated>
    <published>2013-04-15T08:40:41Z</published>
    <summary type="html">Hi Davide.
1. From my point of view, is an error in the documentation.
2. Did you find the cisco sample application that uses media driver?</summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-15T08:40:41Z</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 Media Driver CUCM 8.5</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14253112" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14253112</id>
    <updated>2013-04-15T07:12:09Z</updated>
    <published>2013-04-15T07:12:09Z</published>
    <summary type="html">[quote=Davide Cocchi]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.[/quote]
 
Hi Davide. 
 
First of all, thank you for your answer, but, although we have followed the "Typical TAPI Application Message Flow" of Media Driver section of TAPI, from the  first moment, we do not get to listen the  wave in the cisco ip phone device.
 
Maybe, the problem is in the call to the Tapi function lineDevSpecific, we are no sure of the fourth parameter.
 
LONG WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressID, HCALL hCall, LPVOID lpParams, DWORD dwSize);
 
The LPVOID parameter, we are putting is a TCHAR pParams[10] and we have tested with the values 8,0,0,0,0,0,0,0,0,0 and the values 9,6,0,0,0,0,0,0,0,0. We found this values in Internet.
 
We do not know where we can found a table with the different values that this parameter can have. We have checked all the  Developers Guide for Cisco Unified Communications Manager Release 8.5(1). 
 
This is the function where we have the problem. Everything works fine, when we call to this method, we have a call between a ctiport and a cisco ip phone. 
 
void CTspMediaDriverMfcDlg::OnBnClickedBtSendwave()
{
 
 LONG lRet;
    varStrDevID.dwTotalSize = 1052;
 lRet = lineGetID(lphLine,0,0,LINECALLSELECT_LINE,&amp;varStrDevID,L"ciscowave/out");
 dwDeviceId = ((DWORD *) (((BYTE *) &amp;varStrDevID) + varStrDevID.dwStringOffset))[0];
 hinsDLL = LoadLibrary(L"ciscortplib.dll");//debe de estar en System32
 EpInit = NULL;
 EpInit = (init)GetProcAddress(hinsDLL,"_EpApiInit");
 if(!EpInit((PRTPLIBTRACE)EscribirTrace,21100,500,0,0))//los dos últimos parámetros van por defecto, en caso de errores revisarlos.
 {
 this-&gt;m_edit1.SetWindowTextW(L"Error al hacer _EpApiInit con los parámetros finales por defecto.");
 }
 
 Sleep(10000);
 DWORD dwSize =  0x398;//dato encontrado en un foro que decía que se pusiese esto para que funcionase fino.
 TCHAR pParams[10];
 memset(pParams,0,sizeof(TCHAR)*10);
 pParams[0]=8;
 pParams[1]=0;
 
 hResult = lineDevSpecific(lphLine,0,hCall,pParams,sizeof(TCHAR)*10);
 if(hResult&lt;0)//error
 {
 CString sTrace;
 char trace[100];
 sprintf_s(trace,100, "Error %x",lRet);
 sTrace = trace;
 this-&gt;m_edit1.SetWindowTextW(sTrace);
 }
 Sleep(10000);
 EpOpenId = (OpenById)GetProcAddress(hinsDLL,"_EpOpenById");
 hdOpen = EpOpenId(dwDeviceId,Both,0);//(PRTPENDPOINTCALLBACK)EndPointCallback0);
 hdGSH = EpGetStreamHandle(hdOpen,STREAM_TYPE_AUDIO,ToNwk);
 
 lineGenerateDigits(hCall,LINEDIGITMODE_DTMF,L"1234567890",0);
 
 Sleep(2000);
 
 bool bss2 = EpStreamStart(hdGSH);      //(PRTPENDPOINTCALLBACK)EndPointCallback1);
 
     WAVEFORMATEX wfex;
 bool bSCIG = EpStreamCodecInGet(hdGSH,&amp;wfex);
  
 int iFile=-5;
  errno_t  bSopen = _sopen_s(&amp;iFile,"C:\\Users\\asedano\\Desktop\\TspMediaDriverMfc\\Debug\\WelcomeDefaultGN.wav",_O_BINARY,_SH_DENYNO,_S_IREAD|_S_IWRITE);
 
     memset(sFile,0,iFileSize+1);
 int iReadResult = _read(iFile,sFile,iFileSize);
    
    [color=#ff0000] bool bSW = EpStreamWrite(hdGSH,sFile,iFileSize);//,(PVOID)"1");//,(PRTPENDPOINTCALLBACK)EndPointCallback2); [/color]
[color=#ff0000]            //bSW is true but we do not listen anything in the cisco ip phone. When we have tested with the callback function, the dwerror  parameter is 0(no error), but if we put this callback function, we have an error of access violation).[/color]
[color=#ff0000] [/color]
 Sleep(10000);
 bool bStrmStop = EpStreamStop(hdGSH);
 bool bClose = EpClose(hdOpen);
 FreeLibrary(hinsDLL);
}
 
Any idea???
Thanks.
 
 </summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-15T07:12:09Z</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>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=14168568" />
    <author>
      <name>Antonio Sedano</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14168568</id>
    <updated>2013-04-18T08:22:39Z</updated>
    <published>2013-04-11T17:02:14Z</published>
    <summary type="html">Hi everybody. I am newbie in TSP Media driver. We are trying to do a simple application in C++ where we do a call between a Ctiport and a Cisco Ip Phone, using TAPI library. We do the call,to answer the call and to hung up the call without problems.  All functions, in  ciscortplib.dll, return OK , but when we use EpStreamWrite function (to transmit a wave), this return true, and in the callback function does not return error, but we do not listen anything in the cisco ip phone. The waves tested have been built: 8KHz 8bit 8000 sample rate, and 8KHz 16bit 8000 sample rate. These are the steps we follow: lRet = lineInitializeEx(&amp;m_hLineApp,0, 0,NULL,&amp;dwNumDevs,&amp;dwTAPIVer,&amp;stInitParams); hinsDLL = LoadLibrary(L"ciscortplib.dll"); EpInitDefault = (initDefault)GetProcAddress(hinsDLL,"_EpApiInitDefault"); LONG lRet = lineNegotiateAPIVersion(m_hLineApp,dwDevice,TAPILOWVERSION, TAPIHIVERSION, &amp;dwTmpVer, &amp;stExtID); lRet = lineGetDevCaps(m_hLineApp, dwDevice, dwTmpVer, 0, pDevCaps); bool bInitDefault = EpInitDefault((PRTPLIBTRACE)WriteTrace); lRet = lineOpen(m_hLineApp,dwDevice,&amp;lphLine,dwTmpVer,0,NULL,dwPriv,dwMediaMode,&amp;lcpCallParams); lRet = lineMakeCall(lphLine,&amp;hCall,sNumber,0, 0); EpInit = (init)GetProcAddress(hinsDLL,"_EpApiInit"); bool binit = EpInit((PRTPLIBTRACE)WriteTrace,21100,500,0,0)); hResult = lineDevSpecific(lphLine,0,hCall,pParams,sizeof(TCHAR)*10); EpOpenId = (OpenById)GetProcAddress(hinsDLL,"_EpOpenById"); hdOpen = EpOpenId(dwDeviceId,Both,0); //(PRTPENDPOINTCALLBACK)EndPointCallback0);//both options have the same result. hdGSH = EpGetStreamHandle(hdOpen,STREAM_TYPE_AUDIO,ToNwk); errno_t  bSopen = _sopen_s(&amp;iFile,"C:\\Users\\user\\Desktop\\TspMediaDriverMfc\\Debug\\Test.wav",_O_BINARY,_SH_DENYNO,_S_IREAD|_S_IWRITE); bool bSW = EpStreamWrite(hdGSH,sFile,iFileSize);//,(PVOID)"1");//,(PRTPENDPOINTCALLBACK)EndPointCallback2);//the three options have the same result. Sleep(10000); bool bStrmStop = EpStreamStop(hdGSH); bool bClose = EpClose(hdOpen); LONG lRet = lineClose(lphLine); lRet = lineShutdown(m_hLineApp); EpApiClose();   If each function return OK why do we listen nothing? Any idea?  Thanks in advance.  </summary>
    <dc:creator>Antonio Sedano</dc:creator>
    <dc:date>2013-04-11T17:02:14Z</dc:date>
  </entry>
  <entry>
    <title>RE: Getting Original caller ID instead of CTI port caller ID</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14013052" />
    <author>
      <name>David Staudt</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14013052</id>
    <updated>2013-04-08T21:09:37Z</updated>
    <published>2013-04-08T21:09:37Z</published>
    <summary type="html">There may be a setting UCCX configuration/setting for the call flow handling, that will either preserve or reset the original caller ID.</summary>
    <dc:creator>David Staudt</dc:creator>
    <dc:date>2013-04-08T21:09:37Z</dc:date>
  </entry>
  <entry>
    <title>Getting Original caller ID instead of CTI port caller ID</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14012313" />
    <author>
      <name>Tomislav Rapic</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=14012313</id>
    <updated>2013-04-08T20:26:50Z</updated>
    <published>2013-04-08T20:26:50Z</published>
    <summary type="html">We are testing Cisco UCCX and developing CRM software. We runn into a problem when getting a call trough UCCX. In ringing state we see CTI port Caller ID. 
 
Is tehere any way to get Original caller id with tapi.
 
I know why this is happening and call flow in UCCX. But is the info available in TAPI driver?
 
Thank you for info.</summary>
    <dc:creator>Tomislav Rapic</dc:creator>
    <dc:date>2013-04-08T20:26:50Z</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=13816602" />
    <author>
      <name>Doug Routledge</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=13816602</id>
    <updated>2013-04-03T13:50:47Z</updated>
    <published>2013-04-03T13:50:47Z</published>
    <summary type="html">I have noticed the same issues.  If you switch from int to intptr that will be better for getting the code to run on 32 and 64.  For me this made the message lamp feature work in either.  That being said the monitoring functions all still fail with dword size errors when run on x64 against the 64 bit tsp or 8.x or 9.x.  When I debug the byte arrays they look like what I would expect, perhaps you can tell me if they seem wrong.
Working 32 bit Whisper Coach
[0] 0x00000013
[1] 0x00000000
[2] 0x00000000
[3] 0x00000000
[4] 0x00000007
[5] 0x00000000
[6] 0x00000000
[7] 0x00000000
[8] 0x00000002
[9] 0x00000000
[10] 0x00000000
[11] 0x00000000
[12] 0x00000003
[13] 0x00000000
[14] 0x00000000
[15] 0x00000000
 
Non Working 64 bit Whisper Coach
[0] 0x00000013
[1] 0x00000000
[2] 0x00000000
[3] 0x00000000
[4] 0x00000000
[5] 0x00000000
[6] 0x00000000
[7] 0x00000000
[8] 0x00000007
[9] 0x00000000
[10] 0x00000000
[11] 0x00000000
[12] 0x00000000
[13] 0x00000000
[14] 0x00000000
[15] 0x00000000
[16] 0x00000002
[17] 0x00000000
[18] 0x00000000
[19] 0x00000000
[20] 0x00000000
[21] 0x00000000
[22] 0x00000000
[23] 0x00000000
[24] 0x00000003
[25] 0x00000000
[26] 0x00000000
[27] 0x00000000
[28] 0x00000000
[29] 0x00000000
[30] 0x00000000
[31] 0x00000000
 
Working Lamp 32
[0] 0x00000001
[1] 0x00000000
[2] 0x00000000
[3] 0x00000000
[4] 0x00000002
[5] 0x00000000
[6] 0x00000000
[7] 0x00000000
 
Working Lamp 64
[0] 0x00000001
[1] 0x00000000
[2] 0x00000000
[3] 0x00000000
[4] 0x00000000
[5] 0x00000000
[6] 0x00000000
[7] 0x00000000
[8] 0x00000002
[9] 0x00000000
[10] 0x00000000
[11] 0x00000000
[12] 0x00000000
[13] 0x00000000
[14] 0x00000000
[15] 0x00000000</summary>
    <dc:creator>Doug Routledge</dc:creator>
    <dc:date>2013-04-03T13:50:47Z</dc:date>
  </entry>
</feed>

