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#comment3…
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.