cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
268
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Dimeny Beata on 22-10-2013 01:18:12 AM
I keep getting an error while trying to connect a stream (although only 10% of the times).
First I get through cisco's callback function the following warning:
EP_ERR_PARAM_INVALID: EpOpenAndSetId remote address not set for id: 3
and then EpOpenById returns error code 17003, which means invalid parameter.
Do you know how I can solve this problem?


Subject: RE: EpOpenAndSetId error
Replied by: Dimeny Beata on 22-10-2013 02:22:38 AM
EpOpenById is called after receiving the Connected CallState.
I will check the other event.

Thank you!

Subject: RE: EpOpenAndSetId error
Replied by: Tohru Ohzono on 22-10-2013 02:10:16 AM
Hi Dimeny,

When do you call EpOpenById() function?
If you call EpOpenById(ToNwk, ToApp or Both) on LINECALLSTATE_CONNECTED event, it will cause some problems.

EpOpenById() with ToNwk should be called on SLDSMT_START_TRANSMISION event.
EpOpenById() with ToApp should be called on SLDSMT_START_RECEPTION event.

To receive SLDSMT_START/STOP_TRANSMISION/RECEPTION events,
you should lineNegociateExtVersion() with ExtVersion 0x00010000 or above and lineOpen() with negociated ext version, and then call lineDevSpecific() function after lineOpen():
CCiscoLineDevSpecificStatusMsgs statusMsgs;
statusMsgs.m_DevSpecificStatusMsgsFlag = DEVSPECIFC_MEDIA_STREAM;
lineDevSpecific(hLine, 0, 0, statusMsgs.lpParams(), statusMsgs.dwSize());

Then, you will be able to receive SLDSMT_START/STOP_TRANSMISION/RECEPTION events as dwParam1 of LINE_DEVSPACIFIC event.
The dwParam1 of LINE_DEVSPACIFIC event will 'contain' the message type(SLDSMT_START/STOP_TRANSMISION/RECEPTION).
You need to calculate message type from dwParam1. The calculation depends on ext version.
The following calculation will work on any ext versions:
DWORD dwMsgType = (dwParam1 & 0xff);

Regards,
Tohru

Subject: RE: EpOpenAndSetId error
Replied by: Dimeny Beata on 22-10-2013 07:04:50 AM
I did as you suggested, but I only get the following messages:
param1 = 10, param2 = 128, param3 = 0
param1 = 8, param2 = 1064, param3 = 0
param1 = 8, param2 = 8, param3 = 0
param1 = 8, param2 = 2, param3 = 0
param1 = 8, param2 = 8, param3 = 0
it seems that I don't get the Transmission or Reception messages.
What are these messages anyway?


Subject: RE: EpOpenAndSetId error
Replied by: Tohru Ohzono on 23-10-2013 01:13:19 AM
Hi Dimeny,

It may that linedevSpecific() fails.
Can you check the returned value of lineDevSpecific() and LINE_REPLY events?

If lineDevSpecific() succeeded, the function returns positive integer and LINE_REPLY event will be notified with dwParam1 == (returned val) and dwParam2 == 0 later.
If dwParam2 != 0 on LINE_REPLY, this value indicates error code.

I suppose most possible reason why lineDevSpecific() fails is architecture issue(x86 or x64).

If you get dwParam2 == 0x80000048, please check cisco tsp logs(you should configure log level as detail).
You may find "*ERROR* dwSize missmatch 0x00000014"(the last hex string may differ).

If it is true.
You may run tsp application on x64 version of windows, but application is built for x86 architecture target.

If you would like to run your tsp application on Windows x64, application should be built for x64 architecture as target platform.



BTW, regarding dwParam1(msg type) and dwParam2 which you received,
you can find these in CiscoLineDevSpecificMsg.h and [Cisco Device-Specific Extensions] >  section in cisco tapi developers guide.
Most values should be defined as enum value of defined constants in CiscoLineDevSpecificMsg.h.
For example, message types are defined in CiscoLineDevSpecificMsgType enum.

* dwParam1 == 0x0A(10) means (SLDSMT_LINE_PROPERTY_CHANGED):
  dwParam2 == 0x80(128) (LPCT_DEVICE_IPADDRESS).

* dwParam1 == 0x08(8) means (SLDST_LINECALLINFO_DEVSPECIFICDATA):
  dwParam2 == 0x0428(1064) means (SLDST_UNIQUE_CALL_REF_ID_INFO | SLDST_CCM_CALL_ID | SLDST_EXTENDED_CALL_INFO).
  dwParam2 == 0x08(8) means (SLDST_EXTENDED_CALL_INFO).
  dwParam2 == 0x02(2) means (SLDST_QOS_INFO).


Regards,
Tohru

Subject: RE: EpOpenAndSetId error
Replied by: Dimeny Beata on 23-10-2013 01:57:25 AM
We are running x64 windows, however the build platform for the application is also set to x64. This shouldn't be the problem. 
The returned value is positive and dwParam2 is 0. However in the logs I do get the following message:
*ERROR* dwSize missmatch 0x00000008, which is weird because i do send two integers (each 4 bytes long). The first integer contains 4 (which is the message id for
status change message, SLDST_SET_STATUS_MESSAGES), the second is 0x00000001 (which is  DEVSPECIFIC_MEDIA_STREAM).



Subject: RE: EpOpenAndSetId error
Replied by: Tohru Ohzono on 23-10-2013 03:08:55 AM
Maybe it is caused by compiler difference...

In my environment, dwSize() function of CCiscoLineDevSpecificSetStatusMsgs returns 16.
And application works as expected.

Yes, I think dwSize() of 8 bytes is reasonable value, because DWORD has 4 bytes area in x64 of Win for now.
However, my compiler returns 24 bytes for sizeof(CCiscoLineDevSpecificSetStatusMsgs).
The pointer to the virtual function table has 8 bytes, so (24 - 8 = 16) is set as dwSize() of CCiscoLineDevSpecificSetStatusMsgs.
The compiler which built CiscoTSP may has similar behavior.


What compiler do you use?
I use the compiler in SDKs of Visual Studio 2012 Update 3.

Could you please dump the following size values in your environment?

CCiscoLineDevSpecificSetStatusMsgs statusMsgs;
sizeof(statusMsgs);
statusMsgs.dwSize();
sizeof(DWORD);
sizeof(void*);
.

In my environment,
sizeof(statusMsgs) == 24;
statusMsgs.dwSize() == 16;
sizeof(DWORD) == 4;
sizeof(void*) == 8;


In addition,
Could you try to set dwSize explicitly to the lineDevSpecific() once?
I mean:
lineDevSpecific(hLine, 0, 0, statusMsgs.lpParams(), 16);


Thanks,
Tohru

Subject: RE: EpOpenAndSetId error
Replied by: Tohru Ohzono on 23-10-2013 04:14:49 AM
Additional info.

I have disassembled my 64bit application and analyzed layout of related structures.
I suppose the reason why sizeof(CCiscoLineDevSpecificSetStatusMsgs) == 24 is caused by padding.
My compiler seems to put 4 bytes padding to both CCiscoLineDevSpecificSetStatusMsgs and its parent class CCiscoLineDevSpecific.
So, 8 bytes(4 + 4) padding seems to be added to CCiscoLineDevSpecificSetStatusMsgs in total.

It results sizeof(CCiscoLineDevSpecificSetStatusMsgs) == 24.

sizeof(DWORD) + sizeof(DWORD) + sizeof(pointer to virtual function table) + (padding of 4 bytes for CCiscoLineDevSpecificSetStatusMsgs) + (padding of 4 bytes for CCiscoLineDevSpecific) =
4 + 4 + 8 + 4 + 4 =
24.

Thanks,
Tohru

Subject: RE: EpOpenAndSetId error
Replied by: Dimeny Beata on 24-10-2013 01:29:47 AM
Thank you for your help!!!
The padding was the problem, we solved it!

Thanks,
Beata
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links