User:Birgit bachler/Freeswitch

From XPUB & Lens-Based wiki
< User:Birgit bachler
Revision as of 15:04, 28 April 2011 by Birgit bachler (talk | contribs) (Created page with "== Py PlayAndGetDigits == <pre> playAndGetDigits(int min_digits, int max_digits, int max_tries, int timeout, char *terminators, char *audio_fil...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Py PlayAndGetDigits

playAndGetDigits(int min_digits, 
		 int max_digits, 
		 int max_tries, 
	         int timeout, 
		 char *terminators, 
	         char *audio_files, 
	         char *bad_input_audio_files, 
		 char *digits_regex)

Example


tempfile = "/path/to/song.mp3"
in_rslt = self.session.playAndGetDigits(1,
                                        1,
                                        1,
                                        1000,
                                        "*#",
                                        tempfile,
                                        "",         
                                        "")      
                    
actual_result = in_rslt[1]
if not actual_result:
    actual_result = int(actual_result)