Module: sip-router
Branch: master
Commit: 24ff0d9aa060d183fbe40b1fcb5910d60940585b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=24ff0d9…
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
---
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 822cd25..eee5ce0 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -1736,7 +1736,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)
@@ -1757,6 +1757,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
@@ -1771,6 +1774,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,