diff options
author | Torrey Searle <torrey@voxbone.com> | 2017-08-21 11:28:52 +0200 |
---|---|---|
committer | Torrey Searle <torrey@voxbone.com> | 2017-08-25 14:19:55 +0200 |
commit | c5b89a390c092586cc2e2265afe49c6ca88bd57b (patch) | |
tree | b0be571247bf9865d3cd421f673a3966c1128a21 /include/asterisk/res_pjsip_session.h | |
parent | e65b4d652573840b2a8cd4d8b35478528f0a4e01 (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/res_pjsip_session.h')
-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 5f49c8237..d5b6fa194 100644 --- a/include/asterisk/res_pjsip_session.h +++ b/include/asterisk/res_pjsip_session.h @@ -673,6 +673,23 @@ int ast_sip_session_refresh(struct ast_sip_session *session, struct ast_sip_session_media_state *media_state); /*! + * \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 |