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

SourceForge.net noreply at sourceforge.net
Mon Sep 10 20:35:19 CEST 2007


Patches item #1791840, was opened at 2007-09-10 14:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Nobody/Anonymous (nobody)
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

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

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