mirror of https://github.com/sipwise/kamailio.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.7 KiB
78 lines
2.7 KiB
Index: modules/rtpproxy/rtpproxy.c
|
|
===================================================================
|
|
--- modules/rtpproxy/rtpproxy.c (revisión: 9232)
|
|
+++ modules/rtpproxy/rtpproxy.c (revisión: 9233)
|
|
@@ -283,7 +283,8 @@
|
|
static int alter_rtcp(struct sip_msg *msg, str *body, str *oldport, str *newport);
|
|
static char *gencookie();
|
|
static int rtpp_test(struct rtpp_node*, int, int);
|
|
-static int unforce_rtp_proxy_f(struct sip_msg *, char *, char *);
|
|
+static int unforce_rtp_proxy0_f(struct sip_msg *, char *, char *);
|
|
+static int unforce_rtp_proxy1_f(struct sip_msg *, char *, char *);
|
|
static int force_rtp_proxy(struct sip_msg *, char *, char *, int, int);
|
|
static int start_recording_f(struct sip_msg *, char *, char *);
|
|
static int rtpproxy_answer1_f(struct sip_msg *, char *, char *);
|
|
@@ -349,12 +350,18 @@
|
|
{"set_rtp_proxy_set", (cmd_function)set_rtp_proxy_set_f, 1,
|
|
fixup_set_id, 0,
|
|
ANY_ROUTE},
|
|
- {"unforce_rtp_proxy", (cmd_function)unforce_rtp_proxy_f, 0,
|
|
+ {"unforce_rtp_proxy", (cmd_function)unforce_rtp_proxy0_f, 0,
|
|
0, 0,
|
|
ANY_ROUTE},
|
|
- {"rtpproxy_destroy", (cmd_function)unforce_rtp_proxy_f, 0,
|
|
+ {"unforce_rtp_proxy", (cmd_function)unforce_rtp_proxy1_f, 1,
|
|
0, 0,
|
|
ANY_ROUTE},
|
|
+ {"rtpproxy_destroy", (cmd_function)unforce_rtp_proxy0_f, 0,
|
|
+ 0, 0,
|
|
+ ANY_ROUTE},
|
|
+ {"rtpproxy_destroy", (cmd_function)unforce_rtp_proxy1_f, 1,
|
|
+ 0, 0,
|
|
+ ANY_ROUTE},
|
|
{"start_recording", (cmd_function)start_recording_f, 0,
|
|
0, 0,
|
|
ANY_ROUTE },
|
|
@@ -1638,8 +1645,15 @@
|
|
}
|
|
|
|
static int
|
|
-unforce_rtp_proxy_f(struct sip_msg* msg, char* str1, char* str2)
|
|
+unforce_rtp_proxy0_f(struct sip_msg* msg, char* str1, char* str2)
|
|
{
|
|
+ char arg[1] = {'\0'};
|
|
+ return unforce_rtp_proxy1_f(msg, arg, str2);
|
|
+}
|
|
+
|
|
+static int
|
|
+unforce_rtp_proxy1_f(struct sip_msg* msg, char* str1, char* str2)
|
|
+{
|
|
str callid, from_tag, to_tag, viabranch;
|
|
char *cp;
|
|
int via = 0;
|
|
@@ -1740,7 +1754,7 @@
|
|
return -1;
|
|
|
|
if(method==METHOD_CANCEL || method==METHOD_BYE)
|
|
- return unforce_rtp_proxy_f(msg, 0, 0);
|
|
+ return unforce_rtp_proxy0_f(msg, 0, 0);
|
|
|
|
if(ip==NULL)
|
|
{
|
|
@@ -1766,13 +1780,13 @@
|
|
&& tmb.t_gett()!=T_UNDEFINED)
|
|
tmb.t_gett()->uas.request->msg_flags |= FL_SDP_BODY;
|
|
if(route_type==FAILURE_ROUTE)
|
|
- return unforce_rtp_proxy_f(msg, 0, 0);
|
|
+ return unforce_rtp_proxy0_f(msg, 0, 0);
|
|
return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 1,
|
|
(ip!=NULL)?1:0);
|
|
}
|
|
} else if(msg->first_line.type == SIP_REPLY) {
|
|
if(msg->first_line.u.reply.statuscode>=300)
|
|
- return unforce_rtp_proxy_f(msg, 0, 0);
|
|
+ return unforce_rtp_proxy0_f(msg, 0, 0);
|
|
if(nosdp==0) {
|
|
if(method==METHOD_UPDATE)
|
|
return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 0,
|