Twilio開發者傳道這裏。
StatusCallback與來電呼叫的TwiML請求非常相似。它作爲表單編碼數據(application/x-www-form-urlencoded
)發送,幷包含所有the regular parameters sent in an incoming call request。
您還會收到一個bunch of bonus parameters, listed here。你可以看到這些參數如下太:
CallStatus A descriptive status for the call. The value is one of queued, initiated, ringing, in-progress, busy, failed, or no-answer. See the CallStatus section for more details.
CallDuration The duration in seconds of the just-completed call. Only present in the completed event.
RecordingUrl The URL of the phone call's recorded audio. This parameter is included only if Record=true is set on the REST API request and does not include recordings from <Dial> or <Record>. RecordingUrl is only present in the completed event.
RecordingSid The unique ID of the Recording from this call. RecordingSid is only present in the completed event.
RecordingDuration The duration of the recorded audio (in seconds). RecordingDuration is only present in the completed event.
Timestamp The timestamp when the event was fired, given as UTC in RFC 2822 format.
CallbackSource A string that describes the source of the webhook. This is provided to help disambiguate why the webhook was made. On Status Callbacks, this value is always call-progress-events.
SequenceNumber The order in which the events were fired, starting from 0. Although events are fired in order, they are made as separate HTTP requests and there is no guarantee they will arrive in the same order.
如果要檢查這些參數和他們要發送,您可以設置有點像RequestBin其中記錄了請求,以便您可以輕鬆地對其進行檢查。
讓我知道這是否有幫助。