diff options
author | Joshua Colp <jcolp@digium.com> | 2015-08-28 22:22:45 -0300 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-08-28 20:49:35 -0500 |
commit | bb38010c6758b9f2824285461f3fb785bfce4389 (patch) | |
tree | c72ec51a090e8f53ded122cdba957f17fc866dae /include/asterisk/res_pjsip_session.h | |
parent | 229b95d253e7e3bf51cd431f021cff7993655dc7 (diff) |
res_pjsip_sdp_rtp: Fix multiple keepalive scheduled items.
The keepalive support in res_pjsip_sdp_rtp currently assumes
that a stream will only be negotiated once. This is false.
If the stream is replaced and later added back it can be
negotiated again causing multiple keepalive scheduled items
to exist. This change explicitly deletes the existing
keepalive scheduled item before adding the new one.
The res_pjsip_sdp_rtp module also does not stop RTP
keepalives or timeout timer if the stream has been
replaced. This change adds a callback to the session media
interface to allow a media stream to be stopped without
the resources being destroyed. This allows the scheduled
items and RTP to be stopped when the stream no longer
exists.
ASTERISK-25356 #close
Change-Id: Ibe6a7cc0927c87326fd5f1c0d4ad889dbfbea1de
Diffstat (limited to 'include/asterisk/res_pjsip_session.h')
-rw-r--r-- | include/asterisk/res_pjsip_session.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h index 734a887b3..613984713 100644 --- a/include/asterisk/res_pjsip_session.h +++ b/include/asterisk/res_pjsip_session.h @@ -357,6 +357,12 @@ struct ast_sip_session_sdp_handler { 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_media *local_stream, const struct pjmedia_sdp_session *remote, const struct pjmedia_sdp_media *remote_stream); /*! + * \brief Stop a session_media created by this handler but do not destroy resources + * \param session The session for which media is being stopped + * \param session_media The media to destroy + */ + void (*stream_stop)(struct ast_sip_session_media *session_media); + /*! * \brief Destroy a session_media created by this handler * \param session The session for which media is being destroyed * \param session_media The media to destroy |