mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
merge changes from branch http://svn.freeswitch.org/svn/freeswitch/branches/greenlizard/ that changes the session container implementation to use the one in the core, and an inherited class in python. Please note that this changes the python script api to more closely match (it is still a subset) the one already in place and documented for spidermonkey, and will break all your scripts that are currently working.. Fix a fatal bug causing segfaults in mod_python when using the callbacks.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5242 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -10,17 +10,17 @@ def onDTMF(input, itype, buf, buflen):
|
||||
return 0
|
||||
console_log("1","test from my python program\n")
|
||||
session.answer()
|
||||
session.set_dtmf_callback(onDTMF)
|
||||
session.setDTMFCallback(onDTMF)
|
||||
session.set_tts_parms("cepstral", "david")
|
||||
session.play_file("/root/test.gsm", "")
|
||||
session.speak_text("Please enter telephone number with area code and press pound sign. ")
|
||||
input = session.get_digits("", 11, "*#", 10000)
|
||||
session.playFile("/root/test.gsm", "")
|
||||
session.speakText("Please enter telephone number with area code and press pound sign. ")
|
||||
input = session.getDigits("", 11, "*#", 10000)
|
||||
console_log("1","result from get digits is "+ input +"\n")
|
||||
phone_number = session.play_and_get_digits(5, 11, 3, 10000, "*#",
|
||||
"/sounds/test.gsm",
|
||||
"/sounds/invalid.gsm",
|
||||
"",
|
||||
"^17771112222$");
|
||||
phone_number = session.playAndGetDigits(5, 11, 3, 10000, "*#",
|
||||
"/sounds/test.gsm",
|
||||
"/sounds/invalid.gsm",
|
||||
"",
|
||||
"^17771112222$");
|
||||
console_log("1","result from play_and_get_digits is "+ phone_number +"\n")
|
||||
session.transfer("1000", "XML", "default")
|
||||
session.hangup("1")
|
||||
|
Reference in New Issue
Block a user