

# Understanding SIP integration using an Amazon Chime SDK Voice Connector
<a name="mtgs-sdk-cvc"></a>

Integrate your SIP-compatible voice infrastructure with an Amazon Chime SDK Voice Connector to make SIP voice calls. You must use the `us-east-1` or `us-east-2` Regions. You must have an IP Private Branch Exchange (PBX), Session Border Controller (SBC), or other voice infrastructure with internet access that supports Session Initiation Protocol (SIP). For more information, see [Before you begin](https://docs.aws.amazon.com/chime-sdk/latest/ag/voice-connectors.html#vc-prereq) in the *Amazon Chime SDK Administrator Guide*.

**To integrate your voice infrastructure**

1. Create an Amazon Chime SDK Voice Connector under your AWS account. For more information, see [Creating an Amazon Chime SDK Voice Connector](https://docs.aws.amazon.com/chime-sdk/latest/ag/voice-connectors.html#create-voicecon) in the *Amazon Chime SDK Administrator Guide*.

1. Edit your Amazon Chime SDK Voice Connector settings to allow calling from your voice infrastructure to AWS. For more information, see [Editing Amazon Chime SDK Voice Connector settings](https://docs.aws.amazon.com/chime-sdk/latest/ag/voice-connectors.html#edit-voicecon) in the *Amazon Chime SDK Administrator Guide*.

   1. For **Termination settings**, select **Enabled**.

   1. For **Allowlist**, choose **New**.

   1. Enter the CIDR notations of the IP addresses for your internal SIP infrastructure. This allows your infrastructure to access the Amazon Chime SDK Voice Connector. For example, to allow traffic from IP address `10.24.34.0`, allowlist the CIDR notation `10.24.34.0/32`.

   1. Choose **Add**.

   1. For **Calling plan**, select the country or countries to add to your calling plan.

   1. Edit any other settings as needed, and choose **Save**.

1. In the Amazon Chime SDK console, under **Voice connectors**, view the **Outbound host name** for your Amazon Chime SDK Voice Connector. For example, *abcdef1ghij2klmno3pqr4*.voiceconnector.chime.aws. 

1. To join a meeting using the Amazon Chime SDK, use a SIP URI to make a SIP request to the **Outbound host name** of your Amazon Chime SDK Voice Connector. Use phone number **\$117035550122** in the SIP URI. Set the `transport` parameter to use the TLS protocol. Finally, use the unique join token generated by calling the [https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateAttendee.html](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateAttendee.html) API action. For more information, see the following example.

**Example: SIP request**  
The following example shows the contents of a SIP URI used to make a SIP request to an Amazon Chime SDK Voice Connector.  

```
sip:+17035550122@abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws;transport=tls;X-chime-join-token=join-token
```
The following example shows a sample SIP INVITE message to join an Amazon Chime SDK meeting.  

```
INVITE sip:+17035550122@abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws;transport=tls;X-chime-join-token=join-token SIP/2.0
Via: SIP/2.0/TLS IPaddress:12345;rport;branch=branch;alias
Max-Forwards: 70
From: sip:+12065550100@IPaddress;tag=tag
To: sip:+17035550122@abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws;X-chime-join-token=join-token
Contact: <sip:+12065550100@IPaddress:54321;transport=TLS;ob>
Call-ID: a1234567-89b0-1c2d-e34f-5gh678j9k2lm
CSeq: 6214 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length:   991

v=0
o=- 3775321410 3775321410 IN IP4 IPaddress
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4000 RTP/SAVP 0 3 8 9 125 101
c=IN IP4 IPaddress
b=TIAS:96000
a=rtcp:4001 IN IP4 IPaddress
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:125 opus/48000/2
a=fmtp:125 useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=crypto:1 AEAD_AES_256_GCM inline:EXAMPLE
a=crypto:2 AEAD_AES_256_GCM_8 inline:EXAMPLE
a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:EXAMPLE
a=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:EXAMPLE
a=crypto:5 AES_CM_128_HMAC_SHA1_80 inline:EXAMPLE
a=crypto:6 AES_CM_128_HMAC_SHA1_32 inline:EXAMPLE
```

**Note**  
The Amazon Chime SDK recognizes phone numbers only in E.164 format. Make sure that an E.164 phone number is in your `From` header.