|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--SimpleCapi.SimpleCapi
| Constructor Summary | |
SimpleCapi(java.lang.String server,
int port)
Establishes a connection to the main Caiviar IVR Server. |
|
| Method Summary | |
void |
acceptCalls()
signal to the server that incoming calls should trigger an event. |
boolean |
answer(CapiEvent event)
answer an incoming call. |
void |
beep(java.lang.String notes)
generate one or more DTMFs. |
int |
call_nonblock(java.lang.String msisdn)
call the specified msisdn, return immediately. |
int |
call(java.lang.String msisdn,
int timeout)
call the specified msisdn. |
void |
close()
close the connection to the capiserver. |
void |
connect(SimpleCapi capi1,
SimpleCapi capi2)
merge the audio datas of two connections (or connections-to-be). |
void |
del(java.lang.String filename)
remove a file from the server. |
boolean |
fax(java.lang.String msisdn,
java.lang.String filename)
send a fax through the line. |
void |
finalize()
|
boolean |
forward(java.lang.String msisdn)
forward an incoming call / a connection |
void |
get(java.lang.String filename,
java.lang.String destname)
get a file from the server. |
void |
hangup()
hangup on a connection. |
boolean |
hold()
put existing call on hold. |
void |
ignore(CapiEvent event)
ignore an incoming call. |
CapiEvent |
listen(int timeout)
wait for something to happen. |
int |
play(java.lang.String filename)
send a sound file into a line. |
void |
put(java.lang.String filename,
java.lang.String destname)
put a file on the server, for subsequent play() or fax() calls. |
int |
record(java.lang.String filename,
int seconds)
record the other end's voice into buf. |
void |
reject(CapiEvent event)
reject an incoming call. |
boolean |
retrieve()
retrieve call on hold. |
void |
setMSISDN(java.lang.String msisdn)
sets another host msisdn than the one specified in the defaults. |
int |
speak(java.lang.String text)
use tts functionality to speak a text. |
void |
stop(int jobid)
stop a running job. |
boolean |
supplemental(java.lang.String command)
do a supplemental service command, for example "3conf". |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleCapi(java.lang.String server,
int port)
throws java.io.IOException,
NoLineFreeException
server - The Adress of the IVR Serverport - The port on the IVR Server (usually 7347)| Method Detail |
public void setMSISDN(java.lang.String msisdn)
throws java.io.IOException,
CommandFailedException
msisdn - the msisdn to use
java.io.IOException
CommandFailedException
public void acceptCalls()
throws java.io.IOException,
CommandFailedException
java.io.IOException
CommandFailedException
public int call(java.lang.String msisdn,
int timeout)
throws java.io.IOException,
CommandFailedException
msisdn - the msisdn to calltimeout - the number of seconds to wait for an answer
java.io.IOException
CommandFailedException
public int call_nonblock(java.lang.String msisdn)
throws java.io.IOException,
CommandFailedException
msisdn - the misdn to call
java.io.IOException
CommandFailedException
public void put(java.lang.String filename,
java.lang.String destname)
throws java.io.IOException,
CommandFailedException
filename - The filename of the file to senddestname - How the file should be named on the server. Must not
contain the characters '/' or '\\'.
java.io.IOException
CommandFailedException
public void get(java.lang.String filename,
java.lang.String destname)
throws java.io.IOException,
CommandFailedException
filename - The filename of the file to receive. Must not
contain the characters '/' or '\\'.destname - The destination file.
java.io.IOException
CommandFailedException
public void del(java.lang.String filename)
throws java.io.IOException,
CommandFailedException
filename - The filename of the file to remove. Like in put(), the
filename must not contain the characters '/' and '\\'.
java.io.IOException
CommandFailedException
public void beep(java.lang.String notes)
throws java.io.IOException,
CommandFailedException
notes - A String of DTMFs to generate. Allowed characters are
'0'-'9','*','#'.
java.io.IOException
CommandFailedException
public boolean hold()
throws java.io.IOException,
CommandFailedException
java.io.IOException
CommandFailedException
public boolean retrieve()
throws java.io.IOException,
CommandFailedException
java.io.IOException
CommandFailedException
public boolean supplemental(java.lang.String command)
throws java.io.IOException,
CommandFailedException
command - the command to send, e.g. "3conf".
java.io.IOException
CommandFailedException
public int play(java.lang.String filename)
throws java.io.IOException,
CommandFailedException
filename - the filename of the soundfile
java.io.IOException
CommandFailedException
public int speak(java.lang.String text)
throws java.io.IOException,
CommandFailedException
text - the text to speech
java.io.IOException
CommandFailedException
public int record(java.lang.String filename,
int seconds)
throws java.io.IOException,
CommandFailedException
filename - the filename to store the recorded file in. this file will be put
on the server, not the local directory!seconds - how many seconds to record. The recording will be shorter if the
other end hangs up.
java.io.IOException
CommandFailedException
public boolean fax(java.lang.String msisdn,
java.lang.String filename)
throws java.io.IOException,
CommandFailedException
msisdn - the msisdn of the fax machinefilename - the filename of the fax file (on the server)
java.io.IOException
CommandFailedException
public void stop(int jobid)
throws java.io.IOException,
CommandFailedException
jobid - the job to stop
java.io.IOException
CommandFailedException
public CapiEvent listen(int timeout)
throws java.io.IOException,
CommandFailedException
timeout - the time to listen. If nothing happened while
we were waiting, return a TIMEOUT event. If timeout=0,
wait forever.
java.io.IOException
CommandFailedException
public boolean answer(CapiEvent event)
throws java.io.IOException,
CommandFailedException
event - the INCOMING event to answer
java.io.IOException
CommandFailedException
public void reject(CapiEvent event)
throws java.io.IOException,
CommandFailedException
event - the INCOMING event to hang up on
java.io.IOException
CommandFailedException
public void ignore(CapiEvent event)
throws java.io.IOException,
CommandFailedException
event - the INCOMING event to ignore
java.io.IOException
CommandFailedException
public boolean forward(java.lang.String msisdn)
throws java.io.IOException,
CommandFailedException
msisdn - the new msisdn
java.io.IOException
CommandFailedException
public void hangup()
throws java.io.IOException,
CommandFailedException
java.io.IOException
CommandFailedException
public void connect(SimpleCapi capi1,
SimpleCapi capi2)
throws java.io.IOException,
CommandFailedException
capi1 - SimpleCapi object corresponding to the first connectioncapi2 - SimpleCapi object corresponding to the second connection
java.io.IOException
CommandFailedExceptionpublic void close()
public void finalize()
finalize in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||