Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sending Faxes to SIP Destinations

Use Twilio's REST API to send faxes to your SIP-enabled endpoints. If you are unfamiliar with SIP, or want more information on how Twilio works with your SIP endpoint, please see the SIP overview.

HTTP POST to Faxes

Initiate SIP sessions via the REST API by POSTing to the same faxes resource used to initiate traditional fax sessions (see sending faxes for more information). For example, send a fax over SIP by POSTing to your account's fax list resource URI:

https://fax.twilio.com/v1/Faxes

POST Parameters

All outgoing fax features and parameters are supported -- the only difference is that you pass different values in the To and From parameters. In the To parameter, put the SIP URI you are trying to connect to. In the From parameter, specify the user you want to show up in the From header in the SIP request.

Required Parameters

Parameter Description
To The SIP URI to which you want to send the fax (📇 PII MTL: 120 days)

The To parameter specifies a SIP address for Twilio to connect to. The body of the URI element should be a valid SIP URI under 256 characters. For example:

sip:michael@example.com
Headers

Pass headers in the To parameter by appending them to the end of the SIP URI. For certain helper libraries, "&" will need to be encoded as %26 (please see the documentation for the library you are using). The total characters passed in a header must be under 1024. For example:

sip:michael@example.com?mycustomheader=foo&myotherheader=bar
Transport

Set a parameter on your SIP URI to specify what transport protocol you want to use. Currently, this is limited to TCP and UDP. By default, Twilio sends your SIP INVITE over UDP. Change this by using the transport parameter:

sip:jack@example.com;transport=tcp

Optional Parameters

Parameter Description
From This value is used to populate the username portion of the From header that is passed to the SIP endpoint. This may be any alphanumeric character, as well as the plus, minus, underscore, and period characters (+-_.). No spaces or other characters are allowed. (📇 PII MTL: 120 days)
SipAuthUsername Your authentication username (max 256 characters). (🏢 not PII)
SipAuthPassword The password for the user (max 256 characters). (🏢 not PII)

Examples

Example 1

Send a Fax Using SIP.

        
        
        
        
        Example 2

        Pass user and password for authentication.

              
              
              
              
              Example 3

              Pass headers and parameters as part of the SIP URI.

                    
                    
                    
                    
                    Rate this page:

                    Need some help?

                    We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.