Vonage (Nexmo) Voice AI Integration

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1 servicesAll 1566 services
Vonage (Nexmo) Voice AI Integration
Medium
from 1 week to 3 months
FAQ
AI Development Areas
AI Solution Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822

Vonage (Nexmo) Integration for Voice AI Vonage Voice API (formerly Nexmo) is a Twilio alternative with a Web

Socket API for real-time audio. Strengths: SIP support, good European coverage, competitive outgoing call rates. ### Vonage's integration architecture uses NCCO (Nexmo Call Control Objects) – JSON-based call control:```python from fastapi import FastAPI, Request from fastapi.responses import JSONResponse

app = FastAPI()

@app.get("/answer") async def answer_call(uuid: str, conversation_uuid: str): """NCCO для входящего звонка""" return JSONResponse([ { "action": "talk", "text": "Здравствуйте! Я голосовой ассистент.", "language": "ru-RU", "style": 4 }, { "action": "connect", "endpoint": [{ "type": "websocket", "uri": f"wss://api.yourapp.com/voice-stream/{uuid}", "content-type": "audio/l16;rate=16000", "headers": {"call_id": uuid} }] } ])

@app.post("/events") async def call_events(request: Request): data = await request.json() status = data.get("status") if status in ["completed", "failed"]: await cleanup_session(data.get("uuid")) return JSONResponse({"status": "ok"}) ### WebSocket handlerpython from fastapi import WebSocket

@app.websocket("/voice-stream/{call_id}") async def voice_stream(websocket: WebSocket, call_id: str): await websocket.accept() session = VoiceSession(call_id)

try:
    async for message in websocket.iter_bytes():
        # Vonage отправляет PCM 16-bit 16kHz
        pcm_audio = message

        # Обрабатываем аудио через наш AI pipeline
        response_text = await process_audio(pcm_audio, session)

        if response_text:
            audio_response = await synthesize(response_text)
            await websocket.send_bytes(audio_response)

except Exception as e:
    logger.error(f"WebSocket error: {e}")
finally:
    await session.finalize()

### Sending events and call controlpython import vonage

client = vonage.Client(key=VONAGE_KEY, secret=VONAGE_SECRET) voice = vonage.Voice(client)

def transfer_to_agent(call_uuid: str, agent_number: str): """Перевод на оператора""" voice.update_call(call_uuid, { "action": "transfer", "destination": { "type": "ncco", "ncco": [{ "action": "connect", "endpoint": [{"type": "phone", "number": agent_number}] }] } })