Jain-sip automatically sends sip messages
I wrote a softphone (simulated by SIPp) that could communicate with the PBX. To do this, I use Java’s Jain-SIP framework. My problem is that jain-sip automatically sends sip messages. For example, after receiving a RE-INVITE message, my program sends back an OK message, but jain-sip automatically sends back a TRYING message. Why???
Jain-sip also automatically sends some OK messages. See the call flow below (PBX is sending INVITE messages to my softphone application):
- Invite –>
- Confirm –>
RTP is sent on port 2000
Reinvite –>
- Confirm –>
- RTP is sent on port 2002
- jain-sip automatically sends this message !!!
- Confirm –>
- Sending RTP on port 2000 now RTP data goes to the wrong port
- Jain-SIP then sends an OK message automatically
- Confirm –>
- Sending RTP on port 2000 //rtp data go to wrong port
- Goodbye –>
Why does jain-sip send messages automatically? What am I doing wrong, or is it possible to disable automatic sending of SIP messages?
Solution
I
found that I can stop sending messages automatically by setting the parameter “javax.sip.AUTOMATIC_DIALOG_SUPPORT” to “off”. I also know why jain-sip sometimes sends TRYING messages automatically. This happens when my softphone app takes a long time to send OK messages back to the PBX. What I still don’t understand is the automatic sending of OK messages that I described in the call flow above. Maybe someone knows?