def init_dirs(): global globals4signal # # set up logging. # logdir = dsh_config.lookup('log_file_dir') logName = dsh_config.lookup('log_file_name') dsh_utils.check_logging(logdir, logName) dsh_utils.give_news('dsh_simple1: entered --------------------', logging.info) # # set up directories. # success,outDir,inDir = setup_dirs() if not success: return (False,None,None,None) dsh_utils.db_print('dsh_simple1.init_dirs: ' + 'outdir: ' + outDir + ', indir: ' + inDir, 94) # # check existence of output file. # outFile = dsh_config.lookup('outgoing_voice_file') outFile = os.path.join(outDir, outFile) if not sound_exists(outFile): return (False,None,None,None) dsh_utils.db_print('dsh_simple1.init_dirs: ' + 'outFile: ' + outFile, 94) globals4signal['log_dir'] = logdir return (True,inDir,outDir,outFile)
def init_log(): """set up logging.""" logdir = dsh_config.lookup('log_file_dir') logName = dsh_config.lookup('log_file_name') dsh_utils.check_logging(logdir, logName) dsh_utils.give_news('dsh_load: entered --------------------', logging.info)
def init_log(): global globals4signal # # set up logging. # logdir = dsh_config.lookup('log_file_dir') logName = dsh_config.lookup('log_file_name') dsh_utils.check_logging(logdir, logName) dsh_utils.give_news('dsh_django1: entered --------------------', logging.info) #dsh_agi.debug_event('dsh_django1: entered --------------------', 97) globals4signal['log_dir'] = logdir
def main(): prefix = dsh_config.lookup('log_file_dir') logName = dsh_config.lookup('log_file_name') dsh_utils.check_logging(prefix, logName) dsh_utils.db_print('dsh_test1: entered...', 93) dsh_agi.read_env() testOut1 = prefix + 'test_out1' testOut2 = prefix + 'test_tanuja' testIn1 = prefix + 'test_in1' dsh_agi.say_it(testOut1) #dsh_agi.say_it(testOut2) #dsh_agi.say_it('/var/lib/asterisk/sounds/demo-congrats') dsh_agi.record(testIn1) dsh_agi.say_it(testIn1) dsh_utils.give_news('dsh_test1: done.')
def init_log(): logdir = dsh_config.lookup('log_file_dir') logName = dsh_config.lookup('log_file_name') dsh_utils.check_logging(logdir, logName)