Asterisk-Java

org.asteriskjava.fastagi
Interface AgiScript

All Known Subinterfaces:
NamedAgiScript
All Known Implementing Classes:
BaseAgiScript, ScriptEngineMappingStrategy.ScriptEngineAgiScript

public interface AgiScript

AgiScripts are used by the AsteriskServer to handle AgiRequests received from the Asterisk server.

To implement functionality using this framework you have to implement this interface.

Note: The implementation of AgiScript must be threadsafe as only one instance is used by AsteriskServer to handle all requests to a resource.

Version:
$Id: AgiScript.java 938 2007-12-31 03:23:38Z srt $
Author:
srt

Method Summary
 void service(AgiRequest request, AgiChannel channel)
          The service method is called by the AsteriskServer whenever this AgiScript should handle an incoming AgiRequest.
 

Method Detail

service

void service(AgiRequest request,
             AgiChannel channel)
             throws AgiException
The service method is called by the AsteriskServer whenever this AgiScript should handle an incoming AgiRequest.

Parameters:
request - the initial data received from Asterisk when requesting this script.
channel - a handle to communicate with Asterisk such as sending commands to the channel sending the request.
Throws:
AgiException - any exception thrown by your script will be logged.

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.