[asterisk-users] How to track a call result originated from originate AMI command

Motiejus Jakštys desired.mta at gmail.com
Mon Aug 9 09:37:42 CDT 2010


On Mon, Aug 9, 2010 at 12:08 PM, Lenz Emilitri <lenz.loway at gmail.com> wrote:
> BTW, using the most common Asterisk distros out there that happen to sport a
> very complex dialplan, we see a lot of lost events, so that tracking calls
> on the basis of AMI observation alone becomes practically impossible.....
> :-(
> l.

You can filter AMI. If you know PERL, you can start with my script
that works with callbacks:

$callbacks{'Newstate'} = \&newstate_callback;
$callbacks{'Dial'} = \&dial_callback;

And create appropriate functions for storing desired values to the
database. We catch Dial, Answer, Ringing, Hangup events and store that
info to database with very accurate timestamps :-)

http://github.com/Motiejus/Asterisk-perl-AMI/blob/master/asterisk_ami.pl

Regards,
Motiejus Jakštys



More information about the asterisk-users mailing list