xplast: Asterisk xPL support
The Asterisk xPL support has been around since the Asterisk At Home days. I modified it to run on the later versions of Linux and Trixbox. Included here are all the changes. Besides the minor corrections to get things working again, two larger changes also occured.

The xplring.agi was modified to be able to send more information, including outbound calls and more flexible calling state. However the AGI design wasn't sufficient to track call terminations.

The xplastevn file uses the Asterisk manager API which had everything neessary to track call state. xplastevn was enhanced to send cid.asterisk schema xPL messages. cid.asterisk is very similar to the cid.meteor schema. The only change is the use of the "cln" field to contain the Asterisk line name (Zap, Sip, etc) as in calling line name. The CallerID Name is now in the "cn" field instead. Asterisk devices or channels to be logged need to be added to the top of the file.

Incoming calls have up to four different xPL messages sent: initial, caller id, answered and hang up. Outgoing calls will have three messages sent: initial, caller id and hang up.

For completeness, the original version from Asterisk At Home is here.