diff options
author | Torrey Searle <torrey@voxbone.com> | 2017-08-21 11:28:52 +0200 |
---|---|---|
committer | Torrey Searle <tsearle@gmail.com> | 2017-08-25 02:53:13 -0500 |
commit | d27a8cc204cf1b65e5db3ecc110126ec7b9531bb (patch) | |
tree | ab54b0846a3de5c0114dfab69bf651c3f4b0bf3e /include/asterisk | |
parent | 7d10d3baeac5cfe5795c5835e5adbcb9c459cb2f (diff) |
res/res_pjsip_session: allow SDP answer to be regenerated
If an SDP answer hasn't been sent yet, it's legal to change it.
This is required for PJSIP_DTMF_MODE to work correctly, and can
also have use in the future for updating codecs too.
ASTERISK-27209 #close
Change-Id: Idbbfb7cb3f72fbd96c94d10d93540f69bd51e7a1
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/res_pjsip_session.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h index ca331cbcc..d275c256e 100644 --- a/include/asterisk/res_pjsip_session.h +++ b/include/asterisk/res_pjsip_session.h @@ -626,6 +626,23 @@ int ast_sip_session_refresh(struct ast_sip_session *session, int generate_new_sdp); /*! + * \brief Regenerate SDP Answer + * + * This method is used when an SDP offer has been received but an SDP answer + * has not been sent yet. It requests that a new local SDP be created and + * set as the SDP answer. As with any outgoing request in res_pjsip_session, + * this will call into registered supplements in case they wish to add anything. + * + * \param session The session on which the answer will be updated + * \param on_sdp_creation Callback called when SDP is created + * \param generate_new_sdp Boolean to indicate if a new SDP should be created + * \retval 0 Successfully updated the SDP answer + * \retval -1 Failure to updated the SDP answer + */ +int ast_sip_session_regenerate_answer(struct ast_sip_session *session, + ast_sip_session_sdp_creation_cb on_sdp_creation); + +/*! * \brief Send a SIP response * * This will send the SIP response specified in tdata and |