[Asterisk-code-review] Send request even if the state is disconnected (asterisk[master])

Yaacov Akiba Slama asteriskteam at digium.com
Tue Sep 13 00:15:38 CDT 2016


Yaacov Akiba Slama has uploaded a new change for review.

  https://gerrit.asterisk.org/3886

Change subject: Send request even if the state is disconnected
......................................................................

Send request even if the state is disconnected

Sometimes the request _needs_ to be sent when
 inv_session->state == PJSIP_INV_STATE_DISCONNECTED
For instance, when a 407 is returned by the SIP trunk as an answer to a BYE
request. pjsip needs to send a second BYE request with the authentication
data. If it's not sent, the SIP trunk doesn't know that the conversation is
hung.

ASTERISK-26363 #close

Change-Id: I7254684dc07bc739c10597f3bec92f470eace137
---
M res/res_pjsip_session.c
1 file changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/86/3886/1

diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index a26359f..47d28bc 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -1219,13 +1219,6 @@
 void ast_sip_session_send_request_with_cb(struct ast_sip_session *session, pjsip_tx_data *tdata,
 		ast_sip_session_response_cb on_response)
 {
-	pjsip_inv_session *inv_session = session->inv_session;
-
-	if (inv_session->state == PJSIP_INV_STATE_DISCONNECTED) {
-		/* Don't try to do anything with a hung-up call */
-		return;
-	}
-
 	ast_sip_mod_data_set(tdata->pool, tdata->mod_data, session_module.id,
 			     MOD_DATA_ON_RESPONSE, on_response);
 

-- 
To view, visit https://gerrit.asterisk.org/3886
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7254684dc07bc739c10597f3bec92f470eace137
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Yaacov Akiba Slama <yaslama at gmail.com>



More information about the asterisk-code-review mailing list