?? agichannelimpl.html
字號:
<HR><A NAME="setAutoHangup(int)"><!-- --></A><H3>setAutoHangup</H3><PRE>public void <B>setAutoHangup</B>(int time) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#setAutoHangup(int)">AgiChannel</A></CODE></B></DD><DD>Cause the channel to automatically hangup at the given number of seconds in the future.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#setAutoHangup(int)">setAutoHangup</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>time</CODE> - the number of seconds before this channel is automatically hung up.<p> 0 disables the autohangup feature.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="setCallerId(java.lang.String)"><!-- --></A><H3>setCallerId</H3><PRE>public void <B>setCallerId</B>(java.lang.String callerId) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#setCallerId(java.lang.String)">AgiChannel</A></CODE></B></DD><DD>Sets the caller id on the current channel.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#setCallerId(java.lang.String)">setCallerId</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>callerId</CODE> - the raw caller id to set, for example "John Doe<1234>".<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="playMusicOnHold()"><!-- --></A><H3>playMusicOnHold</H3><PRE>public void <B>playMusicOnHold</B>() throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#playMusicOnHold()">AgiChannel</A></CODE></B></DD><DD>Plays music on hold from the default music on hold class.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#playMusicOnHold()">playMusicOnHold</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="playMusicOnHold(java.lang.String)"><!-- --></A><H3>playMusicOnHold</H3><PRE>public void <B>playMusicOnHold</B>(java.lang.String musicOnHoldClass) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#playMusicOnHold(java.lang.String)">AgiChannel</A></CODE></B></DD><DD>Plays music on hold from the given music on hold class.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#playMusicOnHold(java.lang.String)">playMusicOnHold</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>musicOnHoldClass</CODE> - the music on hold class to play music from as configures in Asterisk's <code><musiconhold.conf/code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="stopMusicOnHold()"><!-- --></A><H3>stopMusicOnHold</H3><PRE>public void <B>stopMusicOnHold</B>() throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#stopMusicOnHold()">AgiChannel</A></CODE></B></DD><DD>Stops playing music on hold.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#stopMusicOnHold()">stopMusicOnHold</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="getChannelStatus()"><!-- --></A><H3>getChannelStatus</H3><PRE>public int <B>getChannelStatus</B>() throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getChannelStatus()">AgiChannel</A></CODE></B></DD><DD>Returns the status of the channel.<p> Return values: <ul> <li>0 Channel is down and available <li>1 Channel is down, but reserved <li>2 Channel is off hook <li>3 Digits (or equivalent) have been dialed <li>4 Line is ringing <li>5 Remote end is ringing <li>6 Line is up <li>7 Line is busy </ul><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getChannelStatus()">getChannelStatus</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the status of the channel.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="getData(java.lang.String)"><!-- --></A><H3>getData</H3><PRE>public java.lang.String <B>getData</B>(java.lang.String file) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getData(java.lang.String)">AgiChannel</A></CODE></B></DD><DD>Plays the given file and waits for the user to enter DTMF digits until he presses '#'. The user may interrupt the streaming by starting to enter digits.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getData(java.lang.String)">getData</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the name of the file to play<DT><B>Returns:</B><DD>a String containing the DTMF the user entered<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="getData(java.lang.String, long)"><!-- --></A><H3>getData</H3><PRE>public java.lang.String <B>getData</B>(java.lang.String file, long timeout) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getData(java.lang.String, long)">AgiChannel</A></CODE></B></DD><DD>Plays the given file and waits for the user to enter DTMF digits until he presses '#' or the timeout occurs. The user may interrupt the streaming by starting to enter digits.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getData(java.lang.String, long)">getData</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the name of the file to play<DD><CODE>timeout</CODE> - the timeout in milliseconds to wait for user input.<p> 0 means standard timeout value, -1 means "ludicrous time" (essentially never times out).<DT><B>Returns:</B><DD>a String containing the DTMF the user entered<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="getData(java.lang.String, long, int)"><!-- --></A><H3>getData</H3><PRE>public java.lang.String <B>getData</B>(java.lang.String file, long timeout, int maxDigits) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getData(java.lang.String, long, int)">AgiChannel</A></CODE></B></DD><DD>Plays the given file and waits for the user to enter DTMF digits until he presses '#' or the timeout occurs or the maximum number of digits has been entered. The user may interrupt the streaming by starting to enter digits.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getData(java.lang.String, long, int)">getData</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the name of the file to play<DD><CODE>timeout</CODE> - the timeout in milliseconds to wait for user input.<p> 0 means standard timeout value, -1 means "ludicrous time" (essentially never times out).<DD><CODE>maxDigits</CODE> - the maximum number of digits the user is allowed to enter<DT><B>Returns:</B><DD>a String containing the DTMF the user entered<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="getOption(java.lang.String, java.lang.String)"><!-- --></A><H3>getOption</H3><PRE>public char <B>getOption</B>(java.lang.String file, java.lang.String escapeDigits) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getOption(java.lang.String, java.lang.String)">AgiChannel</A></CODE></B></DD><DD>Plays the given file, and waits for the user to press one of the given digits. If none of the esacpe digits is pressed while streaming the file it waits for the default timeout of 5 seconds still waiting for the user to press a digit.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html#getOption(java.lang.String, java.lang.String)">getOption</A></CODE> in interface <CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiChannel.html" title="interface in org.asteriskjava.fastagi">AgiChannel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the name of the file to stream, must not include extension.<DD><CODE>escapeDigits</CODE> - contains the digits that the user is expected to press.<DT><B>Returns:</B><DD>the DTMF digit pressed or 0x0 if none was pressed.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></CODE></DL></DD></DL><HR><A NAME="getOption(java.lang.String, java.lang.String, int)"><!-- --></A><H3>getOption</H3><PRE>public char <B>getOption</B>(java.lang.String file, java.lang.String escapeDigits, int timeout) throws <A HREF="../../../../org/asteriskjava/fastagi/AgiException.html" title="class in org.asteriskjava.fastagi">AgiException</A></PRE>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -