Exemplo n.º 1
0
 def __init__(self, filename, format=FORMAT_WAV, escape_digits='', timeout=-1, sample_offset=0, beep=True, silence=None):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self,
      'RECORD FILE', quote(filename), quote(format),
      quote(escape_digits), quote(timeout), quote(sample_offset),
      (beep and quote('beep') or None),
      (silence and quote('s=' + str(silence)) or None)
     )
Exemplo n.º 2
0
 def __init__(self,
              filename,
              escape_digits='',
              sample_offset=0,
              forward='',
              rewind='',
              pause=''):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self, 'CONTROL STREAM FILE', quote(filename),
                      quote(escape_digits), quote(sample_offset),
                      quote(forward), quote(rewind), quote(pause))
Exemplo n.º 3
0
 def __init__(self, number, name=None):
     if name:  #Escape it
         name = '\\"%(name)s\\"' % {
             'name': name,
         }
     else:  #Make sure it's the empty string
         name = ''
     number = "%(name)s<%(number)s>" % {
         'name': name,
         'number': number,
     }
     _Action.__init__(self, 'SET CALLERID', quote(number))
Exemplo n.º 4
0
 def __init__(self, number, name=None):
     if name: #Escape it
         name = '\\"%(name)s\\"' % {
          'name': name,
         }
     else: #Make sure it's the empty string
         name = ''
     number = "%(name)s<%(number)s>" % {
      'name': name,
      'number': number,
     }
     _Action.__init__(self, 'SET CALLERID', quote(number))
Exemplo n.º 5
0
 def __init__(self,
              filename,
              format=FORMAT_WAV,
              escape_digits='',
              timeout=-1,
              sample_offset=0,
              beep=True,
              silence=None):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self, 'RECORD FILE', quote(filename), quote(format),
                      quote(escape_digits), quote(timeout),
                      quote(sample_offset),
                      (beep and quote('beep') or None),
                      (silence and quote('s=' + str(silence)) or None))
Exemplo n.º 6
0
 def __init__(self, application, options=()):
     self._application = application
     options = ','.join((str(o or '') for o in options))
     _Action.__init__(self, 'EXEC', self._application, (options and quote(options)) or '')
Exemplo n.º 7
0
 def __init__(self, family, key):
     _Action.__init__(self, 'DATABASE GET', quote(family), quote(key))
Exemplo n.º 8
0
 def __init__(self, filename, escape_digits='', sample_offset=0, forward='', rewind='', pause=''):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self, 'CONTROL STREAM FILE', quote(filename),
      quote(escape_digits), quote(sample_offset),
      quote(forward), quote(rewind), quote(pause)
     )
Exemplo n.º 9
0
 def __init__(self, family, key):
     _Action.__init__(self, 'DATABASE GET', quote(family), quote(key))
Exemplo n.º 10
0
 def __init__(self, application, options=()):
     options = ','.join((str(o or '') for o in options))
     _Action.__init__(self, 'EXEC', application,
                      (options and quote(options)) or '')
Exemplo n.º 11
0
 def __init__(self, channel=None):
     _Action.__init__(self, 'CHANNEL STATUS', (channel and quote(channel))
                      or None)
Exemplo n.º 12
0
 def __init__(self, timeout=0):
     _Action.__init__(self, 'RECEIVE TEXT', quote(timeout))
Exemplo n.º 13
0
 def __init__(self, text):
     _Action.__init__(self, 'SEND TEXT', quote(text))
Exemplo n.º 14
0
 def __init__(self, channel=None):
     _Action.__init__(self, 'HANGUP', (channel and quote(channel) or None))
Exemplo n.º 15
0
 def __init__(self):
     _Action.__init__(self, 'NOOP')
Exemplo n.º 16
0
 def __init__(self, variable):
     _Action.__init__(self, 'GET VARIABLE', quote(variable))
Exemplo n.º 17
0
 def __init__(self, filename, escape_digits='', timeout=2000):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self, 'GET OPTION', quote(filename),
                      quote(escape_digits), quote(timeout))
Exemplo n.º 18
0
 def __init__(self, filename, timeout=2000, max_digits=255):
     _Action.__init__(self, 'GET DATA', quote(filename), quote(timeout),
                      quote(max_digits))
Exemplo n.º 19
0
 def __init__(self, timeout=0):
     _Action.__init__(self, 'RECEIVE TEXT', quote(timeout))
Exemplo n.º 20
0
 def __init__(self, extension):
     _Action.__init__(self, 'SET EXTENSION', quote(extension))
Exemplo n.º 21
0
 def __init__(self, say_type, argument, escape_digits, *args):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self,
      'SAY ' + say_type, quote(argument), quote(escape_digits), *args
     )
Exemplo n.º 22
0
 def __init__(self, filename, escape_digits='', sample_offset=0):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self,
      'STREAM FILE', quote(filename),
      quote(escape_digits), quote(sample_offset)
     )
Exemplo n.º 23
0
 def __init__(self, say_type, argument, escape_digits, *args):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self, 'SAY ' + say_type, quote(argument),
                      quote(escape_digits), *args)
Exemplo n.º 24
0
 def __init__(self, family, key, value):
     _Action.__init__(self, 'DATABASE PUT', quote(family), quote(key),
                      quote(value))
Exemplo n.º 25
0
 def __init__(self, priority):
     _Action.__init__(self, 'SET PRIORITY', quote(priority))
Exemplo n.º 26
0
 def __init__(self, filename):
     _Action.__init__(self, 'SEND FILE', quote(filename))
Exemplo n.º 27
0
 def __init__(self, message, level=LOG_INFO):
     _Action.__init__(self, 'VERBOSE', quote(message), quote(level))
Exemplo n.º 28
0
 def __init__(self, text):
     _Action.__init__(self, 'SEND TEXT', quote(text))
Exemplo n.º 29
0
 def __init__(self, channel=None):
     _Action.__init__(self, 'CHANNEL STATUS', (channel and quote(channel)) or None)
Exemplo n.º 30
0
 def __init__(self, seconds=0):
     _Action.__init__(self, 'SET AUTOHANGUP', quote(seconds))
Exemplo n.º 31
0
 def __init__(self, family, keytree=None):
     _Action.__init__(self,
      'DATABASE DELTREE', quote(family), (keytree and quote(keytree) or None)
     )
Exemplo n.º 32
0
 def __init__(self, filename, escape_digits='', timeout=2000):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self,
      'GET OPTION', quote(filename),
      quote(escape_digits), quote(timeout)
     )
Exemplo n.º 33
0
 def __init__(self, family, key, value):
     _Action.__init__(self, 'DATABASE PUT', quote(family), quote(key), quote(value))
Exemplo n.º 34
0
 def __init__(self, channel=None):
     _Action.__init__(self, 'HANGUP', (channel and quote(channel) or None))
Exemplo n.º 35
0
 def __init__(self, filename, timeout=2000, max_digits=255):
     _Action.__init__(self,
      'GET DATA', quote(filename), quote(timeout), quote(max_digits)
     )
Exemplo n.º 36
0
 def __init__(self, family, keytree=None):
     _Action.__init__(self, 'DATABASE DELTREE', quote(family),
                      (keytree and quote(keytree) or None))
Exemplo n.º 37
0
 def __init__(self, variable):
     _Action.__init__(self, 'GET VARIABLE', quote(variable))
Exemplo n.º 38
0
 def __init__(self, context):
     _Action.__init__(self, 'SET CONTEXT', quote(context))
Exemplo n.º 39
0
 def __init__(self):
     _Action.__init__(self, 'NOOP')
Exemplo n.º 40
0
 def __init__(self, extension):
     _Action.__init__(self, 'SET EXTENSION', quote(extension))
Exemplo n.º 41
0
 def __init__(self, on, moh_class=None):
     _Action.__init__(self, 'SET MUSIC', quote(on and 'on' or 'off'),
                      (moh_class and quote(moh_class) or None))
Exemplo n.º 42
0
 def __init__(self, priority):
     _Action.__init__(self, 'SET PRIORITY', quote(priority))
Exemplo n.º 43
0
 def __init__(self, filename):
     _Action.__init__(self, 'SEND FILE', quote(filename))
Exemplo n.º 44
0
 def __init__(self, name, value):
     _Action.__init__(self, 'SET VARIABLE', quote(name), quote(value))
Exemplo n.º 45
0
 def __init__(self, seconds=0):
     _Action.__init__(self, 'SET AUTOHANGUP', quote(seconds))
Exemplo n.º 46
0
 def __init__(self, filename, escape_digits='', sample_offset=0):
     escape_digits = _process_digit_list(escape_digits)
     _Action.__init__(self, 'STREAM FILE', quote(filename),
                      quote(escape_digits), quote(sample_offset))
Exemplo n.º 47
0
 def __init__(self, context):
     _Action.__init__(self, 'SET CONTEXT', quote(context))
Exemplo n.º 48
0
 def __init__(self, mode):
     _Action.__init__(self, 'TDD MODE', mode)
Exemplo n.º 49
0
 def __init__(self, on, moh_class=None):
     _Action.__init__(self,
      'SET MUSIC', quote(on and 'on' or 'off'),
      (moh_class and quote(moh_class) or None)
     )
Exemplo n.º 50
0
 def __init__(self, message, level=LOG_INFO):
     _Action.__init__(self, 'VERBOSE', quote(message), quote(level))
Exemplo n.º 51
0
 def __init__(self, name, value):
     _Action.__init__(self, 'SET VARIABLE', quote(name), quote(value))
Exemplo n.º 52
0
 def __init__(self, timeout=-1):
     _Action.__init__(self, 'WAIT FOR DIGIT', quote(timeout))
Exemplo n.º 53
0
 def __init__(self, mode):
     _Action.__init__(self, 'TDD MODE', mode)
Exemplo n.º 54
0
 def __init__(self):
     _Action.__init__(self, 'ANSWER')
Exemplo n.º 55
0
 def __init__(self, timeout=-1):
     _Action.__init__(self, 'WAIT FOR DIGIT', quote(timeout))
Exemplo n.º 56
0
 def __init__(self):
     _Action.__init__(self, 'ANSWER')