4
votes

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?

2
You should post this solution as an answer (which you can accept later). - oers

2 Answers

3
votes

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?

0
votes

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.