logan wrote:
Hi,
 
Just want to clear that the application doesn't crash in sipxSendMessage, the function returns success, the crash happens somewhere in SipUserAgent.cpp.
 
Thanks,
Hitesh
----- Original Message -----
From: logan
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

Does it make sense to use SipPimClient at all? Given the problems that Adrzej described I think it's more reasonable to find a library for icq, aim, jabber, msn in C or C++ and use that instead of the code in sipxstacklib. How many softphones will understand your messages? If you use icq your softphone can connect to icq server and users that have plain icq client without a phone will be able to see you and chat with you.

Jaro

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to