- Newest
- Most votes
- Most comments
Hlo,
Set Up the Recording Agent: This will be a "dummy" agent whose role is only to be part of the call to facilitate recording.
Create the Contact Flow: You need to create a contact flow in Amazon Connect that will initiate the conference call and ensure the recording is enabled for this call.
Add a Task to Invite the Recording Agent: Use the Invoke AWS Lambda function block to create a task that invites the recording agent to join the call.
Conference Call Setup: Configure your contact flow to set up a three-party conference call, including the actual agent, the customer, and the recording agent.
Here are the steps in detail:
Step 1: Set Up the Recording Agent
Create an agent in Amazon Connect solely for the purpose of recording calls.
Ensure this agent has the necessary permissions and is always available to join calls.
Step 2: Create the Contact Flow
Go to the Amazon Connect dashboard and create a new contact flow.
In the contact flow, set up the initial blocks to handle the inbound call, including a Set Recording block to ensure that calls are recorded.
Step 3: Add a Task to Invite the Recording Agent
Use the Invoke AWS Lambda function block to create a Lambda function that will handle the logic of inviting the recording agent.
The Lambda function should use the Amazon Connect API to invite the recording agent to the call.
Step 4: Configure the Conference Call
Once the recording agent is invited, use the Transfer to Phone Number block to add the external number (the actual agent) to the conference call.
Configure the Conference Call settings to ensure all parties (customer, recording agent, and actual agent) are included in the call.
Here is a simplified version of what the contact flow might look like:
Entry Point: Customer calls in.
Set Recording: Enable call recording.
Invoke Lambda Function: Add the recording agent to the call.
Transfer to Phone Number: Add the external number (actual agent) to the call.
Conference Call: Merge the customer, recording agent, and actual agent into a three-party call.
import json
import boto3
connect_client = boto3.client('connect')
def lambda_handler(event, context):
instance_id = 'your-connect-instance-id'
contact_id = event['Details']['ContactData']['ContactId']
recording_agent_phone = '+1234567890' # Recording agent's phone number
try:
response = connect_client.start_outbound_voice_contact(
DestinationPhoneNumber=recording_agent_phone,
ContactFlowId='your-contact-flow-id', # Contact flow for the recording agent
InstanceId=instance_id,
SourcePhoneNumber='your-source-phone-number',
Attributes={
'contact_id': contact_id
}
)
return {
'statusCode': 200,
'body': json.dumps('Successfully added recording agent to call')
}
except Exception as e:
return {
'statusCode': 500,
'body': json.dumps(f'Error adding recording agent to call: {str(e)}')
}
You can do this with a custom CCP using streams, where the desktop automatically conferences in the external number. Another option would be to move this call to Chime SDK, personally I think this would be the easier path. This is not the blog post I was thinking about, but I think it’s a good start https://aws.amazon.com/blogs/business-productivity/building-an-on-demand-phone-call-recording-solution-with-amazon-chime-sdk/
david
Relevant content
- asked 2 years ago
- Accepted Answerasked 2 years ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago