mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Fix double alerting, add forced alerting before answer
Fix double alerting (it wasn't fixed here by issue #18542) Add forced alerting before connect (if it wasn't before) Try to send all packets from outgoing queue rather than one only Call goes into clearing state when disconnect command is received (closes issue #19361) Reported by: vmikhelson Patches: issue19361-3.patch uploaded by may213 (license 454) Tested by: vmikhelson git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -1079,6 +1079,7 @@ static int ooh323_hangup(struct ast_channel *ast) | ||||
| static int ooh323_answer(struct ast_channel *ast) | ||||
| { | ||||
| 	struct ooh323_pvt *p = ast->tech_pvt; | ||||
| 	char *callToken = (char *)NULL; | ||||
|  | ||||
| 	if (gH323Debug) | ||||
| 		ast_verbose("--- ooh323_answer\n"); | ||||
| @@ -1086,8 +1087,18 @@ static int ooh323_answer(struct ast_channel *ast) | ||||
| 	if (p) { | ||||
|  | ||||
| 		ast_mutex_lock(&p->lock); | ||||
| 		callToken = (p->callToken ? strdup(p->callToken) : NULL); | ||||
| 		if (ast->_state != AST_STATE_UP) { | ||||
| 			ast_channel_lock(ast); | ||||
| 			if (!p->alertsent) { | ||||
| 	    			if (gH323Debug) { | ||||
| 					ast_debug(1, "Sending forced ringback for %s, res = %d\n",  | ||||
| 						callToken, ooManualRingback(callToken)); | ||||
| 				} else { | ||||
| 	    				ooManualRingback(callToken); | ||||
| 				} | ||||
| 				p->alertsent = 1; | ||||
| 			} | ||||
| 			ast_setstate(ast, AST_STATE_UP); | ||||
|       			if (option_debug) | ||||
| 				ast_debug(1, "ooh323_answer(%s)\n", ast->name); | ||||
| @@ -1252,6 +1263,7 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d | ||||
| 			} else { | ||||
| 	    				ooManualRingback(callToken); | ||||
| 			} | ||||
| 			p->alertsent = 1; | ||||
| 		} | ||||
| 	    } | ||||
| 	 break; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user