tags:

views:

224

answers:

2

Hello, I create a sip session with mjsip to an external voip provider. Then I transmit a test wav file over rtp to the provider using RtpManager.

The program runs with no errors and I answer the sip call. However, no audio is transmitted. When I diagnose the network traffic with wireshark, I see a bunch of RTP traffic from my localhost (behind some kind of nat) to the voip provider and nothing back.

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

The software linphone works using the same localhost and voip provider - though it is using a different sip stack.

Any suggestions?

Thanks

+1  A: 

D'oh!

The issue was found to be that I did not send an ACK to a SIP 200 message when my call was accepted in my call 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);
}

Hopefully this helps anyone with a similar problem

brian_d
+1  A: 

You've already answered your own question, but yes, you're right: The Callee/UAS will, after some period of time, regard the connection as having failed to be established if it hasn't received an ACK.

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

If, however, the UAS either has a transport error when sending the 200 OK or fails to timeously receive an ACK (Timer H fires (64*T1 = 64*500m = 32 seconds by default), the UAS will move to the Terminated state.

Frank Shearar