Hang up a call
Ends the call, or declines it while it rings. Hanging up an ended call is not an error; it returns the call as it is.
Ends the call, or declines it while it rings. Hanging up an ended call is not an error; it returns the call as it is.
AuthorizationBearer <token>Your API key, 06l_…. For servers only.
call_id*string^call_[0-9a-z]{26}$Ended.
application/json- response
id*CallId^call_[0-9a-z]{26}$line_id*LineId^line_[0-9a-z]{26}$direction*string"outbound""inbound"from*stringYour line when outbound. When inbound, the caller as the network gives it: usually E.164, empty when the caller hides the number.
to*PhoneNumberE.164, e.g. +33612345678.
^\+[1-9][0-9]{6,14}$state*stringdialing → ringing → active → ended. Incoming calls start at ringing.
"dialing""ringing""active""ended"end_reason?string"hangup""remote_hangup""no_answer""busy""failed""line_offline"client_ref?ClientRefYour own identifier, 255 bytes at most. Sending the same client_ref twice returns the first result instead of acting twice.
length <= 255created_by*Who did it. user from the 06 Line dashboard, api_key from your code, agent for what the network sent you, system for 06 Line itself.
started_at*TimestampRFC 3339, UTC.
date-timeanswered_at?TimestampRFC 3339, UTC.
date-timeended_at?TimestampRFC 3339, UTC.
date-timeduration_s?integerTalk time, from answered_at to ended_at.
curl -X POST 'https://api.06line.com/v1/calls/string/hangup'{ "id": "string", "line_id": "string", "direction": "outbound", "from": "string", "to": "string", "state": "dialing", "end_reason": "hangup", "client_ref": "string", "created_by": { "type": "user", "id": "string" }, "started_at": "2019-08-24T14:15:22Z", "answered_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z", "duration_s": 0}Answer a call POST
Answers a ringing incoming call, announced by `call.incoming` on a session's data channel. The audio goes through `session_id`. The call comes back still `ringing`: it turns `active` with the `call.state` that follows, once the line picked up. Every session the call rang then hears `call.state`.
Get a call GET
Next Page