[sr-dev] git:master: rtpproxy: updated rtpproxy_manage() to handle PRACKs with sdp
Daniel-Constantin Mierla
miconda at gmail.com
Wed Sep 4 11:45:06 CEST 2013
Module: sip-router
Branch: master
Commit: 2aa5095252f9434c7c2a63ecb130bdaf1346fde9
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2aa5095252f9434c7c2a63ecb130bdaf1346fde9
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Wed Sep 4 11:44:23 2013 +0200
rtpproxy: updated rtpproxy_manage() to handle PRACKs with sdp
---
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 03ad485..ae9d291 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -2018,7 +2018,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)
@@ -2039,6 +2039,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);
@@ -2056,6 +2059,9 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
if(msg->first_line.u.reply.statuscode>=300)
return unforce_rtp_proxy(msg, flags);
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);
More information about the sr-dev
mailing list