Questions tagged [agi]

The Asterisk Gateway Interface (AGI) is a CGI-like protocol for executing external programs within Asterisk dialplan.

The Asterisk Gateway Interface (AGI) is a CGI-like protocol for executing external programs within Asterisk dialplan.

The programs are called with the AGI dialplan command and then exchange a series of AGI protocol commands with the Asterisk server on STDIN and STDOUT.

207 questions
0
votes
2 answers

Set call file to hang up after some time using Bash AGI

I'm trying to make a call using a call file on asterisk where it plays a file and hangs up after a given time whether the sound file has finished or not. I have it working with this bash script as the AGI…
Tomcomm
  • 233
  • 2
  • 6
  • 16
0
votes
2 answers

How to to download MP3 file from AGI script written in Perl?

I am trying to download an MP3 file from an AGI script written in Perl, however the file does not get downloaded. The strange thing is that if I try to download the same file from a plain Perl script it gets downloaded. Here's my AGI code: use…
john
0
votes
1 answer

AGI command and php file in Asterisk

I want to make simple IVR using php in Asterisk. when i run php program individually , it works without any problem. but when i call it by AGI command in the Asterisk it does not works. this is my php file : #!/usr/bin/php -q
user421125
0
votes
2 answers

MixMonitor - How to use lame to convert and then remove the source file?

How can I remove the source wav file after the call is finished? If I have to use AGI can I have an example script? This is how I'm using MixMonitor exten => s,n,MixMonitor(${source_file}.wav,W(1),lame -V3 ${source_file}.wav…
Allover
  • 127
  • 3
  • 11
0
votes
1 answer

Is my use of XMLin killing my remote Asterisk AGI script?

I'm facing a strange problem while using XML::Simple module of Perl. I am writing an Asterisk AGI script in Perl where I am calling a function someSub() which uses curl to fetch XML from a CGI page into a variable $xmlstream. I then use XMLin on…
samk
-1
votes
1 answer

PHP MySQLi query works everwhere but in AGI

I have an asterisk AGI called from dialplan. Everything in the agi script, including other queries, work fine. This select returns 1 row from from CLI and MySQL Workbench but returns 0 rows when run in AGI. I have ensured the EOLs are all unix…
jerryrig
  • 125
  • 11
-1
votes
2 answers

Why is text2wav not working in phpagi demo

I'm just trying to run demo in PHPAGI folder available here: https://sourceforge.net/projects/phpagi/files/phpagi/2.20/ However, the text2wav is not working. When the script has to run text2wav (in dtmf.php for example), this error show: …
Florian
  • 1
  • 3
-1
votes
2 answers

What should my path if I am using python venv?

I use python 3.6.9 and asterisk 16.16.0 in Ubuntu 18.04. If you know about AGI then you probably know about this line #!/usr/bin/python or this #!/usr/bin/env python if not then don't worry its tells the system to run this script in the Python…
LP83
  • 1
  • 1
-1
votes
1 answer

How to Console.Read() n number of lines from Asterisk AGI

I am communicating with Asterisk via AGI, so im using: Console.WriteLine(command); and then: string res = Console.ReadLine(); to read the response. This all works fine almost all of the time. When the response has multiple lines, only first line…
Conrad
  • 397
  • 1
  • 2
  • 12
-1
votes
1 answer

How to execute code before making a call on Asterisk

I have an asterisk pbx server. I’m new to asterisk, I know there are dial plans extensions groups etc. My goal is to handle a dial event do some checks then decide whether to let the call go through or not. I read about ARI AGI AMI and dial plan…
Tarek
  • 1
  • 2
-1
votes
1 answer

PHP AGI script doesn't insert into database

There is AGI-script: #!/usr/bin/php
harp1814
  • 1,494
  • 3
  • 13
  • 31
-1
votes
1 answer

Python Asterisk AGI imported script won't run?

I recently started a project where I've ro use asterisk and AGI. So I started to learn how AGI works in python by using an example found on the internet. But when I paste the example and try to run the module in Python, shell gives me in red font…
sam1234
  • 33
  • 1
  • 8
-1
votes
1 answer

Asterisk IVR User-Input

I'm new to Asterisk an VoIP and no research fits my needs. I want to make a IVR in asterisk. The incoming calls will come from customers as well as business contacts. The business contacts will be forwarded to reception immediately after the first…
hennes
  • 1
  • 5
-1
votes
1 answer

View Asterisk CLI on PHP remote site

Recently i was instructed to make a tool to debug CLI commands and responses from asterisk in a remote server to be displayed on a webpage. I looked into the ARI options but the system im using is pbxware and they only have the AGI commands…
Trosky
  • 1
-1
votes
1 answer

Capture the Reverse Signal in Asterisk

I am new to and working on asterisk. How to Capture the Reverse Signal in Asterisk, Currently I am receiving the disposition as NA-No Answer Auto Dial for all unreached calls where I should receive as follows No Answer, Busy, Not Reachable,…
1 2 3
13
14