Code Monkey home page Code Monkey logo

phpagi's People

Contributors

alexeevdv avatar arbuzov avatar bdido86 avatar codelingobot avatar dmitrymcn avatar freess avatar ipoddubny avatar nedlosster avatar ricventu avatar sebastianberm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpagi's Issues

phpagi_error_handler

Hi,

PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function phpagi_error_handler(), 4 passed and exactly 5 expected in /var/lib/asterisk/agi-bin/phpagi.php:1759
Stack trace:
#0 /var/lib/asterisk/agi-bin/phpagi.php(196): phpagi_error_handler()
#1 /var/lib/asterisk/agi-bin/test.agi(11): AGI->__construct()
#2 {main}
  thrown in /var/lib/asterisk/agi-bin/phpagi.php on line 1759

Is this library compatible with PHP 8?

not compatible with asterisk 16

Hello!

Previously asterisk sent --END command

action_command_cleanup:

    close(fd);
    unlink(template);
    astman_append(s, "--END COMMAND--\r\n\r\n");
    
    ast_free(buf);
    ast_free(final_buf);

which php-agi waits for

while(substr($buff, 0, 6) != '--END ')

but now there is no such code

action_command_cleanup:
astman_append(s, "\r\n");

    close(fd);
    unlink(template);

    ast_free(buf);
    ast_free(final_buf);

So php-agi does not work with asterisk 16.. :-(

Script wont die

Not sure if this is because of initd or phpagi but if you are using fastagi via xinetd and php is doing something for instance if you are playing a sound file, you have a sleep(10) etc. then even after hangup the php script will still be running. It seems that even after the tcp socket between xinted and asterisk is torn down xinetd keeps the php file running.

GET FULL VARIABLE

The AGI syntax for get_fullvariable is wrong, it currently is
GET VARIABLE FULL xx
while it should be
GET FULL VARIABLE
Easy fix on line 454 of phpagi.php

Difficulties on how to use. Namespace?

Hello people.
I'm trying to use this project (having loaded through composer) but I cannot reference the classes properly as they do not have a namespace. I'm I doing something wrong?

PHPAGI get value in a variable

Hi all,
I am trying to get queue member list in .php using $agi->get_variable("QUEUE_MEMBER_LIST(washingtonflyer)"); which retrive queue member list.�
i want to save that value in a veriable. but it is not saving�. please help me here. following is my config.

exten => s,1,Answer
exten => s,2,AGI(/scripts/getagent.php)
exten => s,3,Noop(${agent1})

require_once("phpagi/phpagi.php");
$agi = new AGI();
$agent = $agi->get_variable("QUEUE_MEMBER_LIST(washingtonflyer)");
$agi->set_variable('agent',$agent1)

<SIP/3289-00000010>AGI Tx >> 200 result=1 (Local/9308@agent,Local/9311@agent,Local/9301@agent,Local/9315@agent,Local/9305@agent,Local/9309@agent,Local/9312@agent,Local/9302@agent,Local/9306@agent,Local/9313@agent,Local/9303@agent,Local/9307@agent,Local/9310@agent,Local/9314@agent,Local/9304@agent)
<SIP/3289-00000010>AGI Rx << SET VARIABLE a ""
<SIP/3289-00000010>AGI Tx >> 200 result=1
-- <SIP/3289-00000010>AGI Script /scripts/check_agent2.php completed, returning 0
-- Executing [s@washingtonflyer:3] NoOp("SIP/3289-00000010", "") in new stack
-- Auto fallthrough, channel 'SIP/3289-00000010' status is 'UNKNOWN'

problem with $_ENV superglobal

On some PHP configurations $_ENV is empty. It depends on this setting: http://us.php.net/manual/en/ini.core.php#ini.variables-order

That is what http://php.net/manual/ru/reserved.variables.environment.php tells us:

If your $_ENV array is mysteriously empty, but you still see the variables when calling getenv() or in your phpinfo(), check your http://us.php.net/manual/en/ini.core.php#ini.variables-order ini setting to ensure it includes "E" in the string.

http://us3.php.net/manual/en/function.getenv.php should be used instead. It is supported on all php configurations since 4.x

Composer support

Would be great to have ability to install this package with Composer. As it became a de facto standard in PHP world.

Cannot redeclare class AGI_AsteriskManager

We downloaded latest phpagi 2.2. But when we are excuting our php file we are getting this error.

Cannot redeclare class AGI_AsteriskManager in /var/lib/asterisk/agi-bin/phpagi-asmanager.php on line 867
Here is our php file code

!/usr/bin/php -q

answer(); $agi->say_number("1234"); // speaks the number 1234 $agi->say_digits("1234"); // speaks the digits 1, 2, 3 and 4. //$cid = $agi->parse_callerid(); $agi->text2wav("Hello"); $agi->text2wav('Goodbye'); // $agi->hangup(); ?>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.