Welcome Guest, Not a member yet? Register   Sign In
Asterisk AGI
#1

[eluser]Unknown[/eluser]
Hey, I've had some trouble trying to use Codeigniter with Asterisk AGI so I'm publishing here how I solved it for whom it may concern.

First edit the main index.php file of CI and add the following :
Code:
#!/usr/bin/php -q
in the top of the file.
To navigate to a function you need to use :

Code:
AGI(/path/to/ci//index.php,controller,function)


I've implemented php-agi as a library by doing :

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once APPPATH."/third_party/Agi/phpagi.php";
class Phpagi extends AGI{

    public function __construct() {
        parent::__construct();
    }

}


?>
And then you use it just like you would in a regular script (once loading the library of course)
Hope this helps anyone.




Theme © iAndrew 2016 - Forum software by © MyBB