[BUG] Trying to pass the call to another number which worked in the past and now it does not...
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
The report points to session.py:336 and the calls(...).update_async entry point, with Python 3.11 and twilio-python 9.4.6 or later. Start by reproducing the 404 while updating the call and compare the client request with the reported resource path. Done means the cause is isolated and the transfer update is covered by a regression test or a documented compatibility fix.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Escalating to another number is not working anymore.
Got the error:
amp_assist_api | 2025-07-22 11:35:24.144 - [ERROR]- backend_apibackend_api.agents.ultravox.session - session.py:336 - Error transferring call: HTTP 404 error: Unable to update record: The requested resource /2010-04-01/Accounts/AC02e7597cf9c9469d7f52c87dbf15753e/Calls/CAb9335eb22d8b19958ef20674ab8c9643.json was not found
Code snippet
from twilio.twiml.voice_response import Connect, VoiceResponse
self.twilio_client = Client(
username=settings.TWILIO_ACCOUNT_SID,
password=settings.TWILIO_AUTH_TOKEN,
http_client=AsyncTwilioHttpClient()
)
async def _transfer_to_live_agent(self):
"""Transfer an active call to the destination number."""
try:
logger.debug("Starting the transfer to a live agent")
# Create TwiML for transfer
response = VoiceResponse()
response.say("Please hold while we transfer you to a live agent.")
dial = Dial()
dial.number("+3519344455521")
response.append(dial)
await self.send_text(
text=(
"Live agent was just called. Please inform the user about it."
),
defer_response=False
)
# Empirical value, used to give time to the Ultravox model to
# inform the agent about the next move.
await asyncio.sleep(10)
logger.debug("About to update the twilio call")
# Update the call with new TwiML
try:
await self.twilio_client.calls(self._twilio_call_sid).update_async(
twiml=str(response)
)
logger.debug("Current Call object updated")
finally:
# Ensure we close the HTTP client session
await self.twilio_client.http_client.close()
# Properly close the Ultravox WebSocket connection
await self.leave_call()
except Exception as e:
logger.error(f"Error transferring call: {e}")
# Ensure we still try to close the connection even if there's an error
try:
await self.leave_call()
except Exception as close_error:
logger.error("Error during disconnect "
f"after transfer failure: {close_error}")
finally:
# Ensure we close the HTTP client session even if there's an error
try:
await self.twilio_client.http_client.close()
except Exception as close_error:
logger.error(f"Error closing HTTP client session: {close_error}")
Note that this is part of the code and includes the relevant portion
Actual behavior
Got the error:
amp_assist_api | 2025-07-22 11:35:24.144 - [ERROR]- backend_apibackend_api.agents.ultravox.session - session.py:336 - Error transferring call: HTTP 404 error: Unable to update record: The requested resource /2010-04-01/Accounts/AC02e7597cf9c9469d7f52c87dbf15753e/Calls/CAb9335eb22d8b19958ef20674ab8c9643.json was not found
Expected behavior
Call would get transferred as it did in the past
twilio-python version
at least at and above 9.4.6 wont work
Python version
3.11
Logs or error messages
Got the error:
amp_assist_api | 2025-07-22 11:35:24.144 - [ERROR]- backend_apibackend_api.agents.ultravox.session - session.py:336 - Error transferring call: HTTP 404 error: Unable to update record: The requested resource /2010-04-01/Accounts/AC02e7597cf9c9469d7f52c87dbf15753e/Calls/CAb9335eb22d8b19958ef20674ab8c9643.json was not found
Additional context
No response
- Lenguaje dominante
- Python
- Estrellas
- 2.1k
- Forks
- 814
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de twilio/twilio-python
-
AsyncTwilioHttpClient does not JSON-serialize request bodies for application/json endpoints (sync client does) → 400 on JSON-body v2 endpointsPosiblemente ocupada @Steve0x2a la tomó hace 31 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
twilio/twilio-python#932 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
twilio/twilio-python#930 ·
-
[BUG] AsyncTwilioHttpClient.request does not use self.timeoutPosiblemente ocupada @Hashim1999164 la tomó hace 51 días. Abiertotype: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
twilio/twilio-python#925 ·
-
Drop aiounittest test dependency (broken on Python 3.14)Posiblemente ocupada @sarteta la tomó hace 168 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
twilio/twilio-python#916 ·
-
Incorrect type annotation for line_type_intelligence in PhoneNumberInstance (Lookup v2)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
twilio/twilio-python#883 · 1 comentario ·
Todos los issues de twilio/twilio-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
modelcontextprotocol/python-sdk#3648 ·
Los mantenedores suelen responder en 1 día
-
docs good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
VenetoStato/giorgio#6 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Claiming namespace ddalusAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
EclipseFdn/open-vsx.org#13831 ·
Los mantenedores suelen responder en 1 día