Jain-sip automatically sends sip messages

I wrote a softphone that can communicate with the PBX (simulated SIPp). For this, I use 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, but jain-sip automatically sends a TRYING message. Why???

Jain-sip automatically sends OK messages. See Below Call Flow (PBX sends an INVITE message to my softphone application):

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

  • RE-INVITE →

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

Why does jain-sip send messages automatically? Am I doing something wrong, or can I disable the automatic sending of sip messages?

+4
source share
2 answers

I found out that I can stop the automatic sending of 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 application takes too long to send an OK message back to the PBX. What I still don't understand is the automatic sending of the OK messages described above in the call flow. Maybe someone knows?

+3
source

For 200 OK, I'm not sure, but it seems that the remote side does not understand the ACK transmission by JAIN SIP, and it will retransmit OK, which is created for the first INVITE.

You can verify by looking at the transaction id in the header through. Otherwise, you can check with the JAIN-SIP stack logs.

0
source

Source: https://habr.com/ru/post/1381115/


All Articles