public abstract class ServiceAgiScriptImpl extends BaseAgiScript implements ServiceAgiScript
Modifier and Type | Field and Description |
---|---|
protected AgiChannel |
channel |
protected AgiRequest |
request |
Constructor and Description |
---|
ServiceAgiScriptImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
getParameter(String name) |
abstract String[] |
getParameters() |
abstract String |
getScriptName() |
protected String |
required(String name,
String parameter) |
abstract void |
service()
field variables request and channel will be set prior to calling
service() AgiRequest request AgiChannel channel
|
void |
service(AgiRequest request,
AgiChannel channel)
The service method is called by the AsteriskServer whenever this
AgiScript should handle an incoming AgiRequest.
|
answer, bridge, confbridge, continueAt, controlStreamFile, controlStreamFile, controlStreamFile, controlStreamFile, databaseDel, databaseDelTree, databaseDelTree, databaseGet, databasePut, dial, exec, exec, getAsteriskVersion, getChannel, getChannelStatus, getData, getData, getData, getFullVariable, getFullVariable, getLastReply, getName, getOption, getOption, getUniqueId, getVariable, gosub, gosub, hangup, meetme, playMusicOnHold, playMusicOnHold, queue, recordFile, recordFile, sayAlpha, sayAlpha, sayDateTime, sayDateTime, sayDateTime, sayDateTime, sayDigits, sayDigits, sayNumber, sayNumber, sayPhonetic, sayPhonetic, sayTime, sayTime, sendCommand, setAutoHangup, setCallerId, setContext, setExtension, setPriority, setVariable, speechActivateGrammar, speechCreate, speechCreate, speechDeactivateGrammar, speechDestroy, speechLoadGrammar, speechRecognize, speechRecognize, speechSet, speechUnloadGrammar, stopMusicOnHold, streamFile, streamFile, streamFile, verbose, waitForDigit
protected AgiRequest request
protected AgiChannel channel
public void service(AgiRequest request, AgiChannel channel) throws AgiException
AgiScript
service
in interface AgiScript
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.AgiException
- any exception thrown by your script will be logged.public abstract void service() throws AgiException
AgiException
protected String required(String name, String parameter) throws AgiException
AgiException
protected String getParameter(String name) throws AgiException
AgiException
public abstract String getScriptName()
getScriptName
in interface ServiceAgiScript
public abstract String[] getParameters()
getParameters
in interface ServiceAgiScript
Copyright © 2004–2020. All rights reserved.