【发布时间】:2016-07-05 03:03:55
【问题描述】:
我正在尝试在媒体服务器 (Kurento) 和 SIP 客户端之间建立呼叫。 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: <sip:+351988000010@xxx.xxx.com>;tag=e648cda1
To: <sip:+351988000011@xxx.xxx.com>
Via: SIP/2.0/TCP 172.18.2.22:5060;rport;branch=z9hG4bK-383538-eb3a39cdd1534e4a2344dd3f17b19b1c
Max-Forwards: 70
Content-Type: application/sdp
Contact: <sip:+351988000010@172.18.2.22: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
(...)
但是被调用方收到的邀请消息是:
INVITE sip:+351988000011@172.18.2.22:55360;rinstance=2a5c7f48406d95dd;transport=tcp SIP/2.0
Max-Forwards: 69
Content-Length: 679
To: <sip:+351988000011@172.18.2.22: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:+351988000010@xxx.xxx.com>;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 在到达接收方之前没有更改?
【问题讨论】: