Module: sip-router
Branch: 4.0
Commit: 98ba4cec3ca2caef40725c3884e7dd5693d6c3c1
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=98ba4ce…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Sep 4 11:44:23 2013 +0200
rtpproxy: updated rtpproxy_manage() to handle PRACKs with sdp
(cherry picked from commit 2aa5095252f9434c7c2a63ecb130bdaf1346fde9)
---
modules/rtpproxy/rtpproxy.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/rtpproxy/rtpproxy.c b/modules/rtpproxy/rtpproxy.c
index 783eff9..e25a3a3 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -1972,7 +1972,7 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
method = get_cseq(msg)->method_id;
if(!(method==METHOD_INVITE || method==METHOD_ACK || method==METHOD_CANCEL
- || method==METHOD_BYE || method==METHOD_UPDATE))
+ || method==METHOD_BYE || method==METHOD_UPDATE || method==METHOD_PRACK))
return -1;
if(method==METHOD_CANCEL || method==METHOD_BYE)
@@ -1993,6 +1993,9 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
if(method==METHOD_ACK && nosdp==0)
return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 0,
(ip!=NULL)?1:0);
+ if(method==METHOD_PRACK && nosdp==0)
+ return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 1,
+ (ip!=NULL)?1:0);
if(method==METHOD_UPDATE && nosdp==0)
return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 1,
(ip!=NULL)?1:0);
@@ -2010,6 +2013,9 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
if(msg->first_line.u.reply.statuscode>=300)
return unforce_rtp_proxy_f(msg, flags, 0);
if(nosdp==0) {
+ if(method==METHOD_PRACK)
+ return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 0,
+ (ip!=NULL)?1:0);
if(method==METHOD_UPDATE)
return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 0,
(ip!=NULL)?1:0);