code: def sendDtmfTone(self, tones):
                  
          if self.answered:
              dtmfCommandBase = self.DTMF_COMMAND_BASE.format(cid=self.id)
              toneLen = len(tones)
              if len(tones) > 1:
                  cmd = ('AT{0}{1};{0}' + ';{0}'.join(tones[1:])).format(dtmfCommandBase, tones[0])                
              else:
                  cmd = 'AT{0}{1}'.format(dtmfCommandBase, tones)
              try:
                  self._gsmModem.write(cmd, timeout=(5 + toneLen))
              except CmeError as e:
                  if e.code == 30:
                      # No network service - can happen if call is ended during DTMF transmission (but also if DTMF is sent immediately after call is answered)
                      raise InterruptedException('No network service', e)
                  elif e.code == 3:
                      # Operation not allowed - can happen if call is ended during DTMF transmission
                      raise InterruptedException('Operation not allowed', e)
                  else:
                      raise e
          else:
              raise InvalidStateException('Call is not active (it has not yet been answered, or it has ended).')
docs: Send one or more DTMF tones to the remote party (only allowed for an answered call) 
          
          Note: this is highly device-dependent, and might not work
          
          :param digits: A str containining one or more DTMF tones to play, e.g. "3" or "\*123#"
  
          :raise CommandError: if the command failed/is not supported        
          :raise InvalidStateException: if the call has not been answered, or is ended while the command is still executing