Hi, I'm stucked in situation, and look for a work around if possible in Asterisk. I have a dialplan, [default] exten => 111222,n,Set(fu_callerid=141688xyxzz) exten => _X.,n,NoOp(Callerid ${fu_callerid}) exten => _X.,n,wait(2) exten => _X.,n,Answer() ? When, ?Answer Application is called AMI Event is triggered like this.. ? ? ? ? ? 'Event' => 'Newexten', ? ? ? ? ? 'Privilege' => 'dialplan,all', ? ? ? ? ? 'Channel' => 'IAX2/X.X.X.X:4572-5011', ? ? ? ? ? 'Context' => 'default', ? ? ? ? ? 'Extension' => '111222', ? ? ? ? ? 'Application' => 'Answer', ? ? ? ? ? 'Uniqueid' => '1367903383.682', ? ? ? ? ? 'AppData' => '', ? ? ? ? ? 'Priority' => '4' -------------- Now my question is how can I get the variable "fu_callerid" in the AMI event block.? Please suggest any work around if possible. Thank you! Muhammad Faheem -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130506/d6db25d4/attachment.htm>
Dan Cropp
2013-May-09 13:16 UTC
[asterisk-users] Get Channel Variables in AMI Event NewExten
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. Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130509/55e1bb93/attachment.htm>