0

I wrote some php code in AMI to work with asterisk command.

I don't know exactly what's the difference between Asterisk Manager Interface (AMI) and Asterisk Gateway Interface (AGI) and witch one is better for my planning.

I'm planning to call party users that their number is is my panel on web. We have some operators and they can call party users via client softphone by clicking on their number, so they are limiteded to call just the listed numbers (and can't call another number).

How can I set those permissions? And how can I store called record in asterisk (IVR recorded voice) via php. Should I use Asterisk Manager Interface (AMI) orAsterisk Gateway Interface (AGI).

VDP
  • 6,340
  • 4
  • 31
  • 53
MGH
  • 11
  • 1
  • 7

3 Answers3

1

Well, AGI and AMI are two totally different things. AGI very much a scripting API, enabling you to execute 3rd party scripts from within the dialplan (it can do much more, but this it the general idea). AMI is a TCP server socket, allowing you to have real-time call control and events thrown back at your TCP client program.

Most systems will utilize a mixture of both, in order to facilitate a solution. For example, in your case, you would use AMI for originating the outbound calls, while you would use AGI in order to perform in-dialplan logic.

The AMI configuration is governed by the /etc/asterisk/manager.conf file, or if you used any of the FreePBX based distributions (Elastix, TrixBox, PIAF, FreePBX Distro), the file you need to work with is called /etc/asterisk/manager_custom.conf.

You can find additional information about Asterisk AGI and Asterisk AMI on my personal blog at http://www.simionovich.com - or if you put my name into Google (I know, this is highly self promotive) - you will find multiple papers and presentations I've given over the years about thus subject.

Additional preliminary information can be obtained from the following links:

j0k
  • 22,600
  • 28
  • 79
  • 90
  • Thanks to replay Nir, I read your presentations. I have a scenario but I confused about that. excatly I have some user number and operators call outbound them(it seems AGI can work with inbound calls). Please refer me to make this scenario with PHP in AGI. I have 7 extensions and unlimited operator. each operator can call specific number as their lists and asterisk have to find free extension and divert outbound call to that. – MGH Jan 15 '13 at 14:59
  • Hi @MGH, Have you resolved your issues yet? I hadn't logged on to SO for a while, so didn't see this. – Nir Simionovich Mar 08 '16 at 09:57
0

To do recording of call use Mixmonitor command

http://www.voip-info.org/wiki/view/MixMonitor

Or EAGI

http://www.voip-info.org/wiki/view/Asterisk+EAGI

"Permissions" can be set via dialplan http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Introduction

or using your agi/fastagi script.

arheops
  • 15,544
  • 1
  • 21
  • 27
0

If you want to dial out, then AMI is for you (it's called Originate in Asterisk parlance). There are a number of libraries available that will make your life easier.