Local RTP port not available when using mjsip / jmf

I am creating a sip session with mjsip for an external voip provider. Then I pipe the test wav file over the rtp provider using the RtpManager.

The program runs without error and I am answering the sip call. However, no sound is transmitted. When I diagnose network traffic with wireshark I see a bunch of RTP traffic from my localhost (behind some nat) to the voip provider and nothing came back.

After a while, I get the "Destination unreachable (Port unreachable)" ICMP error from the ISP to my localhost.

The software linphone runs using the same localhost and voip provider - although it uses a different sip stack.

Any suggestions?

thanks

+2


a source to share


2 answers


You have already answered your own question, but yes, you are correct: Callee / UAS after a while consider the connection as unable to establish unless it received an ACK.

The SIP RFC tells us that the INVITE server's INVITE transaction will enter Completed state when it sends a 200 OK. Receiving an ACK sends it to an acknowledged state.



If, however, the UAS either has a transport error sending 200 OK or cannot temporarily receive an ACK (timer H fire (64 * T1 = 64 * 500m = 32 seconds by default), the UAS will move to Completed state.

+3


a source


D'o!

It was found that I was not sending an ACK on a SIP 200 message when my call was received in my listener class. So the voip client ignored the corresponding rtp requests.



public void onCallAccepted(Call call, String sdp, Message resp){
    System.out.println("call accepted");
    call.ackWithAnswer(sdp); //this was the missing line I needed
    this.setupRtpSession(call);
}

      

Hope this helps anyone with a similar problem.

+2


a source







All Articles