メニュー

Expand
ページを評価:

TwiML™ Voice: <Reject>

<Reject> 動詞は、ユーザーの Twilio 番号への着信通話を拒否します。料金は課金されません。受けたくない通話をブロックする時に使えます。

If the first verb in a TwiML document is <Reject>, Twilio will not pick up the call. The call ends with a status of busy or no-answer, depending on the verb’s reason attribute. Any verbs after <Reject> are unreachable and ignored.

Using <Reject> as the first verb in your response is the only way to prevent Twilio from answering a call. Any other response will result in an answered call and your account will be billed.

If you are using Twilio's deprecated v2008 API, <Reject> will result in a billing event, because the call's state will transition from inbound to completed to reject the call. Using <Reject> with the v2010 API, as described in this document, will not result in a billing event. Learn how to upgrade from Twilio's v2008 API to the v2010 API here.

動詞の属性

<Reject> 動詞は次の属性をサポートします。これらを使って動作を変更します。

属性名 許容値 初期値
reason rejected, busy rejected

reason

The reason attribute takes the values rejected and busy. This tells Twilio what message to play when rejecting a call. Selecting busy will play a busy signal to the caller, while selecting rejected will play a standard not-in-service response. The default is rejected.

This is a preference and what is actually played back is determined by the caller’s service provider as they dictate what they want to playback to the caller.

ネスティングルール

You can’t nest any verbs within <Reject> and you can’t nest <Reject> in any other verbs.

サンプル

例 1: 標準の「現在使われておりません」メッセージを再生して着信を拒否する

        
        
        
              
              
              
              ページを評価:

              ヘルプが必要ですか?

              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 Community Forums or browsing the Twilio tag on Stack Overflow.

                    
                    
                    

                    フィードバックくださりありがとうございます!

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

                    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!

                    ステップ1

                    Get link

                    Get a free personal referral link here

                    ステップ2:

                    Give $10

                    Your user signs up and upgrade using link

                    ステップ3

                    Get $10

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