[sip-comm] Sip-communicator about Instant Messages...


#1

Hi all,
In the past few days, I tried to modify some source codes in order to make two sip-communicators can exchange instant messages each other.
I just used the method, sendMessage, in the "MessageProcessing.java" class to send my instant messages out. But it was failed.
I checked the debugging messages and found my packet which included the instant message lacked something, ex: epid.
And I tested sip-communicator with MSN 5.0. The packet sent by MSN 5.0 and the debugging messages as follow: (MSN sent "HI~")
    [java] 843563 [EventScannerThread] DEBUG sip.SipManager - received request=javax.sip.RequestEvent[source=gov.nist.javax.sip.SipProviderImpl@88b1e6]
     [java] 843578 [EventScannerThread] TRACE simple.MessageProcessing - [entry] processMessageRequest
     [java] 843594 [EventScannerThread] DEBUG simple.MessageProcessing - sent response SIP/2.0 200 OK
     [java] Record-Route: <sip:WINDFISH@140.115.156.57;ftag=72dc5a0f1ce34834be4e78eac5574997;lr=on>
     [java] Via: SIP/2.0/UDP 140.115.156.57;branch=z9hG4bKc85.bbbfd751.0,SIP/2.0/UDP 140.115.XXX.XXX:3975
     [java] Max-Forwards: 69
     [java] From: "FISH@140.115.156.57" <sip:FISH@140.115.156.57>;tag=72dc5a0f1ce34834be4e78eac5574997;epid=005e794248
     [java] To: <sip:WINDFISH@140.115.156.57>;tag=25926258
     [java] Call-ID: e51576bf8c434255a20278392e2d9d7a@140.115.XXX.XXX
     [java] CSeq: 3 MESSAGE
     [java] Content-Length: 0

     [java] 843594 [EventScannerThread] TRACE simple.MessageProcessing - [exit] processMessageRequest
     [java] 843594 [EventScannerThread] TRACE sip.SipManager - [entry] fireMessageReceived
     [java] 843609 [EventScannerThread] DEBUG sip.SipManager - received instant message=MESSAGE sip:140.115.XXX.XXX:5060;transport=udp SIP/2.0
     [java] Record-Route: <sip:WINDFISH@140.115.156.57;ftag=72dc5a0f1ce34834be4e78eac5574997;lr=on>
     [java] Via: SIP/2.0/UDP 140.115.156.57;branch=z9hG4bKc85.bbbfd751.0,SIP/2.0/UDP 140.115.XXX.XXX:3975
     [java] Max-Forwards: 69
     [java] From: "FISH@140.115.156.57" <sip:FISH@140.115.156.57>;tag=72dc5a0f1ce34834be4e78eac5574997;epid=005e794248
     [java] To: <sip:WINDFISH@140.115.156.57>;tag=25926258
     [java] Call-ID: e51576bf8c434255a20278392e2d9d7a@140.115.XXX.XXX
     [java] CSeq: 3 MESSAGE
     [java] Contact: <sip:140.115.XXX.XXX:3975>
     [java] User-Agent: RTC/1.2
     [java] Content-Type: text/plain;charset=UTF-8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9ACUARQA2ACUAOQA2ACUAQgAwACUARQA3ACUAQgA0ACUAQgAwACUARQA2ACUAOQA4ACUAOABFACUARQA5ACUAQQBCACUAOQA0ADsAIABFAEYAPQA7ACAAQwBPAD0AMAA7ACAAQwBTAD0AMQA7ACAAUABGAD0AMAANAAoADQAKAA
     [java] Content-Length: 3

     [java] HI~
     [java] 843641 [EventScannerThread] TRACE communicator.SipCommunicator - [entry] messageReceived
     [java] 843688 [EventScannerThread] TRACE communicator.SipCommunicator - [exit] messageReceived
     [java] 843688 [EventScannerThread] TRACE sip.SipManager - [exit] fireMessageReceived
     [java] 843688 [EventScannerThread] TRACE sip.SipManager - [exit] processRequest

The packet sent by the sip-communicator which I modified and the debugging messages as follow: (I sent "^^")
     [java] 970406 [AWT-EventQueue-0] TRACE simple.MessageProcessing - [entry]sendMessage
     [java] 970406 [AWT-EventQueue-0] TRACE common.PropertiesDepot - [entry] getProperty
     [java] 970406 [AWT-EventQueue-0] TRACE common.Utils - [entry] getSystemProperty
     [java] 970406 [AWT-EventQueue-0] TRACE common.Utils - [exit] getSystemProperty
     [java] 970406 [AWT-EventQueue-0] TRACE common.PropertiesDepot - [exit] getProperty
     [java] 970406 [AWT-EventQueue-0] TRACE sip.SipManager - [entry] getFromHeader
     [java] 970406 [AWT-EventQueue-0] TRACE sip.SipManager - [exit] getFromHeader
     [java] 970422 [AWT-EventQueue-0] TRACE sip.SipManager - [entry] getLocalViaHeaders
     [java] 970422 [AWT-EventQueue-0] TRACE sip.SipManager - [exit] getLocalViaHeaders
     [java] 970422 [AWT-EventQueue-0] TRACE sip.SipManager - [entry] getMaxForwardsHeader
     [java] 970422 [AWT-EventQueue-0] TRACE sip.SipManager - [exit] getMaxForwardsHeader
     [java] 970422 [AWT-EventQueue-0] TRACE sip.SipManager - [entry] getFromHeader
     [java] 970422 [AWT-EventQueue-0] TRACE sip.SipManager - [exit] getFromHeader
     [java] hop = 140.115.156.57:5060/UDP
     [java] 970438 [AWT-EventQueue-0] DEBUG simple.MessageProcessing - sent request: MESSAGE sip:FISH@140.115.156.57 SIP/2.0
     [java] Call-ID: b695f1d6df485cc4794578b74b0189d3@140.115.XXX.XXX
     [java] CSeq: 1 MESSAGE
     [java] From: "WINDFISH" <sip:WINDFISH@140.115.156.57:5060;transport=udp>;tag=20327011
     [java] To: <sip:FISH@140.115.156.57>
     [java] Via: SIP/2.0/UDP 140.115.XXX.XXX:5060;branch=z9hG4bK37a44cde9d62e29959d787393e69fed3
     [java] Max-Forwards: 70
     [java] Content-Type: text/plain
     [java] Event: presence
     [java] Content-Length: 2

     [java] ^^
     [java] 970453 [EventScannerThread] TRACE sip.SipManager - [entry] processResponse
     [java] 970469 [AWT-EventQueue-0] TRACE simple.MessageProcessing - [exit] sendMessage
     [java] 970469 [EventScannerThread] DEBUG sip.SipManager - received response=javax.sip.ResponseEvent[source=gov.nist.javax.sip.SipProviderImpl@88b1e6]
     [java] 970469 [EventScannerThread] TRACE sip.SipManager - [exit] processResponse

In the original program, sip-communicator can only received instant messages, but it cannot send any instant message.
How should I do to make the instant messages can be exchanged between two sip-communicators?
It looks like a complex question. Please....please... help me.

Please help me.
Thanks to all of you.

By the way, I got an e-mail who had some problems that I used to encounter. But I lost the mail.... I am so sorry about it....
If the user still cannot solve the problem and waits for my response, please send a mail to me again.