mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	func_channel: Add lastcontext and lastexten.
Adds the lastcontext and lastexten channel fields to allow users to access previous dialplan execution locations. ASTERISK-29840 #close Change-Id: Ib455fe300cc8e9a127686896ee2d0bd11e900307
This commit is contained in:
		
				
					committed by
					
						 Friendly Automation
						Friendly Automation
					
				
			
			
				
	
			
			
			
						parent
						
							7f123b3143
						
					
				
				
					commit
					42525b0fe2
				
			| @@ -234,6 +234,12 @@ | ||||
| 					<enum name="context"> | ||||
| 						<para>R/O returns the context for an outbound channel.</para> | ||||
| 					</enum> | ||||
| 					<enum name="lastexten"> | ||||
| 						<para>R/O returns the last unique extension for an outbound channel.</para> | ||||
| 					</enum> | ||||
| 					<enum name="lastcontext"> | ||||
| 						<para>R/O returns the last unique context for an outbound channel.</para> | ||||
| 					</enum> | ||||
| 					<enum name="channame"> | ||||
| 						<para>R/O returns the channel name for an outbound channel.</para> | ||||
| 					</enum> | ||||
| @@ -410,6 +416,10 @@ static int func_channel_read(struct ast_channel *chan, const char *function, | ||||
| 		locked_copy_string(chan, buf, ast_channel_exten(chan), len); | ||||
| 	else if (!strcasecmp(data, "context")) | ||||
| 		locked_copy_string(chan, buf, ast_channel_context(chan), len); | ||||
| 	else if (!strcasecmp(data, "lastexten")) | ||||
| 		locked_copy_string(chan, buf, ast_channel_lastexten(chan), len); | ||||
| 	else if (!strcasecmp(data, "lastcontext")) | ||||
| 		locked_copy_string(chan, buf, ast_channel_lastcontext(chan), len); | ||||
| 	else if (!strcasecmp(data, "userfield")) | ||||
| 		locked_copy_string(chan, buf, ast_channel_userfield(chan), len); | ||||
| 	else if (!strcasecmp(data, "channame")) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user