[asterisk-commits] oej: branch oej/darjeeling-prack-1.8 r369547 - /team/oej/darjeeling-prack-1.8...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 3 03:17:28 CDT 2012


Author: oej
Date: Tue Jul  3 03:17:24 2012
New Revision: 369547

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369547
Log:
Still trying to delay the answer

Modified:
    team/oej/darjeeling-prack-1.8/channels/chan_sip.c

Modified: team/oej/darjeeling-prack-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/channels/chan_sip.c?view=diff&rev=369547&r1=369546&r2=369547
==============================================================================
--- team/oej/darjeeling-prack-1.8/channels/chan_sip.c (original)
+++ team/oej/darjeeling-prack-1.8/channels/chan_sip.c Tue Jul  3 03:17:24 2012
@@ -6523,12 +6523,12 @@
 	struct sip_pvt *p = ast->tech_pvt;
 
 	sip_pvt_lock(p);
-	if (ast_test_flag(&p->flags[2], SIP_PAGE3_INVITE_WAIT_FOR_PRACK)) {
+	if (ast->_state != AST_STATE_UP && ast_test_flag(&p->flags[2], SIP_PAGE3_INVITE_WAIT_FOR_PRACK)) {
 		ast_set_flag(&p->flags[2], SIP_PAGE3_ANSWER_WAIT_FOR_PRACK);
 		ast_debug(2, "<-<-<--<-<-<-< HOLDING Answer while waiting for PRACK to arrive on channel %s\n", ast->name);
 		return 0;
 	}
-	if (ast->_state != AST_STATE_UP) {
+	if (ast->_state != AST_STATE_UP || ast_test_flag(&p->flags[2], SIP_PAGE3_INVITE_WAIT_FOR_PRACK) {
 		try_suggested_sip_codec(p);	
 
 		ast_setstate(ast, AST_STATE_UP);
@@ -22522,7 +22522,6 @@
 		/* we did not get proper rseq/cseq */
 		transmit_response(p, "481 Could not get proper rseq/cseq in Rack", req);
 	}
-	ast_clear_flag(&p->flags[2], SIP_PAGE3_INVITE_WAIT_FOR_PRACK);	/* Clear flag */
 	ast_debug(3, "!=!=!=!=!=!= Got PRACK with rseq %d and cseq %d \n", rseq, cseq);
 	if (rseq <= p->rseq) {
 		/* Ack the retransmits */
@@ -22539,6 +22538,7 @@
 		ast_clear_flag(&p->flags[2], SIP_PAGE3_ANSWER_WAIT_FOR_PRACK);
 		sip_answer(p->owner);
 	}
+	ast_clear_flag(&p->flags[2], SIP_PAGE3_INVITE_WAIT_FOR_PRACK);	/* Clear flag */
 	return 0;
 }
 




More information about the asterisk-commits mailing list