Rate this page:

TwiML™ Voice: <Hangup>

The <Hangup> verb ends a call. If used as the first verb in a TwiML response it does not prevent Twilio from answering the call and billing your account. The only way to not answer a call and prevent billing is to use the <Reject> verb.

Verb Attributes

The <Hangup> verb has no attributes.

Nesting Rules

You can't nest any verbs within <Hangup> and you can't nest <Hangup> within any other verbs.


Example 1

The following code tells Twilio to answer the call and hang up immediately.


        Hints and Advanced Uses

        • When receiving a Twilio request to an 'action' URL within <Gather>, <Record>, <Dial> or <Sms>, you can return a response containing the <Hangup> verb to end the current call.
        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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.


              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              Refer us and get $10 in 3 simple steps!

              Step 1

              Get link

              Get a free personal referral link here

              Step 2

              Give $10

              Your user signs up and upgrade using link

              Step 3

              Get $10

              1,250 free SMSes
              OR 1,000 free voice mins
              OR 12,000 chats
              OR more