[asterisk-commits] russell: branch russell/bindings r103666 - in /team/russell/bindings/bindings...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 13 21:48:44 CST 2008


Author: russell
Date: Wed Feb 13 21:48:43 2008
New Revision: 103666

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103666
Log:
 - rename read_digit to wait_for_digit and simplify the implementation
 - update test script for new function name

Modified:
    team/russell/bindings/bindings/ast_channel.i
    team/russell/bindings/bindings/examples/ast_channel_test.py

Modified: team/russell/bindings/bindings/ast_channel.i
URL: http://svn.digium.com/view/asterisk/team/russell/bindings/bindings/ast_channel.i?view=diff&rev=103666&r1=103665&r2=103666
==============================================================================
--- team/russell/bindings/bindings/ast_channel.i (original)
+++ team/russell/bindings/bindings/ast_channel.i Wed Feb 13 21:48:43 2008
@@ -116,7 +116,7 @@
         return var_val;
     }
 
-    const char *read_digit(const char *prompt = "silence/1", int timeout = 0)
+    const char *wait_for_digit(int timeout = 3000)
     {
         char *buf;
 
@@ -126,7 +126,7 @@
         buf[0] = '\0';
         buf[1] = '\0';
 
-        ast_app_getdata($self, prompt, buf, 1, timeout);
+        *buf = ast_waitfordigit($self, timeout);
 
         return buf;
     }

Modified: team/russell/bindings/bindings/examples/ast_channel_test.py
URL: http://svn.digium.com/view/asterisk/team/russell/bindings/bindings/examples/ast_channel_test.py?view=diff&rev=103666&r1=103665&r2=103666
==============================================================================
--- team/russell/bindings/bindings/examples/ast_channel_test.py (original)
+++ team/russell/bindings/bindings/examples/ast_channel_test.py Wed Feb 13 21:48:43 2008
@@ -16,7 +16,7 @@
 	print 'variable FOO is: ' + chan.get_var('FOO')
 
 	print 'playing a beep and then waiting 3 seconds for a digit ...'
-	digit = chan.read_digit('beep', 3000)
+	digit = chan.wait_for_digit(3000)
 	if len(digit) != 0:
 		print 'Got digit ' + digit
 	else:




More information about the asterisk-commits mailing list