Revision: 5988
http://openser.svn.sourceforge.net/openser/?rev=5988&view=rev
Author: miconda
Date: 2010-02-12 17:52:05 +0000 (Fri, 12 Feb 2010)
Log Message:
-----------
- use sql_result_free() in example
- exaple of this function was missing its usage
- reported by Marco B
Modified Paths:
--------------
branches/1.5/modules/sqlops/README
branches/1.5/modules/sqlops/doc/sqlops_admin.xml
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5987
http://openser.svn.sourceforge.net/openser/?rev=5987&view=rev
Author: juhe
Date: 2010-02-12 08:57:48 +0000 (Fri, 12 Feb 2010)
Log Message:
-----------
* modules/mediaproxy: backport bug fix from sr contained sr specific code.
Modified Paths:
--------------
branches/1.5/modules/mediaproxy/mediaproxy.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5986
http://openser.svn.sourceforge.net/openser/?rev=5986&view=rev
Author: miconda
Date: 2010-02-11 23:28:20 +0000 (Thu, 11 Feb 2010)
Log Message:
-----------
- safety checks to dlg match for MI cmds
- reported by Inaki Baz Castillo
Modified Paths:
--------------
branches/1.5/modules/dialog/dlg_hash.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5985
http://openser.svn.sourceforge.net/openser/?rev=5985&view=rev
Author: miconda
Date: 2010-02-11 23:19:45 +0000 (Thu, 11 Feb 2010)
Log Message:
-----------
- applied patch from Torben Friese
- memset to 0 local variable and safety check for faked reply
Modified Paths:
--------------
branches/1.5/modules/dialog/dlg_handlers.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Hi, according to a recent commit in OpenSIPS dialog module it seems that it
crashes when trying to match a dialog for a request with no From tag:
http://opensips.svn.sourceforge.net/opensips/?rev=6595&view=rev
I've checked the head version of the module in modules_k an the bug exists:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-
router;a=blob;f=modules_k/dialog/dlg_hash.h;h=bd1de8717bbfec5fd76a461f251f2bdbc9f5754b;hb=HEAD
I have to play a bit more with Git before commiting something so I'd ask if
somebody can fix it :)
--
Iñaki Baz Castillo <ibc(a)aliax.net>
Revision: 5984
http://openser.svn.sourceforge.net/openser/?rev=5984&view=rev
Author: juhe
Date: 2010-02-11 20:29:57 +0000 (Thu, 11 Feb 2010)
Log Message:
-----------
* modules/mediaproxy: Properly fix the IP in the RTCP line
(if present in the SDP). Patch provided by Saul Ibarra Corretge.
Modified Paths:
--------------
branches/1.5/modules/mediaproxy/mediaproxy.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Module: sip-router
Branch: kamailio_3.0
Commit: ef10212404b9bc5489683fc7429fee40b3495994
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ef10212…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Thu Feb 11 22:22:12 2010 +0200
modules/mediaproxy: properly fix the IP in the RTCP line
- Properly fix the IP in the RTCP line (if present in the SDP). Patch
provided by Saul Ibarra Corretge.
(cherry picked from commit 2a95f9bf915cfc3cf11374f9b8f0f547d4eb4955)
---
modules/mediaproxy/mediaproxy.c | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c
index 3f44595..bf4764e 100644
--- a/modules/mediaproxy/mediaproxy.c
+++ b/modules/mediaproxy/mediaproxy.c
@@ -128,6 +128,7 @@ typedef struct {
str type; // stream type (`audio', `video', `image', ...)
str ip;
str port;
+ str rtcp_ip; // pointer to the rtcp IP if explicitly specified by stream
str rtcp_port; // pointer to the rtcp port if explicitly specified by stream
str direction;
Bool local_ip; // true if the IP is locally defined inside this media stream
@@ -872,6 +873,34 @@ get_rtcp_port_attribute(str *block)
}
+// will return the rtcp IP of the stream in the given block
+// if defined by the stream, otherwise will return {NULL, 0}.
+static str
+get_rtcp_ip_attribute(str *block)
+{
+ str zone, tokens[4], undefined = {NULL, 0};
+ char *ptr;
+ int count;
+
+ ptr = find_line_starting_with(block, "a=rtcp:", False);
+
+ if (!ptr)
+ return undefined;
+
+ zone.s = ptr + 7;
+ zone.len = findendline(zone.s, block->s + block->len - zone.s) - zone.s;
+
+ count = get_str_tokens(&zone, tokens, 4);
+
+ if (count != 4) {
+ LM_ERR("invalid `a=rtcp' line in SDP body\n");
+ return undefined;
+ }
+
+ return tokens[3];
+}
+
+
// will return the ip address present in a `c=' line in the given block
// returns: -1 on error, 0 if not found, 1 if found
static int
@@ -1118,6 +1147,7 @@ get_session_info(str *sdp, SessionInfo *session)
session->streams[i].local_ip = 1;
}
+ session->streams[i].rtcp_ip = get_rtcp_ip_attribute(&block);
session->streams[i].rtcp_port = get_rtcp_port_attribute(&block);
session->streams[i].direction = get_direction_attribute(&block, &session->direction);
}
@@ -1536,6 +1566,13 @@ use_media_proxy(struct sip_msg *msg, char *dialog_id)
}
}
+ if (stream.rtcp_ip.len > 0) {
+ if (!replace_element(msg, &stream.rtcp_ip, &tokens[0])) {
+ LM_ERR("failed to replace RTCP IP in media stream number %d\n", i+1);
+ return -1;
+ }
+ }
+
if (stream.local_ip && !isnulladdr(stream.ip)) {
if (!replace_element(msg, &stream.ip, &tokens[0])) {
LM_ERR("failed to replace IP address in media stream number %d\n", i+1);
Module: sip-router
Branch: master
Commit: 2a95f9bf915cfc3cf11374f9b8f0f547d4eb4955
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2a95f9b…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Thu Feb 11 22:22:12 2010 +0200
modules/mediaproxy: properly fix the IP in the RTCP line
- Properly fix the IP in the RTCP line (if present in the SDP). Patch
provided by Saul Ibarra Corretge.
---
modules/mediaproxy/mediaproxy.c | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c
index 3f44595..bf4764e 100644
--- a/modules/mediaproxy/mediaproxy.c
+++ b/modules/mediaproxy/mediaproxy.c
@@ -128,6 +128,7 @@ typedef struct {
str type; // stream type (`audio', `video', `image', ...)
str ip;
str port;
+ str rtcp_ip; // pointer to the rtcp IP if explicitly specified by stream
str rtcp_port; // pointer to the rtcp port if explicitly specified by stream
str direction;
Bool local_ip; // true if the IP is locally defined inside this media stream
@@ -872,6 +873,34 @@ get_rtcp_port_attribute(str *block)
}
+// will return the rtcp IP of the stream in the given block
+// if defined by the stream, otherwise will return {NULL, 0}.
+static str
+get_rtcp_ip_attribute(str *block)
+{
+ str zone, tokens[4], undefined = {NULL, 0};
+ char *ptr;
+ int count;
+
+ ptr = find_line_starting_with(block, "a=rtcp:", False);
+
+ if (!ptr)
+ return undefined;
+
+ zone.s = ptr + 7;
+ zone.len = findendline(zone.s, block->s + block->len - zone.s) - zone.s;
+
+ count = get_str_tokens(&zone, tokens, 4);
+
+ if (count != 4) {
+ LM_ERR("invalid `a=rtcp' line in SDP body\n");
+ return undefined;
+ }
+
+ return tokens[3];
+}
+
+
// will return the ip address present in a `c=' line in the given block
// returns: -1 on error, 0 if not found, 1 if found
static int
@@ -1118,6 +1147,7 @@ get_session_info(str *sdp, SessionInfo *session)
session->streams[i].local_ip = 1;
}
+ session->streams[i].rtcp_ip = get_rtcp_ip_attribute(&block);
session->streams[i].rtcp_port = get_rtcp_port_attribute(&block);
session->streams[i].direction = get_direction_attribute(&block, &session->direction);
}
@@ -1536,6 +1566,13 @@ use_media_proxy(struct sip_msg *msg, char *dialog_id)
}
}
+ if (stream.rtcp_ip.len > 0) {
+ if (!replace_element(msg, &stream.rtcp_ip, &tokens[0])) {
+ LM_ERR("failed to replace RTCP IP in media stream number %d\n", i+1);
+ return -1;
+ }
+ }
+
if (stream.local_ip && !isnulladdr(stream.ip)) {
if (!replace_element(msg, &stream.ip, &tokens[0])) {
LM_ERR("failed to replace IP address in media stream number %d\n", i+1);
Hello
I am working on a patch that increases the verbosity of the
modules/debugger module . What I am doing is very simple, but in my
opinion effective :
I am also printing the action being run, not just the type(in the new
descr field)
Feb 9 16:46:03 marius ../../ser[32588]: ERROR: *** cfgtrace:
c=[../unit/30.cfg] l=26 a=17 descr=if (type<22>) {} else {};
Feb 9 16:46:03 marius ../../ser[32588]: ERROR: *** cfgtrace:
c=[../unit/30.cfg] l=30 a=17 descr=if (type<22>) {} else {};
Feb 9 16:46:03 marius ../../ser[32588]: ERROR: *** cfgtrace:
c=[../unit/30.cfg] l=26 a=28 descr=
external_module_call(f_ptr<0xb7d4dbf8>, 5, type<10>);
First off all the trace is not very informative because I don't have
that of a good example but you get the point.
I know it would be easy to read the cfg and get the line number, but
what if you have multiple commands per line. And printing the action
type for me is not really usefull (need to get back to header to check
the action type).
What do you think, it will be usefull as such? The patch(still some
lines to go) if fairly big but fullproof (the print_action()
print_expression() in route_struct.c will output data in a static buffer
instead of calling DBG()).
Cheers
Marius