---title: Setting Up a SIP Endpointdescription: This guide will show how you can create a sip endpoint and register it to a SignalWire phone number for handling incoming calls or dial it via an XML Bin.slug: /guides/set-up-a-signalwire-phone-number-with-a-sip-endpointsidebar_position: 0x-custom: ported_from_readme: true---Create a SIP Endpoint---------------------You can create a SIP endpoint manually within your SignalWire space or programmatically through the [Create A SIP Endpoint API](pathname:///rest/create-a-sip-endpoint). If you want to create a SIP endpoint in your SignalWire Space, click the **SIP** tab in the left-hand side nav and click **Create a Sip Endpoint**. You will need to set a few things; the username you will register your SIP endpoint as, a password to authenticate your endpoint when registering, what purchased from SignalWire or SignalWire verified phone number you would like to show when dialing a PSTN number (if left blank, a random number from your purchased numbers will be chosen), encryption status, and the default codecs/ciphers you would like to use. You can create a SIP endpoint programmatically by making a POST request to the SIP Endpoint resource. curlcurl https://your-space.signalwire.com/api/relay/rest/endpoints/sip \ -X POST \ -u YourProjectID:YourAuthToken \ -H Content-Type: application/json \ -d { username : c3p0, password : yavinOrBust, caller_id : C-3P0 }Register SIP Endpoint to a SignalWire Phone Number--------------------------------------------------After creating a SIP Endpoint, you can register it to a phone number in the space for calls to function properly. Navigate to the **Phone Numbers** tab on the left-hand side nav, click the phone number that you would like to register, and then click edit settings to make changes to how the phone number will handle inbound calls and messages. Here you will select Voice Calls for **Accept Incoming Calls As**, a SIP Endpoint for **Handle Calls Using** and you will need to use your sip username from earlier so that the system knows which endpoint to dial. Click Save, and you are ready to make a call to your SIP endpoint!Dial a SIP Endpoint Using SignalWire Compatibility XML---------------------------------------------------You can also use [SignalWire Compatibility XML](/compatibility-api/xml/index.mdx) to dial a SIP endpoint. To do this, use an XML Bin with the following XML in the text area and replace **alice@example.com** with the actual sip endpoint address that was created above. xmlsip:alice@example.comThis time in **Phone Number Settings** you will select Voice Calls for **Accept Incoming Calls As**, LaML Webhooks for **Handle Calls Using** and the URL for your LaML Bin created above for **When a Call Comes In**. Click Save and give it a call!