Answer the question
In order to leave comments, you need to log in
How to determine if an AGI script is connected to asterisk?
I'm trying to connect the script to the diaplane in the asterisk in order to shorten the extensions.conf config
, but I don't understand how to find out if the script is running, I
connect it as follows, the script itself is in the folder /var/lib/asterisk/cgi-bin/
exten=> s,1,AGI(incoming .agi)
is this how it is understood that it worked, for example with errors or not?
Answer the question
In order to leave comments, you need to log in
you can throw NOOP
with asterisk-perl comes down to one line:$AGI->noop("Start");
here is how it is understood that it worked, for example with errors or not
Turn on logging inside your script.
On the knee, for example:
open my $file, '> /tmp/my-agi.log';
print $file "Скрипт запустился";
use Data::Dumper;
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init( { level => $ON, file => ">>/var/lib/asterisk/agi-bin/test.log" } );
DEBUG "START";
my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
DEBUG "cid" . Dumper($AGI);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question