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 
  To: [email protected] 
  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;
  }

  The application crashes whenever I try the above code. The log file shows the 
following:

  SIPXTAPI:INFO:baba::00000000:sipXtapi:"ENTER sipxSendMessage hInst=003BC948 
pszMessageText=Hello world! pszYourAddress=<sip:[EMAIL PROTECTED]:5002> 
pszAddressToSend=<sip:[EMAIL PROTECTED]>"
  SIP:DEBUG:baba::00000000:sipXtapi:"SipSrvLookup::servers domain = 
'127.0.0.1', service = 'sip', socketType = UNKNOWN, port = -1"
  SIP:DEBUG:baba::00000000:sipXtapi:"SipSrvLookup::servers host = '127.0.0.1', 
IP addr = '127.0.0.1', port = 5060, weight = 0, score = 1000.000000, priority = 
0, proto = UDP"
  SIP:DEBUG:baba::00000000:sipXtapi:"SipSrvLookup::servers host = '127.0.0.1', 
IP addr = '127.0.0.1', port = 5060, weight = 0, score = 1000.000000, priority = 
0, proto = TCP"
  SIP:DEBUG:baba::00000000:sipXtapi:"SipUDPServer::createClient client: 
01D027C8 127.0.0.1 -> 127.0.0.1:5060"
  SIP:DEBUG:baba::00000000:sipXtapi:"SipUDPServerBase::send 01D027C8 
isInUseForWrite 11, client info\n  remote host: :0\n remote IP: 0.0.0.0:0\n 
remote Via address: :-1\n received address: :-1"
  OUTGOING:INFO:baba::00000000:sipXtapi:"SipUserAgent::sendUdp UDP SIP User 
Agent sent message:\n----Remote Host:127.0.0.1---- Port: 5060----\nMESSAGE 
sip:[EMAIL PROTECTED] SIP/2.0\r\nFrom: sip:[EMAIL PROTECTED]:5002\r\nTo: 
sip:[EMAIL PROTECTED]: e06da61419b99458c02f749c706fc1c4-pimc1\r\nCseq: 1 
MESSAGE\r\nSubject: Subject\r\nContent-Type: text/plain\r\nDate: Sat, 10 Feb 
2007 15:14:33 GMT\r\nContact: sip:127.0.0.1:5002\r\nMax-Forwards: 
70\r\nUser-Agent: CrossTalk (WinNT)\r\nAccept-Language: \r\nSupported: 
replaces\r\nVia: SIP/2.0/UDP 
127.0.0.1:5002;branch=z9hG4bK-3f9527814a9d\r\nContent-Length: 12\r\n\r\nHello 
world!--------------------END--------------------\n"
  SIP:DEBUG:baba::00000000:sipXtapi:"SipTransaction::doFirstSend 01D00FB0 
setting timeout 4"
  SIP:DEBUG:baba:SipClient-6:00000484:sipXtapi:"SipClient::run 01C48668 socket 
01C47A50 host:  sock addr: 0.0.0.0 via addr:  rcv addr: 127.0.0.1 sock type: 
UDP read ready READY"
  INCOMING:INFO:baba:SipClient-6:00000484:sipXtapi:"Read SIP 
message:\n----Remote Host:127.0.0.1---- Port: 5060----\nSIP/2.0 100 
Trying\r\nVia: SIP/2.0/UDP 127.0.0.1:5002;branch=z9hG4bK-3f9527814a9d\r\nFrom: 
sip:[EMAIL PROTECTED]:5002\r\nTo: sip:[EMAIL PROTECTED]: 
e06da61419b99458c02f749c706fc1c4-pimc1\r\nCSeq: 1 MESSAGE\r\nServer: Brekeke 
OnDO SIP Server (rev.172)\r\nContent-Length: 
0\r\n\r\n====================END====================\n"
  SIPXTAPI:INFO:baba::00000000:sipXtapi:"EXIT sipxSendMessage nResponseCode=100 
ustrResponseCodeText=Trying"
  INCOMING_PARSED:DEBUG:baba:SipClient-6:00000484:sipXtapi:"SIP/2.0 100 
Trying\r\nVia: SIP/2.0/UDP 127.0.0.1:5002;branch=z9hG4bK-3f9527814a9d\r\nFrom: 
sip:[EMAIL PROTECTED]:5002\r\nTo: sip:[EMAIL PROTECTED]: 
e06da61419b99458c02f749c706fc1c4-pimc1\r\nCseq: 1 MESSAGE\r\nServer: Brekeke 
OnDO SIP Server (rev.172)\r\nContent-Length: 0\r\nDate: Sat, 10 Feb 2007 
15:14:33 GMT\r\n\r\n++++++++++++++++++++END++++++++++++++++++++\n"
  
SIP:DEBUG:baba:SipUserAgent-3:000009A0:sipXtapi:"SipTransaction::handleResendEvent
 no response, TRANSACTION_COMPLETE"
  
SIP:DEBUG:baba:SipUserAgent-3:000009A0:sipXtapi:"sipTransaction::handleChildTimeoutEvent
 01CFF100"
  SIP:DEBUG:baba:SipUserAgent-3:000009A0:sipXtapi:"SipUserAgent::handleMessage 
after GC, queue size = 0"
  SIP:DEBUG:baba:SipClient-6:00000484:sipXtapi:"SipClient::run 01C48668 socket 
01C47A50 host:  sock addr: 0.0.0.0 via addr:  rcv addr: 127.0.0.1 sock type: 
UDP read ready READY"
  INCOMING:INFO:baba:SipClient-6:00000484:sipXtapi:"Read SIP 
message:\n----Remote Host:127.0.0.1---- Port: 5060----\nMESSAGE sip:[EMAIL 
PROTECTED]:5002 SIP/2.0\r\nFrom: sip:[EMAIL PROTECTED]: sip:[EMAIL 
PROTECTED]:5002\r\nCall-Id: e06da61419b99458c02f749c706fc1c4-pimc1\r\nCseq: 1 
MESSAGE\r\nSubject: Subject\r\nDate: Sat, 10 Feb 2007 15:14:33 GMT\r\nContact: 
sip:127.0.0.1:5002\r\nMax-Forwards: 69\r\nUser-Agent: CrossTalk 
(WinNT)\r\nSupported: replaces\r\nVia: SIP/2.0/UDP 
127.0.0.1:5060;rport;branch=z9hG4bK06c2788616c6ebac.3\r\nVia: SIP/2.0/UDP 
127.0.0.1:5002;branch=z9hG4bK-3f9527814a9d\r\nRecord-Route: 
<sip:127.0.0.1:5060;lr>\r\nContent-Type: text/plain\r\nContent-Length: 
12\r\n\r\nHello world!====================END====================\n"
  INCOMING_PARSED:DEBUG:baba:SipClient-6:00000484:sipXtapi:"MESSAGE sip:[EMAIL 
PROTECTED]:5002 SIP/2.0\r\nFrom: sip:[EMAIL PROTECTED]: sip:[EMAIL 
PROTECTED]:5002\r\nCall-Id: e06da61419b99458c02f749c706fc1c4-pimc1\r\nCseq: 1 
MESSAGE\r\nSubject: Subject\r\nDate: Sat, 10 Feb 2007 15:14:33 GMT\r\nContact: 
sip:127.0.0.1:5002\r\nMax-Forwards: 69\r\nUser-Agent: CrossTalk 
(WinNT)\r\nSupported: replaces\r\nVia: SIP/2.0/UDP 
127.0.0.1:5060;rport=5060;branch=z9hG4bK06c2788616c6ebac.3\r\nVia: SIP/2.0/UDP 
127.0.0.1:5002;branch=z9hG4bK-3f9527814a9d\r\nRecord-Route: 
<sip:127.0.0.1:5060;lr>\r\nContent-Type: text/plain\r\nContent-Length: 
12\r\n\r\nHello world!++++++++++++++++++++END++++++++++++++++++++\n"
  
SIP:DEBUG:baba:SipUserAgent-3:000009A0:sipXtapi:"SipTransaction::handleExpiresEvent
 01D00FB0"
  
SIP:DEBUG:baba:SipUserAgent-3:000009A0:sipXtapi:"SipTransaction::handleExpiresEvent
 01D00FB0 ignoring cancel of DNS SRV child"
  
SIP:DEBUG:baba:SipUserAgent-3:000009A0:sipXtapi:"sipTransaction::handleChildTimeoutEvent
 01CFF100"
  SIP:DEBUG:baba:SipUserAgent-3:000009A0:sipXtapi:"SipUserAgent::handleMessage 
after GC, queue size = 0"

  Any pointers on how to implement this will be highly appreciated.

  Thanks,
  Hitesh


------------------------------------------------------------------------------


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

Reply via email to