[asterisk-users] Get Channel Variables in AMI Event NewExten

Matthew Jordan mjordan at digium.com
Thu May 9 12:18:12 CDT 2013


On 05/09/2013 08:16 AM, Dan Cropp wrote:
> I believe you will have to monitor for the Newexten event, then send an
> AMI Getvar command.
> 
> It doesn’t make sense to pass all the possible channel variables along
> with a Newexten event.  There may be a ton of extra variables that
> someone may not want or need on the AMI.  Better to have them ask for
> specific variables that are not standard.
> 
>  
> 
> Action: Getvar
> 
> ActionID: ValueYouCanIdentify
> 
> Channel: IAX2/X.X.X.X:4572-5011
> 
> Variable: fu_callerid
> 
>  
> 
> This will result in a response from AMI…
> 
>  
> 
> Response: Success
> 
> ActionID: ValueYouCanIdentify
> 
> Variable: fu_callerid
> 
> Value: 141688xyxzz
> 
>  
> 
> The ActionID is very important if you want to watch for an exact response to your request. 
> 

If you know the names of the channel variables, you can also configure
manager to send them with every channel event.



More information about the asterisk-users mailing list