Class TrunkCreator

    • Constructor Detail

      • TrunkCreator

        public TrunkCreator()
    • Method Detail

      • setFriendlyName

        public TrunkCreator setFriendlyName​(String friendlyName)
        A descriptive string that you create to describe the resource. It can be up to 64 characters long..
        Parameters:
        friendlyName - A string to describe the resource
        Returns:
        this
      • setDomainName

        public TrunkCreator setDomainName​(String domainName)
        The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking/getting-started#termination) for more information..
        Parameters:
        domainName - The unique address you reserve on Twilio to which you route your SIP traffic
        Returns:
        this
      • setDisasterRecoveryUrl

        public TrunkCreator setDisasterRecoveryUrl​(URI disasterRecoveryUrl)
        The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking/getting-started#disaster-recovery) for more information..
        Parameters:
        disasterRecoveryUrl - The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
        Returns:
        this
      • setDisasterRecoveryUrl

        public TrunkCreator setDisasterRecoveryUrl​(String disasterRecoveryUrl)
        The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking/getting-started#disaster-recovery) for more information..
        Parameters:
        disasterRecoveryUrl - The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
        Returns:
        this
      • setDisasterRecoveryMethod

        public TrunkCreator setDisasterRecoveryMethod​(HttpMethod disasterRecoveryMethod)
        The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`..
        Parameters:
        disasterRecoveryMethod - The HTTP method we should use to call the disaster_recovery_url
        Returns:
        this
      • setRecording

        public TrunkCreator setRecording​(Trunk.RecordingSetting recording)
        The recording settings for the trunk. Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to `record-from-ringing` or `record-from-answer`, all calls going through the trunk will be recorded. The only way to change recording parameters is on a sub-resource of a Trunk after it has been created. e.g.`/Trunks/[Trunk_SID]/Recording -XPOST -d'Mode=record-from-answer'`. See [Recording](https://www.twilio.com/docs/sip-trunking/getting-started#recording) for more information..
        Parameters:
        recording - The recording settings for the trunk
        Returns:
        this
      • setSecure

        public TrunkCreator setSecure​(Boolean secure)
        Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking/getting-started#securetrunking) for more information..
        Parameters:
        secure - Whether Secure Trunking is enabled for the trunk
        Returns:
        this
      • setCnamLookupEnabled

        public TrunkCreator setCnamLookupEnabled​(Boolean cnamLookupEnabled)
        Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information..
        Parameters:
        cnamLookupEnabled - Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
        Returns:
        this
      • create

        public Trunk create​(TwilioRestClient client)
        Make the request to the Twilio API to perform the create.
        Specified by:
        create in class Creator<Trunk>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Created Trunk