AGI Scripting tutorials/examples?
Trying to break into AGI scripting can be a real pain in the bum, I'm finding.
I've Googled like crazy but can't find a site or place that has good "beginner" (and beyond) AGI scripting examples. There's plenty of info on the available functions and methods, but nothing helpful I can find on how to get started, etc. After a ton of work (trial and error, rinse and repeat) I got a very short AGI script working but trying to extend it (Transfer the call based on agi_dnid for example) is proving to be, yet again, extremely frustrating.
Thanks for any direction!
- PB
You can also download some of Ward's scripts at nerdvittles.com. If you are a programmer, you should learn a lot by example.
When dealing with manipulating channels and doing things like transferring calls, you should be familiar with AMI (Asterisk Manager Interface). The reference will help a lot: http://www.voip-info.org/wiki-Asterisk+manager+API
Specifically talking about transferring, if you are using PHP, investigate the phpagi-asmanager application which will give you an API into the AMI. For instance, to transfer using this library, I would do something like $asm->Redirect($peer, null, $extension, "ext-local", 1); which redirects one channel to another, effectively transferring the call.



Member Since:
2006-12-19