mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-29 23:39:35 +00:00 
			
		
		
		
	Add two new dialplan variables when using features
Added DYNAMIC_FEATURENAME which holds the last triggered dynamic feature. Added DYNAMIC_PEERNAME which holds the unique channel name on the other side and is set when a dynamic feature is triggered. (closes issue #14663) Reported by: tamiel Patches: 20090313_features.diff uploaded by tamiel (license 712) Tested by: tamiel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		
							
								
								
									
										6
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								CHANGES
									
									
									
									
									
								
							| @@ -94,6 +94,12 @@ Dialplan Functions | |||||||
|      voice - voice mode (returns from FAX mode, reverting the changes that |      voice - voice mode (returns from FAX mode, reverting the changes that | ||||||
|              were made when FAX mode was requested) |              were made when FAX mode was requested) | ||||||
|  |  | ||||||
|  | Dialplan Variables | ||||||
|  | ------------------ | ||||||
|  |  * Added DYNAMIC_FEATURENAME which holds the last triggered dynamic feature. | ||||||
|  |  * Added DYNAMIC_PEERNAME which holds the unique channel name on the other side | ||||||
|  |    and is set when a dynamic feature is triggered. | ||||||
|  |  | ||||||
| Queue changes | Queue changes | ||||||
| ------------- | ------------- | ||||||
|   * A new option, 'I' has been added to both app_queue and app_dial. |   * A new option, 'I' has been added to both app_queue and app_dial. | ||||||
|   | |||||||
| @@ -2074,6 +2074,13 @@ static int feature_exec_app(struct ast_channel *chan, struct ast_channel *peer, | |||||||
|  |  | ||||||
| 	ast_autoservice_start(idle); | 	ast_autoservice_start(idle); | ||||||
| 	 | 	 | ||||||
|  | 	if(work && idle) { | ||||||
|  | 		pbx_builtin_setvar_helper(work, "DYNAMIC_PEERNAME", idle->name); | ||||||
|  | 		pbx_builtin_setvar_helper(idle, "DYNAMIC_PEERNAME", work->name); | ||||||
|  | 		pbx_builtin_setvar_helper(work, "DYNAMIC_FEATURENAME", feature->sname); | ||||||
|  | 		pbx_builtin_setvar_helper(idle, "DYNAMIC_FEATURENAME", feature->sname); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if (!ast_strlen_zero(feature->moh_class)) | 	if (!ast_strlen_zero(feature->moh_class)) | ||||||
| 		ast_moh_start(idle, feature->moh_class, NULL); | 		ast_moh_start(idle, feature->moh_class, NULL); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user