ozkartoro
10/02/2025, 6:37 PMAI Evy
10/02/2025, 6:37 PMAI Evy
10/02/2025, 6:37 PMcall_analysis que incluye el call_summary [(2) ]() [(3) ]() [(4) ]() [(1) ]() .
Puedes usar el endpoint GET para obtener los detalles de una llamada específica [(1) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
La respuesta incluirá el objeto call_analysis con el call_summary [(2) ]() [(3) ]() [(4) ]() [(1) ]() :
json
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry. The agent asked several questions regarding his preference and asked if user would like to book an appointment. The user happily agreed and scheduled an appointment next Monday 10am.",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
}AI Evy
10/02/2025, 6:37 PMcall_analyzed para recibir esta información una vez que esté lista .
Para configurar análisis personalizados adicionales, puedes definir qué información extraer usando diferentes tipos de análisis como Boolean, Text, Number, o Selector Analysis [(5) ]() .AI Evy
10/02/2025, 6:37 PMAI Evy
10/02/2025, 6:37 PMAI Evy
10/02/2025, 6:38 PMozkartoro
10/02/2025, 6:38 PMAI Evy
10/02/2025, 6:38 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.registerPhoneCall({
agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
console.log(phoneCallResponse.agent_id) ;
[(2) ]()
Cada llamada incluye timestamps importantes para tu reporte [(3) ]() :
- `start_timestamp`: marca de tiempo de inicio (en milisegundos desde epoch)
- `end_timestamp`: marca de tiempo de fin (en milisegundos desde epoch)
- `duration_ms`: duración de la llamada en milisegundos
El objeto de respuesta también incluye el call_analysis con el call_summary que necesitas para tu reporte :
json
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry. The agent asked several questions regarding his preference and asked if user would like to book an appointment. The user happily agreed and scheduled an appointment next Monday 10am.",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
}
Para automatizar la recolección de datos, puedes configurar webhooks que se activen automáticamente cuando las llamadas terminen y el análisis esté listo [(4) ]() . El evento call_analyzed te enviará toda la información incluyendo el call_analysis completo .AI Evy
10/02/2025, 6:38 PMAI Evy
10/02/2025, 6:38 PM