A proxy that buffers indefinitely the connection between xivo-ctid and
asterisk.

Starting from XiVO *14.21*, the ami-proxy is directly integrated in XiVO, so
this code should not be used on 14.21 or later version. On these versions, you
can find how to activate it in the Troubleshooting section of the official
documentation.


Installation
============

1. On your XiVO, install the files in the right directory::

      # cp -r amiproxy /usr/local/lib/python2.7/dist-packages/
      # cp bin/amiproxy /usr/sbin
      # cp ami-proxy.service /etc/systemd/system
      # systemctl daemon-reload

2. Add amiproxy to the boot sequence::

      # systemctl enable ami-proxy.service

3. On your XiVO's web interface, configure your CTI server to connect to the AMI
   via the port 5039 (Services / CTI Server / General).

4. Start amiproxy::

      # systemctl start ami-proxy.service

5. Restart the XiVO stack::

     # xivo-service restart

You should also make sure that your XiVO restart correctly by restarting your
machine.


Uninstallation
==============

1. On your XiVO's web interface, configure your CTI server to connect to the AMI
   via the port 5038 (Services / CTI Server / General).

2. Stop amiproxy::
    
    # systemctl stop ami-proxy.service

3. Restart the XiVO stack (or only xivo-ctid)::
    
    # xivo-service restart

4. Remove amiproxy from the boot sequence::
    
    # rm /etc/systemd/system/ami-proxy.service
    # systemctl daemon-reload

5. Remove binaries::

    # rm -rf /usr/local/lib/python2.7/dist-packages/amiproxy
    # rm /usr/sbin/amiproxy

