[OpenSER-Devel] [ openser-Patches-1791840 ] basic sdp parser

SourceForge.net noreply at sourceforge.net
Tue Feb 19 19:33:29 CET 2008


Patches item #1791840, was opened at 2007-09-10 14:35
Message generated for change (Comment added) made by osas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1791840&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: basic sdp parser

Initial Comment:
Here's a proposal for sdp parsing inside the openser core.  Most of the parsing functions and helper functions were ported from the nathelper module.


The parser will parse the SDP and it will fill up the sdp_info structure (parser/sdp/sdp.h).

Each sdp may have multiple sessions (the start of a session is identified by an `v=' line - see sdp_session_cell).  Inside each session we may have multiple streams (each stream is identified by an `m=' line - see sdp_stream_cell).  Each stream may have many payloads (see sdp_payload_attr).

For each stream the following fields are parsed:
 - media type,
 - port,
 - transport type.
For each payload the following fields are parsed:
 - rtp payload,
 - rtp encoding,
 - rtp clock,
 - rtp params,
 - send and receive mode,
 - packetization.

The structure will be initialized when parse_sdp() is invoked and the structure will be available until the "receive_msg clean up" (just like the SIP headers).


Streams are accessible via:
 sdp_stream_cell_t* get_sdp_stream(struct sip_msg* _m, int session_num, int stream_num).

Payloads are accessible via:
 sdp_payload_attr_t* get_sdp_payload4payload(sdp_stream_cell_t *stream, str *rtp_payload)
 sdp_payload_attr_t* get_sdp_payload4index(sdp_stream_cell_t *stream, int index)


Files for this patch:
A      parser/sdp
A      parser/sdp/sdp_helpr_funcs.c
A      parser/sdp/sdp_helpr_funcs.h
A      parser/sdp/sdp.c
A      parser/sdp/sdp.h
M      parser/msg_parser.c
M      parser/msg_parser.h
M      Makefile.sources


TODO:
Add support for multi-part body parsing.



Regards,
Ovidiu Sas

----------------------------------------------------------------------

>Comment By: Ovidiu Sas (osas)
Date: 2008-02-19 13:33

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Patch updated.


Regards,
Ovidiu Sas
File Added: sdp_parser.patch.gz

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2008-01-08 13:20

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Patch file updated with multipart/mixed support.
File Added: sdp_parser.patch.gz

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2007-09-20 07:29

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Ovidiu,

I will take a look and come back with some feedback.

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1791840&group_id=139143



More information about the Devel mailing list