def handle(self, *args, **options):

        import_cdr_freeswitch_mongodb(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_freeswitch_mongodb(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.LOCAL_SWITCH_TYPE == 'asterisk':
                import_cdr_backend(backend=settings.CDR_BACKEND)
        elif settings.LOCAL_SWITCH_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
Esempio n. 5
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. 6
0
    def run(self, **kwargs):
        logger = self.get_logger()
        logger.info('TASK :: sync_cdr_pending')

        if settings.LOCAL_SWITCH_TYPE == 'asterisk':

            if settings.ASTERISK_IMPORT_TYPE == 'mysql':
                # Import from Asterisk Mysql
                import_cdr_asterisk_mysql()

        elif settings.LOCAL_SWITCH_TYPE == 'freeswitch':
            # Import from Freeswitch Mongo
            import_cdr_freeswitch_mongodb()

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

        if settings.LOCAL_SWITCH_TYPE == 'asterisk':

            if settings.ASTERISK_IMPORT_TYPE == 'mysql':
                # Import from Asterisk Mysql
                import_cdr_asterisk_mysql()

        elif settings.LOCAL_SWITCH_TYPE == 'freeswitch':
            # Import from Freeswitch Mongo
            import_cdr_freeswitch_mongodb()

        return True