# class SDPParser | A SDP parser. More...
Full name | `TelEngine::SDPParser`
Definition | `#include <libs/ysdp/yatesdp.h>`
Inherits | TelEngine::DebugEnabler [public ], TelEngine::Mutex [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline SDPParser (const char* dbgName, const char* sessName, const char* fmts = "alaw,mulaw")
- inline void getAudioFormats (String& buf)
- inline int rfc2833 () const
- inline bool secure () const
- inline bool sdpForward () const
- inline bool ignorePort () const
- ObjList* parse (const MimeSdpBody& sdp, String& addr, ObjList* oldMedia = 0, const String& media = String::empty(), bool force = false)
- inline ObjList* parse (const MimeSdpBody* sdp, String& addr, ObjList* oldMedia = 0, const String& media = String::empty(), bool force = false)
- void initialize (const NamedList* codecs, const NamedList* hacks, const NamedList* general = 0)

#### Public Members

- static const TokenDict s_payloads[]
- static const TokenDict s_rtpmap[]

## Detailed Description

This class holds a SDP parser and additional data used by SDP objects

inline SDPParser (const char* dbgName, const char* sessName, const char* fmts = "alaw,mulaw") | ### SDPParser

Constructor

Parameters:

dbgName | Debug name of this parser
sessName | Name of the session in SDP
fmts | Default media formats

inline void getAudioFormats (String& buf) | ### getAudioFormats

Get the formats list This method is thread safe

Parameters:

buf | String to be filled with comma separated list of formats

inline int rfc2833 () | ### rfc2833

[const]

Get the RFC 2833 offer payload

Returns: Payload for RFC 2883 telephony events, negative if not offered

inline bool secure () | ### secure

[const]

Get the secure offer flag

Returns: True if SDES descriptors for SRTP will be offered

inline bool sdpForward () | ### sdpForward

[const]

Get the SDP forward flag

Returns: True if raw SDP should be added to RTP forward offer

inline bool ignorePort () | ### ignorePort

[const]

Get the RTP port change ignore flag

Returns: True if a port change should not cause an offer change

ObjList* parse (const MimeSdpBody& sdp, String& addr, ObjList* oldMedia = 0, const String& media = String::empty(), bool force = false) | ### parse

Parse a received SDP body This method is thread safe

Parameters:

sdp | Received SDP body
addr | Remote address
oldMedia | Optional list of existing media (an already existing media will be moved to returned list)
media | Optional expected media type. If not empty this will be the only media type returned (if found)
force | Force updating formats even if incompatible with old ones

Returns: List of SDPMedia objects, may be NULL

inline ObjList* parse (const MimeSdpBody* sdp, String& addr, ObjList* oldMedia = 0, const String& media = String::empty(), bool force = false) | ### parse

Parse a received SDP body, returns NULL if SDP is not present This method is thread safe

Parameters:

sdp | Pointer to received SDP body
addr | Remote address
oldMedia | Optional list of existing media (an already existing media will be moved to returned list)
media | Optional expected media type. If not empty this will be the only media type returned (if found)
force | Force updating formats even if incompatible with old ones

Returns: List of SDPMedia objects, may be NULL

void initialize (const NamedList* codecs, const NamedList* hacks, const NamedList* general = 0) | ### initialize

Update configuration. This method should be called after a configuration file is loaded

Parameters:

codecs | List of supported codecs
hacks | List of hacks
general | List of general settings

static const TokenDict s_payloads[] | ### s_payloads[]

static const TokenDict s_rtpmap[] | ### s_rtpmap[]

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.