new-site/scripts/workers/cdr_presets/broadworks.py
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

30 lines
1 KiB
Python

"""Cisco BroadWorks preset — OCS web UI / SOAP hybrid.
BroadWorks exposes CDRs via several mechanisms — SOAP OCI-P, OSS push to
an SFTP dropoff, or manual CSV download from the OCS web portal. The
simplest cross-deployment path is the OCS web UI scrape (CSV export
button on the "CDR File Delivery" page). SOAP / OCI-P can be added later
if a deployment only allows programmatic access.
"""
from __future__ import annotations
from ._scrape_base import ScrapePreset
class BroadWorksPreset(ScrapePreset):
PRESET_SLUG = "broadworks"
LABEL = "Cisco BroadWorks (OCS)"
CDR_FORMAT = "generic_csv"
DEFAULT_CRON = "0 3 * * *"
FORMAT_CONFIG = {
"start_time": "startTime",
"caller_number": "callingNumber",
"called_number": "calledNumber",
"duration_sec": "releaseTime", # computed (release - answer) in custom map
"call_id": "correlationId",
"trunk_group": "trunkGroup",
"disposition": "releaseCauseKey",
"ts_format": "%Y-%m-%dT%H:%M:%S",
}