- Newest
- Most votes
- Most comments
Hi Syed,
Thanks for bringing up this question—outbound SIP communication is an important scenario, and it's great that you're exploring Amazon Chime SDK for it. Let’s walk through the best approach together.
Clarifying the Issue
You’re looking for recommendations on how to set up outbound SIP calls using AWS, specifically if there’s an API, SDK, or AWS service to facilitate this.
Key Terms
- SIP (Session Initiation Protocol): A signaling protocol for initiating and managing communication sessions, like voice and video calls.
- Amazon Chime SDK: Tools for adding real-time voice, video, and messaging capabilities to applications.
- Outbound SIP Communication: Making SIP calls from AWS services to external SIP endpoints.
The Solution (Our Recipe)
To implement outbound SIP calls using AWS, follow these high-level steps:
-
Leverage Amazon Chime Voice Connector:
- Amazon Chime Voice Connector provides SIP trunking capabilities for handling outbound calls.
- Start by provisioning an Amazon Chime Voice Connector in the AWS Management Console.
-
Use the Chime SDK Voice Connector API:
- The API enables outbound calls to SIP endpoints. It integrates seamlessly with your infrastructure to send calls externally.
-
Configure SIP Trunking and Routing:
- If you're using a third-party SIP trunk provider, connect it to Amazon Chime Voice Connector.
- Set up routing rules, encryption (TLS), and SIP endpoint credentials for secure communication.
-
Monitoring and Logging:
- Enable AWS CloudWatch for monitoring and logging. SIP message logging can help troubleshoot signaling issues.
Real-World Example
Imagine a customer support call center that needs to route outbound calls through a SIP-based VoIP system. By integrating Amazon Chime Voice Connector with their existing SIP infrastructure, they can:
- Initiate outbound calls securely using AWS APIs.
- Scale dynamically to handle varying call volumes.
- Monitor call performance and troubleshoot easily with CloudWatch logs.
This approach ensures flexibility and scalability without overhauling the existing infrastructure.
Closing Thoughts
The best solution will depend on your budget and existing infrastructure. The Amazon Chime SDK Voice Connector API is a solid foundation, and AWS offers tools like Amazon Connect if you need additional workflow capabilities.
Best of luck with your setup, Syed! Let me know if you need more details. 😊
Cheers, Aaron 🚀
Hi Syed,
Let's dive into your follow-up question regarding SIP-based conference calls.
Clarifying the Issue
Your use case involves initiating a SIP-based conference call during an ongoing call. This conference call must include all participants and support custom SIP headers, such as a contact ID, to integrate seamlessly with their application.
Key Terms
- SIP Custom Headers: Extensions to SIP messages for carrying additional metadata, like contact IDs, during communication.
- Conference Call Setup: Bringing multiple participants together into a single call session, managed through signaling protocols like SIP.
- Amazon Chime Voice Connector: AWS service providing SIP trunking for real-time voice communication.
The Solution (Our Recipe)
1. Use Amazon Chime Voice Connector for SIP Calls
- Amazon Chime Voice Connector supports custom SIP headers. Use its capabilities to manage outbound and conference calls.
- During your ongoing call, programmatically trigger the Voice Connector to add participants via an API.
2. Implement SIP Header Customization
- Customize the SIP INVITE messages sent through Amazon Chime Voice Connector by including headers such as
Contact-ID. - Configure your SIP signaling logic to handle these headers. For instance, when creating the API request for the Voice Connector, ensure the
Contact-IDis included in theP-Asserted-Identityor similar header fields.
3. API Workflow
- Use the Chime SDK Voice Connector API to manage call states and trigger the addition of participants into a conference session.
- For SIP headers, leverage the
Additional Headersparameter in your API request payload. This is where custom headers can be passed during the call setup.
4. Conference Call Management
- Handle the logic for merging participants into a conference using a SIP bridge or your PBX system integrated with Amazon Chime Voice Connector.
- If you’re using a SIP PBX, ensure that it supports dynamic conference creation and customization through SIP signaling.
5. Testing and Monitoring
- Test the custom headers and conference logic using tools like
sngrepor Wireshark to verify SIP signaling and header propagation. - Enable CloudWatch logs for troubleshooting API calls and monitoring the success of conference call setups.
Real-World Scenario
For example, in a customer support workflow, an agent might be on a call with a customer and need to bring in a supervisor for escalation. By invoking the Amazon Chime Voice Connector API with custom headers (e.g., Contact-ID: 12345), the SIP bridge can dynamically add the supervisor to the ongoing call without interrupting the session.
Closing Thoughts
This setup aligns with AWS’s SIP capabilities while supporting custom header requirements. If additional features like IVR or enhanced call controls are needed, consider integrating Amazon Connect for advanced workflow capabilities. Syed, feel free to reach out if you encounter specific challenges or need deeper insights into any step! 😊
Best regards,
Aaron 🚀
answered 2 years ago
Hi Aaron,
Thankyou so much for your insights, we have been trying to implement your proposed solution. The thing we are currently stuck is, how do we include chime SDK on an ongoing call on Amazon connect. Can you share some insights there, the call will land on Amazon connect flow then an agent will be requested once the agent is connected at that point we need to initiate the conference and add our service as a third participant in the call.
answered 2 years ago
Setting Up Conference Calls with Amazon Chime SDK and Amazon Connect
Hi Syed,
Thank you for the detailed follow-up. You're looking to include the Amazon Chime SDK in an ongoing Amazon Connect call flow to initiate a conference and add your service as a third participant. Let’s dive into this use case and walk through the solution.
Clarifying the Issue
Your goal is to:
- Initiate a conference call within an ongoing Amazon Connect call.
- Add a service as a third participant using SIP with custom headers.
- Maintain seamless integration between Amazon Connect, Chime SDK, and your service.
This involves merging Amazon Connect's agent-based call flow with the SIP-based conference setup via Amazon Chime Voice Connector.
Key Components
- Amazon Connect: AWS contact center solution handling the initial inbound call and agent connection.
- Amazon Chime SDK + Voice Connector: Manages SIP-based conference calls and supports custom headers.
- Custom Lambda Function: Acts as the integration point for invoking the Chime Voice Connector during the ongoing Amazon Connect call.
The Solution
1. Modify the Amazon Connect Contact Flow
Ensure your contact flow includes:
- Initial Call Setup: The inbound call lands and connects to an agent.
- Invoke Lambda Function: Use a
Set Contact Attributesblock to trigger a Lambda function when the agent is connected and ready to initiate the conference.
2. Trigger Conference Call Using Lambda and Chime Voice Connector API
The Lambda function will:
- Extract Call Information: Get call metadata (like the agent's and customer's phone numbers) from Amazon Connect.
- Initiate a SIP Call via Chime SDK Voice Connector:
- Use the Voice Connector API to establish a SIP session.
- Include custom headers such as
Contact-IDin the API request. These can be set in theAdditionalHeadersfield.
Example of the Lambda Function’s Core Logic:
import boto3 client = boto3.client('chime-sdk-voice') def lambda_handler(event, context): response = client.create_sip_media_application_call( FromPhoneNumber='<agent_phone_number>', # Replace with Amazon Connect agent's number ToPhoneNumber='<external_phone_number', # Replace with the external service number SipHeaders={ 'Contact-ID': '12345', # Custom header }, SipMediaApplicationId='your-sip-media-application-id' ) return response
3. Bridge the Conference Call
Once the SIP session is initiated:
- Use Amazon Chime Voice Connector to bridge the original Amazon Connect call with the SIP session. This creates a seamless conference experience.
- Ensure your SIP signaling logic supports adding the external service as a third participant.
4. Custom SIP Header Integration
To include custom SIP headers, make sure:
- Your external service can parse headers like
Contact-IDfor integration-specific logic. - These headers are included in the SIP
INVITEmessages from the Chime Voice Connector.
Monitoring and Troubleshooting
- CloudWatch Logs: Enable logs for both Amazon Connect and the Lambda function to monitor the flow.
- SIP Signaling Tools: Use tools like Wireshark or sngrep to analyze SIP signaling and ensure headers are correctly propagated.
- API Response: Check the API call response from Chime SDK Voice Connector for successful execution.
Real-World Example
A customer calls into an Amazon Connect contact center and is routed to an agent. During the conversation, the agent identifies a need to add an external compliance officer to the call. The contact flow triggers a Lambda function, which invokes the Chime SDK Voice Connector to create a SIP-based conference. The compliance officer joins the call seamlessly, with custom headers like Contact-ID enabling precise call tracking in the organization's backend.
Closing Thoughts
This solution bridges Amazon Connect and the Chime SDK for a powerful, flexible integration. It supports custom headers and scales to handle additional participants if required. Syed, if you encounter challenges in SIP signaling, conference management, or API integration, feel free to reach out for more detailed guidance.
Best regards,
Aaron 🚀😊
answered 2 years ago
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated 5 months ago

Hello Aaron, Our use case involves initiating a conference call during an ongoing call, where all participants are connected. This conference call should be through SIP using an API, and it must include custom headers, such as a contact ID, to support our custom integration with our application.