4

I have written a softphone which can communicate with a PBX (simulated by SIPp). For this I use the jain-sip frameworkt for java. My problem is, that jain-sip sends sip messages automatically. For example, after receiving a RE-INVITE message my program sends an OK message back, but jain-sip sends automatically a TRYING message back. Why???

Jain-sip sends also some OK messages automatically. See call flow below (the PBX is sending the INVITE message to my softphone app):

  • INVITE -->
  • <-- TRYING
  • <-- RINGING
  • <-- OK/SDP (port number 2000)
  • ACK -->
  • Sending RTP on port 2000

  • RE-INVITE -->

  • <-- TRYING
  • <-- OK/SDP (port number 2002)
  • ACK -->
  • Sending RTP on port 2002
  • <-- OK/SDP (port number 2000) // jain-sip sends this message automatically!!!
  • ACK -->
  • Sending RTP on port 2000 // now the rtp data go to the wrong port
  • <-- OK/SDP (port number 2000) // and again jain-sip sends an ok message automatically
  • ACK -->
  • Sending RTP on port 2000 // rtp data go to the wrong port
  • BYE -->
  • <-- OK

Why does jain-sip send messages automatically? Have I done something wrong, or is it possible to disable the automatic sending of sip messages?

rekire
  • 47,260
  • 30
  • 167
  • 264
manu
  • 183
  • 1
  • 12

2 Answers2

3

I found out that I can stop the automatic sending of the messages by setting the parameter "javax.sip.AUTOMATIC_DIALOG_SUPPORT" to "off". I also know, why jain-sip sometimes sends a TRYING message automatically. This happens when my softphone app needs too long for sending the OK message back to the PBX. What I still don´t understand is the automatic sending of the OK messages I described in the call flow above. Perhaps someone knows?

manu
  • 183
  • 1
  • 12
  • For 100 trying- As per RFC if your app takes more then 200 ms to give response of INVITE then stack has to send 100 trying to stop remote party for retransmission of INVITE request. – Divyang Mithaiwala Feb 07 '12 at 07:10
0

For 200 OK I am not sure but it seems that ACK send by remote party is not understand by JAIN SIP & it will retransmit OK which is generated for first INVITE.

You can check by looking to transaction ID in via header. Otherwise you can check with logs of JAIN-SIP stack.

Divyang Mithaiwala
  • 161
  • 1
  • 1
  • 3