我正在尝试在媒体服务器(Kurento)和SIP客户端之间 Build 呼叫 . SIP堆栈已经在我的Java应用程序中实现,但是我遇到了一些关于被调用者收到的SDP信息的问题 .
这是我的Java应用程序通过SIP服务器发送的邀请:
INVITE sip:+351988000011@xxx.xxx.com SIP/2.0
Call-ID: 065b4a789be1a70a37706080c18b1866@172.18.2.22
CSeq: 1 INVITE
From: ;tag=e648cda1
To:
Via: SIP/2.0/TCP 172.18.2.22:5060;rport;branch=z9hG4bK-383538-eb3a39cdd1534e4a2344dd3f17b19b1c
Max-Forwards: 70
Content-Type: application/sdp
Contact:
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
(...)
但被调用者收到的邀请消息是:
INVITE sip:+351988000011@172.18.2.22:55360;rinstance=2a5c7f48406d95dd;transport=tcp SIP/2.0
Max-Forwards: 69
Content-Length: 679
To:
Contact: <10.39.40.114:5065>10.39.40.114:5065>
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: ;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
(...)
问题是SDP数据包中的IP4 IP不是媒体服务器的公共IP(媒体服务器不在内部网络中,可通过互联网访问) .
如何在到达收件人之前确保SDP数据包中的媒体服务器的IP没有更改?