mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-05 20:01:55 +00:00
1. add collectInput method. 2. modify the dtmf callback handlers to better deal with event inputs, as opposed to dtmf inputs. currently returns a dictionary where one key contains the body, and another contains the headers as a subdictionary.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5624 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -158,7 +158,7 @@ class CoreSession {
|
||||
*
|
||||
* The DTMF callback function will be set and persist
|
||||
* for the life of the session, and be called when a dtmf
|
||||
* is pressed by user during playFile(), streamfile(), and
|
||||
* is pressed by user during streamfile(), collectDigits(), and
|
||||
* certain other methods are executing.
|
||||
*
|
||||
*/
|
||||
@@ -168,6 +168,19 @@ class CoreSession {
|
||||
int speak(char *text);
|
||||
void set_tts_parms(char *tts_name, char *voice_name);
|
||||
|
||||
/**
|
||||
* For timeout milliseconds, call the dtmf function set previously
|
||||
* by setDTMFCallback whenever a dtmf or event is received
|
||||
*/
|
||||
int collectDigits(int timeout);
|
||||
|
||||
/**
|
||||
* Collect up to maxdigits digits worth of digits
|
||||
* and store them in dtmf_buf. In the case of mod_python, the
|
||||
* dtmf_buf parameter is configured to act as a _return_ value,
|
||||
* (see mod_python.i). This does NOT call any callbacks upon
|
||||
* receiving dtmf digits. For that, use collectDigits.
|
||||
*/
|
||||
int getDigits(char *dtmf_buf,
|
||||
int buflen,
|
||||
int maxdigits,
|
||||
|
||||
Reference in New Issue
Block a user