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?
source share