trydis
12-05-09, 04:56 PM
Hi. I tried to modify the C# sample code to work with the Pika High Level 2.5 Grand Prix SDK, but i'm facing some problems.
When i get the PKX_EVENT_CALL_ACCEPTED event i do:
PKX_TCallAnswerSettings settings;
Grandprix.PKX_CALL_Answer_25(callHandle, ref settings)
with PKX_CALL_Answer_25 defined like:
[DllImport("pikagpapi.dll")]
public static extern PK_STATUS PKX_CALL_Answer_25(TPikaHandle callHandle, ref PKX_TCallAnswerSettings settings);
and the PKX_TCallAnswerSettings defined like:
[StructLayout(LayoutKind.Sequential)]
public struct PKX_TCallAnswerSettings
{
[StructLayout(LayoutKind.Sequential)]
public struct collectCallBlock
{
public PK_BOOL enable; /* Enables/disables this feature */
public PK_UINT beforeOnHookTime; /* Specify the time (in ms) to wait before on hook. The range allowed is 100 to 5000. The default is 500.*/
public PK_UINT collectCallTime; /* Specify the time (in ms) to stay on hook. The range allowed is 1000 to 5000. The default is 1500. */
public PK_UINT afterOffHookTime; /* Specify the time (in ms) to wait after off hook to generate the PKX_EVENT_CALL_ANSWERED event. The range allowed is 100 to 5000. The default is 200. */
______
______
I'm not receiving PKX_EVENT_CALL_ANSWERED after this. What am i doing wrong?
When i get the PKX_EVENT_CALL_ACCEPTED event i do:
PKX_TCallAnswerSettings settings;
Grandprix.PKX_CALL_Answer_25(callHandle, ref settings)
with PKX_CALL_Answer_25 defined like:
[DllImport("pikagpapi.dll")]
public static extern PK_STATUS PKX_CALL_Answer_25(TPikaHandle callHandle, ref PKX_TCallAnswerSettings settings);
and the PKX_TCallAnswerSettings defined like:
[StructLayout(LayoutKind.Sequential)]
public struct PKX_TCallAnswerSettings
{
[StructLayout(LayoutKind.Sequential)]
public struct collectCallBlock
{
public PK_BOOL enable; /* Enables/disables this feature */
public PK_UINT beforeOnHookTime; /* Specify the time (in ms) to wait before on hook. The range allowed is 100 to 5000. The default is 500.*/
public PK_UINT collectCallTime; /* Specify the time (in ms) to stay on hook. The range allowed is 1000 to 5000. The default is 1500. */
public PK_UINT afterOffHookTime; /* Specify the time (in ms) to wait after off hook to generate the PKX_EVENT_CALL_ANSWERED event. The range allowed is 100 to 5000. The default is 200. */
______
______
I'm not receiving PKX_EVENT_CALL_ANSWERED after this. What am i doing wrong?