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
1
vote
0 answers

silence detection not working Asterisk AGI

I'm trying to record a call in Asterisk, I used the function record_file but it does not work properly. The silence detection is not working, the call keep alive without detecting the 3 silence seconds. But when I dial "#", the record is created…
Stiben
  • 104
  • 11
1
vote
1 answer

Asterisk HANGUPCAUSE always 0 when caller hangs up Queue

Using Asterisk 11, with an inbound route configured to call Queue app, every time the caller hangs up the HANGUPCAUSE variable is 0, it works and returns the NORMAL_CLEARING code only when the assigned queue member hangs up or if not using queues.…
Jeferson Daniel
  • 173
  • 2
  • 11
1
vote
1 answer

Asterisk PHP AGI & phpagi-asmanager not showing full output

I am executing a php agi command using phpagi-asmanager.php class on my Asterisk 14 box and it is only showing a 1 line output instead of showing the full results. require_once( '/var/lib/asterisk/agi-bin/phpagi-asmanager.php' ); $agi = new…
Coco
  • 11
  • 2
1
vote
1 answer

PHP agi Goto Queue

I have a problem with my Asterisk Agi. My script checks if the customer id is correct and then it has to transfer the call into a queue. I use: $agi->exec('Goto',"ext-queues,100,0"); But when I call the number, give an existing customer number it…
Mirkin
  • 143
  • 1
  • 1
  • 12
1
vote
1 answer

Asterisk AGI with chan_lcr

Is there any working example of Asterisk AGI with chan_lcr? when i call through chan_lcr in AGI it does not work but when i call directly chan_lcr from asterisk dial plan it works. it seems lcr driver and chan_lcr communicates during call…
1
vote
4 answers

Asterisk hangs up if caller inputs number early

We have an Asterisk IVR system setup that prompts the user for input In our extensions file, we have the following: [englishprocess] exten => s,1,Answer() exten => s,n,Wait(1) exten => s,n,Set(TIMEOUT(digit)=2) exten => s,n,agi(mstts.agi,"Please…
M Y
  • 1,831
  • 4
  • 24
  • 52
1
vote
1 answer

Asternet AGI GeneralMappingStrategy using XML

I am trying to use XML for my GeneralMappingStrategy in Asternet. I have my program working fine using List such as: agiServer.MappingStrategy = new GeneralMappingStrategy( new List() { new…
Dave
  • 351
  • 4
  • 18
1
vote
2 answers

Asterisk agi not working

I'm having the simple AGI script, when incoming call is answered run script. But does not working. How can i run my script correctly? By the way sorry for my english. Here's code: extensions_additional.conf [macro-auto-blkvm] include =>…
1
vote
1 answer

Run callbacks when user hung up call from IVR

I used this PHP library PAGI to build an IVR application with Asterisk. For every call I need to do some cleanups and write something to the database. So I need some callback/handler after user hung up the call. ASAIK, this library provides some way…
sc1013
  • 1,068
  • 2
  • 16
  • 24
1
vote
1 answer

Recorded files lost when user hangs up

I'm writing a voice application in which I want to save a recorded sound file. My code is: $file = $clientid.rand(5, 10); $agi->stream_file("itc-Por-favor-indique-su-nombre-numero-de-telefono"); $sal =…
1
vote
0 answers

Unable to catch return value of Asterisk::AGI get_variable

I have a 1.agi file that sets asterisk variable by using following code $AGI->set_variable("MY_CALLID",$value); I am using following lines of code in 2.agi to retrieve that value (Value here is 20) my $MY_CALLID =…
vipanth
  • 85
  • 1
  • 7
1
vote
2 answers

Asterisk connect to a parked call

I am developing a custom application to control an Asterisk based pbx using ami/agi interface. What I have to do is: receive a call from a pstn external line answer the call play a welcome message transfer the call to a specific extension park the…
1
vote
2 answers

Asterisk AGI (Perl script) - Sometimes all keys are ignored by the script

I am new to Asterisk (VoIP) and am rather new to UNIX/Perl. I'm taking this over from a co-worker that left the company, so I didn't set this up in the first place, I just need to make some changes. I'm having a problem where I use get_data() to get…
Travesty3
  • 14,351
  • 6
  • 61
  • 98
1
vote
1 answer

ARI Authentication (asterisk)

I can't authenticate in ARI from console browser (lynx, elinks) cat /etc/asterisk/ari.conf : [general] enabled = yes pretty = yes allowed_origins = * [sa] type = user read_only = no password = test password_format =…
1
vote
3 answers

Asterisk AMI AGI Notification PHP Script

I am new to Asterisk. My requirement is when I receive a call I need to identify caller id and pop up that id when answer the call. I have some knowledge in AMI and AGI. I want to know how can I do this using php script. Any example or something…
sameera
  • 31
  • 1
  • 4