Module: sip-router
Branch: 3.2
Commit: 850afebb30470a075423d0e721b678d82261d1be
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=850afeb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu May 17 08:19:10 2012 +0200
rtpproxy: handle UPDATE in rtpproxy_manage()
- UPDATE can carry SDB body
- reported by Spencer Thomason
(cherry picked from commit 24ff0d9aa060d183fbe40b1fcb5910d60940585b)
---
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 b6aa316..ba66e54 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -1706,7 +1706,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_BYE || method==METHOD_UPDATE))
return -1;
if(method==METHOD_CANCEL || method==METHOD_BYE)
@@ -1727,6 +1727,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_UPDATE && nosdp==0)
+ return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 1,
+ (ip!=NULL)?1:0);
if(method==METHOD_INVITE && nosdp==0) {
msg->msg_flags |= FL_SDP_BODY;
if(tmb.t_gett!=NULL && tmb.t_gett()!=NULL
@@ -1741,6 +1744,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, 0, 0);
if(nosdp==0) {
+ if(method==METHOD_UPDATE)
+ return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 0,
+ (ip!=NULL)?1:0);
if(tmb.t_gett==NULL || tmb.t_gett()==NULL
|| tmb.t_gett()==T_UNDEFINED)
return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 0,