The Disconnect event is fired when a call ends, for any reason.
| Name | Type | Description | Notes |
|---|---|---|---|
| event_type | str | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
| event_time | datetime | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
| account_id | str | The user account associated with the call. | [optional] |
| application_id | str | The id of the application associated with the call. | [optional] |
| var_from | str | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] |
| to | str | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] |
| call_id | str | The call id associated with the event. | [optional] |
| direction | CallDirectionEnum | [optional] | |
| call_url | str | The URL of the call associated with the event. | [optional] |
| enqueued_time | datetime | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] |
| start_time | datetime | Time the call was started, in ISO 8601 format. | [optional] |
| answer_time | datetime | Time the call was answered, in ISO 8601 format. | [optional] |
| end_time | datetime | The time that the recording ended in ISO-8601 format | [optional] |
| cause | str | Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. | [optional] |
| error_message | str | Text explaining the reason that caused the call to fail in case of errors. | [optional] |
| error_id | str | Bandwidth's internal id that references the error event. | [optional] |
| tag | str | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] |
| sip_call_id | str | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional] |
| sip_response_code | int | (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response. | [optional] |
| sip_status_line | str | (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response. | [optional] |
| sip_headers | Dict[str, str] | (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`. | [optional] |
from bandwidth.models.disconnect_callback import DisconnectCallback
# TODO update the JSON string below
json = "{}"
# create an instance of DisconnectCallback from a JSON string
disconnect_callback_instance = DisconnectCallback.from_json(json)
# print the JSON string representation of the object
print(DisconnectCallback.to_json())
# convert the object into a dict
disconnect_callback_dict = disconnect_callback_instance.to_dict()
# create an instance of DisconnectCallback from a dict
disconnect_callback_from_dict = DisconnectCallback.from_dict(disconnect_callback_dict)