πvCon Adapter Development Guide
Design patterns for adapter authors going beyond the template β custom architectures, listener shapes, multi-source merging, batch processing.
Listener shapes
Webhook receiver
from aiohttp import web
from foo_adapter.vcon_builder import new_vcon
from foo_adapter.webhook_delivery import WebhookDelivery
async def on_call_ended(request: web.Request) -> web.Response:
# 1. Validate the SOURCE's signature (NOT the same as your downstream HMAC)
if not verify_source_signature(request):
return web.Response(status=401)
event = await request.json()
# 2. Build the vCon
v = new_vcon(subject=event.get("title"))
v.add_party(tel=event["from"], role="caller")
v.add_party(tel=event["to"], role="agent")
v.add_dialog(
type="recording",
start=event["started_at"],
parties=[0, 1],
url=event["recording_url"],
mediatype="audio/wav",
)
# 3. Deliver downstream
await request.app["delivery"].deliver(v.vcon_dict)
return web.Response(status=200)Polling job
File watcher
Batch CLI
Multi-source adapters
Stitch in the adapter
Stitch downstream
Choosing where data lives in the vCon
What
Where
Why
When NOT to use the template
Validating what you built
Common pitfalls (real-world drift)
Further reading
Last updated
Was this helpful?