- rtpproxy bugfix: On repetitive INVITES, the UDP media
port could end up as -1 in the rewritten packet.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
0.5.0
|
||||
=====
|
||||
1-Nov-2003: - siproxd can use another outbound proxy itself
|
||||
2-Nov-2003: - rtpproxy bugfix: On repetitive INVITES, the UDP media
|
||||
port could end up as -1 in the rewritten packet.
|
||||
1-Nov-2003: - siproxd can use another outbound proxy (chaining)
|
||||
- Linux 2.4.x: siproxd with RTP relay could hang
|
||||
on termination. Fixed.
|
||||
on termination (Thread termination). Fixed.
|
||||
|
||||
|
||||
0.4.2
|
||||
|
||||
+18
-15
@@ -600,22 +600,25 @@ if (configuration.debuglevel)
|
||||
/* start an RTP proxying stream */
|
||||
if (sdp_message_m_port_get(sdp, media_stream_no)) {
|
||||
inb_clnt_port=atoi(sdp_message_m_port_get(sdp, media_stream_no));
|
||||
rtp_start_fwd(osip_message_get_call_id(mymsg), media_stream_no,
|
||||
outb_addr, &outb_rtp_port,
|
||||
lcl_clnt_addr, inb_clnt_port);
|
||||
/* and rewrite the port */
|
||||
sdp_med=osip_list_get(sdp->m_medias, media_stream_no);
|
||||
if (sdp_med && sdp_med->m_port) {
|
||||
osip_free(sdp_med->m_port);
|
||||
sdp_med->m_port=osip_malloc(8);
|
||||
sprintf(sdp_med->m_port, "%i", outb_rtp_port);
|
||||
DEBUGC(DBCLASS_PROXY, "proxy_rewrite_invitation_body: "
|
||||
"m= rewrote port to [%i]",outb_rtp_port);
|
||||
|
||||
} else {
|
||||
ERROR("rewriting port in m= failed sdp_med=%p, "
|
||||
"m_number_of_port=%p", sdp_med, sdp_med->m_port);
|
||||
}
|
||||
if (inb_clnt_port > 0) {
|
||||
rtp_start_fwd(osip_message_get_call_id(mymsg), media_stream_no,
|
||||
outb_addr, &outb_rtp_port,
|
||||
lcl_clnt_addr, inb_clnt_port);
|
||||
/* and rewrite the port */
|
||||
sdp_med=osip_list_get(sdp->m_medias, media_stream_no);
|
||||
if (sdp_med && sdp_med->m_port) {
|
||||
osip_free(sdp_med->m_port);
|
||||
sdp_med->m_port=osip_malloc(8);
|
||||
sprintf(sdp_med->m_port, "%i", outb_rtp_port);
|
||||
DEBUGC(DBCLASS_PROXY, "proxy_rewrite_invitation_body: "
|
||||
"m= rewrote port to [%i]",outb_rtp_port);
|
||||
|
||||
} else {
|
||||
ERROR("rewriting port in m= failed sdp_med=%p, "
|
||||
"m_number_of_port=%p", sdp_med, sdp_med->m_port);
|
||||
}
|
||||
} // port > 0
|
||||
} else {
|
||||
/* no port defined - skip entry */
|
||||
WARN("no port defined in m=(media) stream_no=&i", media_stream_no);
|
||||
|
||||
+11
-3
@@ -48,7 +48,9 @@ int rtpproxy_init( void ) {
|
||||
sts = STS_SUCCESS;
|
||||
} else if (configuration.rtp_proxy_enable == 1) { // Relay
|
||||
sts = rtp_relay_init ();
|
||||
} else if (configuration.rtp_proxy_enable == 2) { // MASQ tunnels
|
||||
} else if (configuration.rtp_proxy_enable == 2) { // MASQ tunnels (ipchains)
|
||||
sts = rtp_masq_init ();
|
||||
} else if (configuration.rtp_proxy_enable == 3) { // MASQ tunnels (netfilter)
|
||||
sts = rtp_masq_init ();
|
||||
} else {
|
||||
ERROR("CONFIG: rtp_proxy_enable has invalid value",
|
||||
@@ -76,10 +78,14 @@ int rtp_start_fwd (osip_call_id_t *callid, int media_stream_no,
|
||||
sts = rtp_relay_start_fwd (callid, media_stream_no,
|
||||
outbound_ipaddr, outboundport,
|
||||
lcl_client_ipaddr, lcl_clientport);
|
||||
} else if (configuration.rtp_proxy_enable == 2) { // MASQ tunnels
|
||||
} else if (configuration.rtp_proxy_enable == 2) { // MASQ tunnels (ipchains)
|
||||
sts = rtp_masq_start_fwd (callid, media_stream_no,
|
||||
outbound_ipaddr, outboundport,
|
||||
lcl_client_ipaddr, lcl_clientport);
|
||||
} else if (configuration.rtp_proxy_enable == 3) { // MASQ tunnels (netfilter)
|
||||
sts = rtp_masq_start_fwd (callid, media_stream_no,
|
||||
outbound_ipaddr, outboundport,
|
||||
lcl_client_ipaddr, lcl_clientport);
|
||||
} else {
|
||||
ERROR("CONFIG: rtp_proxy_enable has invalid value",
|
||||
configuration.rtp_proxy_enable);
|
||||
@@ -103,7 +109,9 @@ int rtp_stop_fwd (osip_call_id_t *callid) {
|
||||
sts = STS_SUCCESS;
|
||||
} else if (configuration.rtp_proxy_enable == 1) { // Relay
|
||||
sts = rtp_relay_stop_fwd(callid, 0);
|
||||
} else if (configuration.rtp_proxy_enable == 2) { // MASQ tunnels
|
||||
} else if (configuration.rtp_proxy_enable == 2) { // MASQ tunnels (ipchains)
|
||||
sts = rtp_masq_stop_fwd(callid);
|
||||
} else if (configuration.rtp_proxy_enable == 3) { // MASQ tunnels (netfilter)
|
||||
sts = rtp_masq_stop_fwd(callid);
|
||||
} else {
|
||||
ERROR("CONFIG: rtp_proxy_enable has invalid value",
|
||||
|
||||
Reference in New Issue
Block a user