daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest May 16th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def testStream():
  2.         sys.stdout.write("STREAM FILE /home/asterisk/sounds/thenpresspound #\n")
  3.         sys.stdout.flush()
  4.         sys.stderr.write("STREAM FILE /home/asterisk/sounds/thenpresspound #\n")
  5.         sys.stderr.flush()
  6.         sys.stdout.write("GET DATA /home/asterisk/sounds/thenpresspound %d %d\n" % (7000, 10))
  7.         sys.stdout.flush()
  8.         sys.stderr.write("GET DATA /home/asterisk/sounds/thenpresspound %d %d\n" % (7000, 10))
  9.         sys.stderr.flush()
  10.         result = sys.stdin.readline().strip()
  11.         result = checkresult(result)
  12.         sys.stderr.write("digits are %s\n" % result)
  13.         return result
  14.  
  15.  
  16. testStream()
  17.  
  18.  
  19. # FROM * CONSOLE:
  20. STREAM FILE /home/asterisk/sounds/thenpresspound #
  21. GET DATA /home/asterisk/sounds/thenpresspound 7000 10
  22. [May  1 12:19:58] DTMF[11298]: channel.c:2092 __ast_read: DTMF end '#' received on Zap/1-1, duration 0 ms
  23. [May  1 12:19:58] DTMF[11298]: channel.c:2144 __ast_read: DTMF end accepted without begin '#' on Zap/1-1
  24. [May  1 12:19:58] DTMF[11298]: channel.c:2155 __ast_read: DTMF end passthrough '#' on Zap/1-1
  25. FAIL ('200 result=')
  26. digits are -1
  27.  
  28. # I don't hear the first sound, but I do hear the second one.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top