Hi, all
It seems that sipxConfigEnableInBandDTMF, sipxConfigEnableOutOfBandDTMF,
sipxConfigIsInBandDTMFEnabled and sipxConfigIsOutOfBandDTMFEnabled always
return SIPX_RESULT_FAILURE.
i check out sipXtapi at version 8101, compile with Visual Studio 2005.
================= here is my Win32 Console program ================
#include <stdio.h>
#include "tapi/sipXtapi.h"
#include "tapi/sipXtapiEvents.h"
bool EventCallbackProc(
SIPX_EVENT_CATEGORY category,
void *pInfo,
void *pUserData // window handle
)
{
char szText[1024];
sipxEventToString(category, pInfo, szText, 1020);
::strcat(szText, "\r\n");
::printf(szText);
return true;
}
int main()
{
SIPX_RESULT result;
SIPX_INST hInst;
printf("\nsipxInitialize\n");
result = sipxInitialize(&hInst, 5060, 5060, -1, -2);
printf("sipxUnInitialized = %d\n", result);
result = sipxEventListenerAdd(hInst, EventCallbackProc, NULL);
::Sleep(3000);
result = sipxConfigEnableInBandDTMF(hInst, false);
printf("sipxConfigEnableInBandDTMF = %d\n", result);
result = sipxConfigEnableOutOfBandDTMF(hInst, true);
printf("sipxConfigEnableOutOfBandDTMF = %d\n", result);
bool is;
result = sipxConfigIsInBandDTMFEnabled(hInst, is);
printf("sipxConfigIsInBandDTMFEnabled(%d) = %d\n", is, result);
result = sipxConfigIsOutOfBandDTMFEnabled(hInst, is);
printf("sipxConfigIsOutOfBandDTMFEnabled(%d) = %d\n", is, result);
result = sipxEventListenerRemove(hInst, EventCallbackProc, NULL);
::Sleep(1000);
printf("\nsipxUnInitialize\n");
result = sipxUnInitialize(hInst);
printf("sipxUnInitialized = %d\n", result);
::Sleep(1000);
return 0;
}
===================================================================
when i run this program, it says:
sipxInitialize
sipxUnInitialized = 0
sipxConfigEnableInBandDTMF = 1
sipxConfigEnableOutOfBandDTMF = 1
sipxConfigIsInBandDTMFEnabled(0) = 1
sipxConfigIsOutOfBandDTMFEnabled(0) = 1
sipxUnInitialize
sipxUnInitialized = 0
Is there anything wrong with my code?
Has anybody tried testConfigOutOfBand() in file sipXtapiTestConfig.cpp? What's
the result.
yuhang
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/