Esempio n. 1
0
    def handle(self, *args, **options):

        import_cdr_asterisk(shell=True)

        # Apply index on collection
        if options['apply-index']:
            print "\nWe are going to apply index..."
            apply_index(shell=True)
Esempio n. 2
0
    def handle(self, *args, **options):

        import_cdr_asterisk(shell=True)

        # Apply index on collection
        if options['apply-index']:
            print "\nWe are going to apply index..."
            apply_index(shell=True)
Esempio n. 3
0
    def run(self, **kwargs):
        logger = self.get_logger()
        logger.info('TASK :: sync_cdr_pending')

        if settings.CDR_BACKEND[settings.LOCAL_SWITCH_IP]['cdr_type'] == 'asterisk':
            # Import from Asterisk
            import_cdr_asterisk()

        elif settings.CDR_BACKEND[settings.LOCAL_SWITCH_IP]['cdr_type'] == 'freeswitch':
            # Import from Freeswitch Mongo
            import_cdr_freeswitch_mongodb()

        return True
Esempio n. 4
0
    def run(self, **kwargs):
        logger = self.get_logger()
        logger.info('TASK :: sync_cdr_pending')

        if settings.CDR_BACKEND[settings.LOCAL_SWITCH_IP]['cdr_type'] == 'asterisk':
            # Import from Asterisk
            import_cdr_asterisk()

        elif settings.CDR_BACKEND[settings.LOCAL_SWITCH_IP]['cdr_type'] == 'freeswitch':
            # Import from Freeswitch Mongo
            import_cdr_freeswitch_mongodb()

        return True