-----
Original Message -----
Sent:
Saturday, February 10, 2007 8:50 PM
Subject:
[sipxtapi-dev] Problems in using SipPimClient (SIP SIMPLE message)
Hi All,
I want to use the SIP SIMPLE
message implementation in SipPimClient.h. I have applied the patches
submitted by Andrzej Ciarkowski. Below is what I'm trying to do:
SIPXTAPI_API
SIPX_RESULT sipxSendMessage (const SIPX_INST hInst,
const char* pszMessageText,
const char* pszYourAddress,
const char* pszAddressToSend)
{
OsSysLog::add(FAC_SIPXTAPI, PRI_INFO,
"ENTER sipxSendMessage hInst=%p pszMessageText=%s
pszYourAddress=%s pszAddressToSend=%s",
hInst, pszMessageText, pszYourAddress, pszAddressToSend);
SIPX_INSTANCE_DATA*
pInst = (SIPX_INSTANCE_DATA*) hInst ;
if (pInst
== NULL)
{
return SIPX_RESULT_FAILURE;
}
SipPimClient
sipPimClient (*(pInst->pSipUserAgent), Url (pszYourAddress));
sipPimClient.start ();
int
nResponseCode = -1;
UtlString ustrResponseCodeText;
SIPX_RESULT
rc;
if
(sipPimClient.sendPagerMessage (Url (pszAddressToSend), pszMessageText,
"Subject", nResponseCode, ustrResponseCodeText))
{
rc = SIPX_RESULT_SUCCESS;
}
else
{
rc = SIPX_RESULT_FAILURE;
}
OsSysLog::add(FAC_SIPXTAPI,
PRI_INFO,
"EXIT sipxSendMessage nResponseCode=%d
ustrResponseCodeText=%s",
nResponseCode, ustrResponseCodeText.data ());
return rc;
}
T