mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
res_pjsip_refer/session: Calls dropped during transfer
When doing an attended transfer it's possible for the transferer, after receiving an accepted response from Asterisk, to send a BYE to Asterisk, which can then be processed before Asterisk has time to start and/or complete the transfer process. This of course causes the transfer to not complete successfully, thus dropping the call. This patch makes it so any BYEs received from the transferer, after the REFER, that initiate a session end are deferred until the transfer is complete. This allows the channel that would have otherwise been hung up by Asterisk to remain available throughout the transfer process. ASTERISK-27053 #close Change-Id: I43586db79079457d92d71f1fd993be9a3b409d5a
This commit is contained in:
@@ -153,6 +153,10 @@ struct ast_sip_session {
|
||||
struct ast_sip_aor *aor;
|
||||
/*! From header saved at invite creation */
|
||||
pjsip_fromto_hdr *saved_from_hdr;
|
||||
/*! Whether the end of the session should be deferred */
|
||||
unsigned int defer_end:1;
|
||||
/*! Session end (remote hangup) requested while termination deferred */
|
||||
unsigned int ended_while_deferred:1;
|
||||
};
|
||||
|
||||
typedef int (*ast_sip_session_request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);
|
||||
@@ -481,6 +485,13 @@ int ast_sip_session_defer_termination(struct ast_sip_session *session);
|
||||
*/
|
||||
void ast_sip_session_defer_termination_cancel(struct ast_sip_session *session);
|
||||
|
||||
/*!
|
||||
* \brief End the session if it had been previously deferred
|
||||
*
|
||||
* \param session The session to end if it had been deferred
|
||||
*/
|
||||
void ast_sip_session_end_if_deferred(struct ast_sip_session *session);
|
||||
|
||||
/*!
|
||||
* \brief Register an SDP handler
|
||||
*
|
||||
|
Reference in New Issue
Block a user