Asterisk - The Open Source Telephony Project
18.5.0
|
A handler for SDPs in SIP sessions. More...
#include <res_pjsip_session.h>
Data Fields | |
int(* | apply_negotiated_sdp_stream )(struct ast_sip_session *session, struct ast_sip_session_media *session_media, const struct pjmedia_sdp_session *local, const struct pjmedia_sdp_session *remote, int index, struct ast_stream *asterisk_stream) |
Apply a negotiated SDP media stream. More... | |
void(* | change_outgoing_sdp_stream_media_address )(struct pjsip_tx_data *tdata, struct pjmedia_sdp_media *stream, struct ast_sip_transport *transport) |
Update media stream with external address if applicable. More... | |
int(* | create_outgoing_sdp_stream )(struct ast_sip_session *session, struct ast_sip_session_media *session_media, struct pjmedia_sdp_session *sdp, const struct pjmedia_sdp_session *remote, struct ast_stream *stream) |
Create an SDP media stream and add it to the outgoing SDP offer or answer. More... | |
enum ast_sip_session_sdp_stream_defer(* | defer_incoming_sdp_stream )(struct ast_sip_session *session, struct ast_sip_session_media *session_media, const struct pjmedia_sdp_session *sdp, const struct pjmedia_sdp_media *stream) |
Determine whether a stream requires that the re-invite be deferred. If a stream can not be immediately negotiated the re-invite can be deferred and resumed at a later time. It is up to the handler which caused deferral to occur to resume it. More... | |
const char * | id |
int(* | negotiate_incoming_sdp_stream )(struct ast_sip_session *session, struct ast_sip_session_media *session_media, const struct pjmedia_sdp_session *sdp, int index, struct ast_stream *asterisk_stream) |
Set session details based on a stream in an incoming SDP offer or answer. More... | |
struct { | |
struct ast_sip_session_sdp_handler * next | |
} | next |
void(* | stream_destroy )(struct ast_sip_session_media *session_media) |
Destroy a session_media created by this handler. More... | |
void(* | stream_stop )(struct ast_sip_session_media *session_media) |
Stop a session_media created by this handler but do not destroy resources. More... | |
A handler for SDPs in SIP sessions.
An SDP handler is registered by a module that is interested in being the responsible party for specific types of SDP streams.
Definition at line 380 of file res_pjsip_session.h.
int(* apply_negotiated_sdp_stream) (struct ast_sip_session *session, struct ast_sip_session_media *session_media, const struct pjmedia_sdp_session *local, const struct pjmedia_sdp_session *remote, int index, struct ast_stream *asterisk_stream) |
Apply a negotiated SDP media stream.
session | The session for which media is being applied |
session_media | The media session |
local | The entire local negotiated SDP |
remote | The entire remote negotiated SDP |
index | The index of the session media, SDP streams, and Asterisk streams |
asterisk_stream | The Asterisk stream representation |
0 | The stream was not applied by this handler. If there are other registered handlers for this stream type, they will be called. |
<0 | There was an error encountered. No further operation will take place and the current application will be abandoned. |
>0 | The stream was handled by this handler. No further handler of this stream type will be called. |
Definition at line 444 of file res_pjsip_session.h.
Referenced by handle_negotiated_sdp_session_media().
void(* change_outgoing_sdp_stream_media_address) (struct pjsip_tx_data *tdata, struct pjmedia_sdp_media *stream, struct ast_sip_transport *transport) |
Update media stream with external address if applicable.
tdata | The outgoing message itself |
stream | The stream on which to operate |
transport | The transport the SDP is going out on |
Definition at line 431 of file res_pjsip_session.h.
Referenced by session_outgoing_nat_hook().
int(* create_outgoing_sdp_stream) (struct ast_sip_session *session, struct ast_sip_session_media *session_media, struct pjmedia_sdp_session *sdp, const struct pjmedia_sdp_session *remote, struct ast_stream *stream) |
Create an SDP media stream and add it to the outgoing SDP offer or answer.
session | The session for which media is being added |
session_media | The media to be setup for this session |
sdp | The entire SDP as currently built |
remote | Optional remote SDP if this is an answer |
stream | The stream that is to be added to the outgoing SDP |
0 | This handler has no stream to add. If there are other registered handlers for this stream type, they will be called. |
<0 | There was an error encountered. No further operation will take place and the current SDP negotiation will be abandoned. |
>0 | The handler has a stream to be added to the SDP. No further handler of this stream type will be called. |
Definition at line 423 of file res_pjsip_session.h.
Referenced by add_sdp_streams().
enum ast_sip_session_sdp_stream_defer(* defer_incoming_sdp_stream) (struct ast_sip_session *session, struct ast_sip_session_media *session_media, const struct pjmedia_sdp_session *sdp, const struct pjmedia_sdp_media *stream) |
Determine whether a stream requires that the re-invite be deferred. If a stream can not be immediately negotiated the re-invite can be deferred and resumed at a later time. It is up to the handler which caused deferral to occur to resume it.
session | The session for which the media is being re-invited |
session_media | The media being reinvited |
sdp | The entire SDP. Useful for getting "global" information, such as connections or attributes |
stream | PJSIP incoming SDP media lines to parse by handler. |
Definition at line 398 of file res_pjsip_session.h.
Referenced by sdp_requires_deferral().
const char* id |
An identifier for this handler
Definition at line 382 of file res_pjsip_session.h.
Referenced by ast_sip_session_register_sdp_handler(), handle_incoming_sdp(), handle_negotiated_sdp_session_media(), Model::load(), and remove_handler().
int(* negotiate_incoming_sdp_stream) (struct ast_sip_session *session, struct ast_sip_session_media *session_media, const struct pjmedia_sdp_session *sdp, int index, struct ast_stream *asterisk_stream) |
Set session details based on a stream in an incoming SDP offer or answer.
session | The session for which the media is being negotiated |
session_media | The media session |
sdp | The entire SDP. Useful for getting "global" information, such as connections or attributes |
index | The index for the session media, Asterisk stream, and PJMEDIA stream being negotiated |
asterisk_stream | The Asterisk stream representation |
0 | The stream was not handled by this handler. If there are other registered handlers for this stream type, they will be called. |
<0 | There was an error encountered. No further operation will take place and the current negotiation will be abandoned. |
>0 | The stream was handled by this handler. No further handler of this stream type will be called. |
Definition at line 410 of file res_pjsip_session.h.
Referenced by handle_incoming_sdp().
struct ast_sip_session_sdp_handler* next |
Definition at line 460 of file res_pjsip_session.h.
Referenced by add_sdp_streams(), ast_sip_session_register_sdp_handler(), handle_negotiated_sdp_session_media(), remove_handler(), session_outgoing_nat_hook(), and stream_destroy().
struct { ... } next |
Next item in the list.
void(* stream_destroy) (struct ast_sip_session_media *session_media) |
Destroy a session_media created by this handler.
session | The session for which media is being destroyed |
session_media | The media to destroy |
Definition at line 458 of file res_pjsip_session.h.
Referenced by session_media_set_handler(), and stream_destroy().
void(* stream_stop) (struct ast_sip_session_media *session_media) |
Stop a session_media created by this handler but do not destroy resources.
session | The session for which media is being stopped |
session_media | The media to destroy |
Definition at line 452 of file res_pjsip_session.h.
Referenced by handle_negotiated_sdp_session_media(), and t38_reinvite_response_cb().