Git Product home page Git Product logo

asterisk-php-api's Introduction

The Asterisk Manager PHP API enables a developer to control their Asterisk
PBX system from a PHP application.  Allowing for call origination,
monitoring, queue management, etc.

Documentation is provided in the tarball as well as on the PEAR site.  For
any help or bug reports please visit the sites Google Project page at:
http://code.google.com/p/asterisk-php-api/

The library is released under the BSD license which can be found in the
file named LICENSE in the same directory as this readme.

Copyright Doug Bromley 2008

asterisk-php-api's People

asterisk-php-api's Issues

reading response from a command, read entire response instead of the first line.

What steps will reproduce the problem?
1. show queues
2.
3.

What is the expected output? What do you see instead?
The expected output is many lines which show all of the queues and their
status. What we see is one line which says Response: follows. This is
because you are using fgets to read the response, I am no expert but I
believe stream_read_contents would be the appropriate call here. It will
read the entire contents instead of just the first line.

What version of the product are you using? On what operating system?
latest version from svn as of 4/16/08 @ 6:21pm PST

Please provide any additional information below.
199 #        $response = fgets($this->_socket);
200         $response = stream_get_contents($this->_socket);


Original issue reported on code.google.com by [email protected] on 17 Apr 2008 at 1:22

Originate call execption

What steps will reproduce the problem?
1. Originate a call to a channels you can answer (SIP/IAX Softphone)
2. Wait until the socket timeout comes
3. then an execption is thrown

I manage the problem by changing a little the code. I can send you the 
code, so you can take a look a it.

I have added the ExtensionState command too, just let me know if would like 
to see it (I saw an issue/enhancement with this). 

Can contact me at: jerdguez _at_ gmail _dot_ com

Original issue reported on code.google.com by [email protected] on 19 Feb 2009 at 7:08

Feature Request

Nice job maintaining this.  I hastily wrote some PHP code to work with the
Asterisk AGI as well.  There are a couple features that are missing that
would allow me to use this as a replacement.

If you are interested  in adding a couple features, I can give you more
info and help out.

The functions I primarily use are CoreShowChannles, Park, ParkedCalls,
QueueAdd(with agent number), queue pause, and probably a couple others.

Thanks!

Original issue reported on code.google.com by [email protected] on 8 May 2008 at 2:18

Challenge Login to Asterisk does not work

What steps will reproduce the problem?
1. Use Challenge login with Asterisk
2. Login fails


What version of the product are you using? On what operating system?
Does not matters.

Please provide any additional information below.
The issues is in AsteriskManager.php line 200
-strpos($response, "Challenge: ")));
+strpos($response, "Challenge: ")+strlen("Challenge: ")));

Otherwise the challenge is wrong and authentication fails

Original issue reported on code.google.com by [email protected] on 21 Sep 2014 at 3:46

Passing variables to dialplan on originateCall

Hi, 

when passing variables to originate call function like: 

  /**
  * Originate Call
  */

  try {
     $ast->originateCall ('1000', 'SIP/provider/+123456789' , 'outgoing', '+122222092', 1, 30000, array("FOO"=>"value1", "BAR"=>"value2"));
  } catch (PEAR_Exception $e) {
      echo $e;
  }

I would expect to have those variables available in my dialplan:

[outgoing]
exten => 1000,1,Background(/data/sounds/beep)
  same => n,Background(/data/sounds/${FOO})
  same => n,Background(/data/sounds/${BAR})
  same => n,Hangup()


They are not. 

Am I missing something? Can this be achieved?

Thank you

Original issue reported on code.google.com by [email protected] on 16 May 2013 at 3:19

Non-blocking enhancements

I've made some changes for my own use that eliminate having to wait for the 
3 second timeout on many operations (by looking for a known termination 
keyword and not reading any further).

This patch also adds an option to supply "Events: off" on login.

Patch attached



Original issue reported on code.google.com by [email protected] on 27 Feb 2010 at 7:39

Attachments:

Variables wrong in Originate Call

What steps will reproduce the problem?
1. Originate a call with Variables arg.

What is the expected output? What do you see instead?
Command: Originate...Variable: foo=bar|baz=2
Command: Origiante...Variable: Array

What version of the product are you using? On what operating system?
N/A


Please provide any additional information below.

Patch:
--- AsteriskManager.php 2009-03-01 18:24:02.000000000 -0600
+++ AsteriskManager.php.original        2009-03-01 18:24:26.000000000 -0600
@@ -323,7 +323,7 @@
                 $chunked_vars[] = "$key=$val";
             }
             $chunked_vars = implode('|', $chunked_vars);
-            $command     .= "Variable: $chunked_vars\r\n";
+            $command     .= "Variable: $variables\r\n";
         }

         if ($action_id) {


Original issue reported on code.google.com by [email protected] on 2 Mar 2009 at 12:27

secure login functionality

really liking the API so far, but one thing missing thing i need is a 
secure login option.

attached patch implements the MD5 auth type by extending the login 
function to perform it's job based on the passed auth type.

tested, and seems to work beautifully.

happy to rewrite if you don't like the approach -- just lemme know....


Original issue reported on code.google.com by [email protected] on 30 Apr 2008 at 7:45

Attachments:

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.