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:
Traun Leyden
2007-08-20 16:33:28 +00:00
parent 5eaea5f62a
commit c806a20d65
6 changed files with 119 additions and 8 deletions
+14 -1
View File
@@ -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,