Update of /cvsroot/asterisk-java/asterisk-java/xdocs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30295/xdocs
Modified Files:
tutorial.xml
Log Message:
Added general information about the Manager API
Index: tutorial.xml
===================================================================
RCS file: /cvsroot/asterisk-java/asterisk-java/xdocs/tutorial.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -p -r1.2 -r1.3
--- tutorial.xml 13 Mar 2005 11:32:47 -0000 1.2
+++ tutorial.xml 14 Mar 2005 16:28:16 -0000 1.3
@@ -127,6 +127,20 @@ Mar 11, 2005 10:22:48 PM net.sf.asterisk
INFO: End AGIScript HelloAGIScript on AGIServer-TaskThread-0
]]></source>
</subsection>
+
+ <subsection name="Extending the Example">
+ <p>Have a look at the documentation of
+ <a href="apidocs/net/sf/asterisk/fastagi/AbstractAGIScript.html">AbstractAGIScript</a>
+ there you will find additional methods that you can use for your own scripts.
+ If you want to use commands that do not yet have a corresponding method in
+ AbstractAGIScript or if you want to extend the FastAGI protocol by adding your
+ own commands you can also use the channel.sendCommand(AGICommand) method to send
+ arbitrary commands.</p>
+ <p>If you are about to write more complex scripts please note that your AGIScript
+ must be threadsafe. Only one instance will be used to serve all requests.
+ This is kind of similar to the constraints a servlet engine places on the
+ implementation of servlets.</p>
+ </subsection>
<subsection name="Configuration">
<p>You can tune the DefaultAGIServer by setting two properties: The bindPort
@@ -153,5 +167,45 @@ poolSize = 20
]]></source>
</subsection>
</section>
+ <section name="The Manager API">
+ <p>The Manager API is the other way for remote interaction with an Asterisk server.
+ In contrast to the FastAGI protocol Asterisk does not explicitly pass control
+ to your application when using the Manager API but allows you to
+ query and change its state at any time.</p>
+ <p>The Manager API is made up of three concepts: Actions, Responses and Events.</p>
+ <p>Actions can be sent to Asterisk and instruct it to do someting. For example your
+ application can send an Action to Asterisk requesting it to dial a number and
+ direct the dialed party to one of your phones. In reply to an
+ Action Asterisk sends a Reply that contains the results of the operation
+ performed.</p>
+ <p>Events are sent by Asterisk without a direct relation to the Actions your
+ application is sending.
+ Events inform you about the relevant changes in Asterisk's state. For example
+ Events are used to inform your application about incoming calls or users joining
+ or leaving MeetMe conference rooms.</p>
+ <p>The connection to the Asterisk server via Manager API occurs over TCP/IP usually
+ on the default port 5038.</p>
+ <p>To enable the Manager API on Asterisk you must edit your <code>manager.conf</code>
+ configuration file and restart Asterisk. The <code>manager.conf</code> also contains
+ constraints on the range of IP addresses that are allowed to connect and username
+ and passwords for authentication. A sample might look like:</p>
+<source><![CDATA[
+[general]
+enabled = yes
+port = 5038
+bindaddr = 0.0.0.0
+
+[manager]
+secret=pa55w0rd
+permit=0.0.0.0/0.0.0.0
+read=system,call,log,verbose,agent,command,user
+write=system,call,log,verbose,agent,command,user
+]]></source>
+ <p>This will enable the Manager AP, allow access from any IP address using the
+ username "manager" and the password "pa55w0rd".</p>
+ <subsection name="Hello Manager!">
+ <p>to be done.</p>
+ </subsection>
+ </section>
</body>
</document>
\ No newline at end of file
|