mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	app_chanspy.c: resolving the issue with audiohook direction read
ChanSpy(${channel}, qEoS): When chanspy spy the direction read, reading frame is often failed when reading direction read audiohook. because chanspy only read audiohook direction read; write_factory_ms will greater than 100ms soon, then ast_slinfactory_flush will being called, then direction read will fail.
Resolves: #861
			
			
This commit is contained in:
		
				
					committed by
					
						![asterisk-org-access-app[bot]](/avatar/58a64b62d62d5b23df7bc832f016f9db?size=40) asterisk-org-access-app[bot]
						asterisk-org-access-app[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							e203c227bd
						
					
				
				
					commit
					f02f9f5280
				
			| @@ -249,6 +249,7 @@ static int start_spying(struct ast_autochan *autochan, const char *spychan_name, | ||||
| 	ast_debug(1, "Attaching spy channel %s to %s\n", spychan_name, ast_channel_name(autochan->chan)); | ||||
|  | ||||
| 	if (ast_test_flag(flags, OPTION_READONLY)) { | ||||
| 		ast_audiohook_set_frame_feed_direction(audiohook, AST_AUDIOHOOK_DIRECTION_READ); | ||||
| 		ast_set_flag(audiohook, AST_AUDIOHOOK_MUTE_WRITE); | ||||
| 	} else { | ||||
| 		ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC); | ||||
|   | ||||
| @@ -570,6 +570,7 @@ static int start_spying(struct ast_autochan *autochan, const char *spychan_name, | ||||
| 		spychan_name, ast_channel_name(autochan->chan)); | ||||
|  | ||||
| 	if (ast_test_flag(flags, OPTION_READONLY)) { | ||||
| 		ast_audiohook_set_frame_feed_direction(audiohook, AST_AUDIOHOOK_DIRECTION_READ); | ||||
| 		ast_set_flag(audiohook, AST_AUDIOHOOK_MUTE_WRITE); | ||||
| 	} else { | ||||
| 		ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user