Call hangup¶
Warning
🚧 Limitations / Notes🚧
Authentication on this endpoint works fundamentally different compared to the rest of the API.
API clients do not work with the CTI endpoints unless explicitly stated by the client vendor!
The CTI endpoints are relevant for PBX systems only.
Attribute |
Possible value |
Description |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Tell Zammad that somebody hung up the call. |
||||||||||||||||
|
e.g. |
Number that initiated the call |
||||||||||||||||
|
e.g. |
Number that is being called |
||||||||||||||||
|
|
The call direction - if your agent initiates a call this will be |
||||||||||||||||
|
e.g. |
An ID that is unique for the call. Zammad will use this ID to identify an existing call with following actions (e.g. like answering or hanging up) This ID must be unique per call session. |
||||||||||||||||
|
|
This defines the reason of the hangup. Zammad evaluates the cause and indicates e.g. missed calls accordingly in the caller log. |
||||||||||||||||
|
e.g. |
Zammad will look up for a user with given value, the following attributes will be evaluated in given order:
This value is optional. |
There’s two options on how to POST
the relevant data to Zammad.
Note
🤔 For your context
Below calls have been sent with the following configuration. This is important for you to understand the returns we’re showing here.
- Outbound
Destination caller ID
4989*
set outbound caller ID498999998145
with note “All from munich”Destination caller ID
4930*
set outbound caller ID493023125877
“All from Berlin”- Other settings
Default caller ID for outbound calls
496990009111
POST
-Request send:
https://{FQDN-Zammad}/api/v1/cti/{instance specific token}
- Outbound
Payload:
{ "event": "hangup", "from": "493023125741", "to": "492214710334", "direction": "out", "callId": "f4ebd2be-7b9a-4d58-94c2-eb06a3c2ce76", "cause": "cancel" }
Response:
{}
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --header 'Content-Type: application/json' \ --data-raw '{ "event": "hangup", "from": "493023125741", "to": "492214710334", "direction": "out", "callId": "f4ebd2be-7b9a-4d58-94c2-eb06a3c2ce76", "cause": "cancel" }'
- Inbound
Payload:
{ "event": "hangup", "from": "493023125741", "to": "492214710334", "direction": "in", "callId": "307fa962-de8d-4ffc-817b-7f6993204159", "answeringNumber": "emma@chrispresso.com", "cause": "normalClearing" }
Response:
{}
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --header 'Content-Type: application/json' \ --data-raw '{ "event": "hangup", "from": "493023125741", "to": "492214710334", "direction": "in", "callId": "307fa962-de8d-4ffc-817b-7f6993204159", "answeringNumber": "emma@chrispresso.com", "cause": "normalClearing" }'
POST
-Request sent:
https://{FQDN-Zammad}/api/v1/cti/{instance specific token}
- Outbound
Payload:
event:"hangup" from:"493023125741" to:"492214710334" direction:"out" callId:"da7cf8b8-2de2-4120-93c8-7db1f55225dc" cause:"cancel"
Returns:
{}
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --form 'event="hangup"' \ --form 'from="493023125741"' \ --form 'to="492214710334"' \ --form 'direction="out"' \ --form 'callId="da7cf8b8-2de2-4120-93c8-7db1f55225dc"' \ --form 'cause="cancel"'
- Inbound
Payload:
event:"hangup" from:"493023125741" to:"492214710334" direction:"in" callId:"2d77882f-68df-40f0-8c62-b642589c00bc" answeringNumber:"emma@chrispresso.com", cause:"normalClearing"
Returns:
{}
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --form 'event="hangup"' \ --form 'from="493023125741"' \ --form 'to="492214710334"' \ --form 'direction="in"' \ --form 'callId="2d77882f-68df-40f0-8c62-b642589c00bc"' \ --form 'answeringNumber="emma@chrispresso.com"' \ --form 'cause="normalClearing"'