< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[sipxtapi-dev] sipx{} functions always returning success


Hello,

Below is a code snipped from a client application I'm trying to develop.  I've gotten it to compile and run, but the problem is that all of the sipx functions return success, even though the sipX server isn't actually running and I'm using dummy addresses.


  SIPX_RESULT r;

  r = sipxInitialize(&g_hInst, DEFAULT_UDP_PORT, DEFAULT_TCP_PORT, DEFAULT_TLS_PORT,
                          DEFAULT_RTP_START_PORT, DEFAULT_CONNECTIONS,
                          "my_sip_user_id", "sipx_server_ip_address");
  fprintf(stdout, "sipxInitialize() returned %d\n", r);

  r = sipxEventListenerAdd(g_hInst, EventCallbackProc, NULL);
  fprintf(stdout, "sipxEventListenerAdd() returned %d\n", r);

  r = sipxLineAdd(g_hInst, "sip:my_sip_user_id@my_sip_domain", &g_hLine);
  fprintf(stdout, "sipxLineAdd() returned %d\n", r);

  r = sipxLineAddCredential(g_hLine, "my_sip_user_id", "my_sip_password", "my_sip_domain");
  fprintf(stdout, "sipxLineAddCredential() returned %d\n", r);

  r = sipxCallCreate(g_hInst, g_hLine, &g_hCall);
  fprintf(stdout, "sipxCallCreate() returned %d\n", r);

  r = sipxCallConnect(g_hCall, "sip:some_other_user@some_other_domain");
  fprintf(stdout, "sipxCallConnect() returned %d\n", r);


The callback procedure is defined as:

bool SIPX_CALLING_CONVENTION EventCallbackProc(SIPX_EVENT_CATEGORY category,
         void *pInfo, void *pUserData)
{
  return false;
}


Each function call returns 0, which is success, but there's obviously no connection made to the server, or call to the remote user, as the server isn't even running.  Any ideas as to what I'm doing wrong?

Thanks,

Joe