Module: sip-router
Branch: master
Commit: 1b58b26b7ccf7b2c01185a22ad076a3655e43664
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1b58b26…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Oct 31 17:18:11 2011 +0100
utils/sercmd: set SRNAME at compile time
- it is set to sip server name (e.g., ser, kamailio)
- it is used to build the default path to ctl file used to communicate
with sip server via ctl module
- reported by Henning Westerholt
---
utils/sercmd/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/utils/sercmd/Makefile b/utils/sercmd/Makefile
index bc03b74..2cb406a 100644
--- a/utils/sercmd/Makefile
+++ b/utils/sercmd/Makefile
@@ -22,7 +22,7 @@ endif #ifneq (,$(MAKECMDGOALS))
# erase common DEFS (not needed)
C_DEFS:=
-DEFS:= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' \
+DEFS:= -DNAME='"$(NAME)"' -DSRNAME='"$(MAIN_NAME)"' -DVERSION='"$(RELEASE)"' \
$(filter -D%HAVE -DARCH% -DOS% -D__CPU% -D__OS%, $(DEFS))
# use proper libs (we can't rely on LIBS value since we might be called
Module: sip-router
Branch: master
Commit: b515ac33300f3c1d47195961409812d49fafb58f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b515ac3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Oct 31 17:16:36 2011 +0100
ctl: use SRNAME define to build default ctl file path
- this define is set by sercmd comilation (NAME is set to sercmd in this
case)
- otherwise use NAME, which is set by sip server compilation
- reported by Henning Westerholt
---
modules/ctl/ctl_defaults.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/ctl/ctl_defaults.h b/modules/ctl/ctl_defaults.h
index c50af47..5c10c17 100644
--- a/modules/ctl/ctl_defaults.h
+++ b/modules/ctl/ctl_defaults.h
@@ -4,7 +4,13 @@
#ifndef __ctl_defaults_h
#define __ctl_defaults_h
/*listen by default on: */
+#ifdef SRNAME
+/* this is used when compiling sercmd tool */
+#define DEFAULT_CTL_SOCKET "unixs:/tmp/" SRNAME "_ctl"
+#else
+/* this is used when compiling sip server */
#define DEFAULT_CTL_SOCKET "unixs:/tmp/" NAME "_ctl"
+#endif
/* port used by default for tcp/udp if no port is explicitely specified */
#define DEFAULT_CTL_PORT 2049
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#170 - get_body_part2 (parse_body)
User who did this - Luis Martin (lmartin)
----------
There could scenarios where more than one multipart part with the same TYPE/SUBTYPE are conveyed within the SIP message. How to search for the correct one? In that cases the Content-ID should be provided and is gonna be the key in your multipart search.
Let's say there is an incoming SIP INVITE with some xml information:
Session Initiation Protocol
Request-Line: INVITE
Method: INVITE
(...)
Message Header
(...)
Content-Type: multipart/mixed;boundary=unique-boundary-001
Content-Length: 900
Message Body
MIME Multipart Media Encapsulation, Type: multipart/mixed, Boundary: "unique-boundary-001"
[Type: multipart/mixed]
Preamble
First boundary: --unique-boundary-001\r\n
Encapsulated multipart part: (application/sdp)
Content-Type: application/sdp\r\n
Content-Length: 400\r\n\r\n
Session Description Protocol
(...)
Boundary: \r\n--unique-boundary-001\r\n
Encapsulated multipart part: (application/xml)
Content-ID: content1\r\n
Content-Type: application/xml\r\n
Content-Length: 300\r\n\r\n
eXtensible Markup Language
(...)
Boundary: \r\n--unique-boundary-001\r\n
Encapsulated multipart part: (application/xml)
Content-ID: content2\r\n
Content-Type: application/xml\r\n
Content-Length: 200\r\n\r\n
eXtensible Markup Language
(...)
Last boundary: \r\n--unique-boundary-001--\r\n
What if you want to get the second application/xml part of the multipart message?
get_body_part can't retrieve that
get_body_part2 can retrieve that part with:
"get_body_part2(msg, APPLICATION, XML, "content2", NULL, &len)"
and also with:
"get_body_part2(msg, 0, 0, "content2", NULL, &len)"
Hope it helps,
Luis
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=170#comment313
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#170 - get_body_part2 (parse_body)
User who did this - Iñaki Baz Castillo (ibc)
----------
Hi, I'm not an expert in multipart bodies. What is the use case of matching by Content-ID? Could you please explain it with an example?
Thanks a lot.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=170#comment312
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.