0
votes

I'm trying to establish a call between a media server (Kurento) and a SIP client. The SIP stack is already implemented in my Java app but I'm running into some issues regarding the SDP information that is received by the callee.

This is the invite my Java app sends via the SIP server:

INVITE sip:[email protected] SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: <sip:[email protected]>;tag=e648cda1
To: <sip:[email protected]>
Via: SIP/2.0/TCP 172.18.2.22:5060;rport;branch=z9hG4bK-383538-eb3a39cdd1534e4a2344dd3f17b19b1c
Max-Forwards: 70
Content-Type: application/sdp
Contact: <sip:[email protected]:5060;transport=tcp;rinstance=d1e3c1bedd39b70e>
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, MESSAGE
Content-Length: 679

v=0
o=- 3667284021 3667284021 IN IP4 xx.xx.xx.xx (this is the media server IP)
s=Kurento Media Server
c=IN IP4 xx.xx.xx.xx
(...)

But the invite message that is received by the callee is:

INVITE sip:[email protected]:55360;rinstance=2a5c7f48406d95dd;transport=tcp SIP/2.0
Max-Forwards: 69
Content-Length: 679
To: <sip:[email protected]:55360;rinstance=2a5c7f48406d95dd>
Contact: <sip:10.39.40.114:5065;transport=tcp;fid=server_1>
Cseq: 1 INVITE
Via: SIP/2.0/TCP 10.39.40.114:5065;branch=z9hG4bKdaacbc1f7b6f84534d8abb46bec988577b27
Content-Type: application/sdp
Call-Id: 10.39.40.114_261_5716106364191099203
From: <sip:[email protected]>;tag=ilxjbmm2-sa

v=0
o=- 3667284021 3667284021 IN IP4 10.39.40.114 (internal network ip)
s=Kurento Media Server
c=IN IP4 10.39.40.114
t=0 0
(...)

The problem is that the IP4 ip in the SDP packet is not the public IP of the media server (the media server is out of the internal network, accessible via the internet).

How can I make sure that the IP of the media server in the SDP packet is not changed before getting to the recipient?

1

1 Answers

0
votes

This can be caused by 2 reasons:

  • The external IP of your media server is not configured properly (so it is using it's internal LAN IP)
  • The media is actually not routed by the media server (you see the peer IP in the SDP)