diff --git a/vocode/streaming/action/transfer_call.py b/vocode/streaming/action/transfer_call.py index 397dd7a4ef..2fe270024e 100644 --- a/vocode/streaming/action/transfer_call.py +++ b/vocode/streaming/action/transfer_call.py @@ -104,13 +104,14 @@ async def transfer_call(self, twilio_call_sid: str, to_phone: str): payload = {"Twiml": twiml_data} - async with AsyncRequestor().get_session() as session: - async with session.post(url, data=payload, auth=twilio_client.auth) as response: - if response.status != 200: - logger.error(f"Failed to transfer call: {response.status} {response.reason}") - raise Exception("failed to update call") - else: - return await response.json() + async with AsyncRequestor().get_session().post( + url, data=payload, auth=twilio_client.auth + ) as response: + if response.status != 200: + logger.error(f"Failed to transfer call: {response.status} {response.reason}") + raise Exception("failed to update call") + else: + return await response.json() async def run( self, action_input: ActionInput[TransferCallParameters]