New Call¶
General¶
Attribute |
Possible value |
Description |
---|---|---|
|
|
Tell Zammad there’s a new 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. |
|
e.g. |
The user(s) real name involved. You may have to provide array style
( If the direction is
out , this is the name of the calling person(s).If the direction is
in , this is the name of the called person(s).This value is optional. |
|
e.g. |
An optional queue name, this option is relevant for the Caller Log Filter |
There’s two options on how to POST
the relevant data to Zammad.
- Example:
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 sent:
https://{FQDN-Zammad}/api/v1/cti/{instance specific token}
- Outbound
Payload:
{ "event": "newCall", "from": "493023125741", "to": "492214710334", "direction": "out", "callId": "f4ebd2be-7b9a-4d58-94c2-eb06a3c2ce76", "user": "Christopher Miller" }
Returns:
{ "action": "dial", "caller_id": "496990009111", "number": "492214710334" }
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --header 'Content-Type: application/json' \ --data-raw '{ "event": "newCall", "from": "493023125741", "to": "492214710334", "direction": "out", "callId": "f4ebd2be-7b9a-4d58-94c2-eb06a3c2ce76", "user": "Christopher Miller" }'
- Inbound
Payload:
{ "event": "newCall", "from": "493023125741", "to": "492214710334", "direction": "in", "callId": "307fa962-de8d-4ffc-817b-7f6993204159", "user": ["Christopher Miller", "Emma Taylor"] }
Response:
{}
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --header 'Content-Type: application/json' \ --data-raw '{ "event": "newCall", "from": "493023125741", "to": "492214710334", "direction": "in", "callId": "307fa962-de8d-4ffc-817b-7f6993204159", "user": ["Christopher Miller", "Emma Taylor"] }'
POST
-Request sent:
https://{FQDN-Zammad}/api/v1/cti/{instance specific token}
- Outbound
Payload:
event:"newCall" from:"493023125741" to:"492214710334" direction:"out" callId:"f0871278-0600-4f5c-a746-bec3acf04f41" user:"Christopher Miller"
Returns:
{ "action": "dial", "caller_id": "496990009111", "number": "492214710334" }
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --form 'event="newCall"' \ --form 'from="493023125741"' \ --form 'to="492214710334"' \ --form 'direction="out"' \ --form 'callId="f0871278-0600-4f5c-a746-bec3acf04f41"' \ --form 'user="Christopher Miller"'
- Inbound
Payload:
event:"newCall" from:"493023125741" to:"492214710334" direction:"in" callId:"25641e3f-3317-4c48-80b3-fc573c7ffe2b" user[]:"Christopher Miller" user[]:"Emma Taylor"
Returns:
{}
Sample curl command:
$ curl --request POST 'https://{FQDN-Zammad}/api/v1/cti/{instance specific token}' \ --form 'event="newCall"' \ --form 'from="493023125741"' \ --form 'to="492214710334"' \ --form 'direction="in"' \ --form 'callId="25641e3f-3317-4c48-80b3-fc573c7ffe2b"' \ --form 'user[]="Christopher Miller"' \ --form 'user[]="Emma Taylor"'
Situation Specific Responses¶
Depending on the chosen call direction, Zammad will return either a (optionally) configured call ID or (optionally) block a caller. If your Zammad hasn’t configured one or both options, the return will be empty.
Note
This has to be supported by your PBX in order to work.
If an incoming new call matches a to block number, Zammad will return the following.
{ "action": "reject", "reason": "busy" }
If no to block number matches, Zammad will return the following.
{}
Warning
Your PBX still needs to end the call (hangup event). Other wise the call will not just appear within Zammads caller log but also appear as ringing call.
In case your instance has a matching overwriting caller ID configured, Zammad will return the following payload.
{ "action": "dial", "callerId": "493055571642", "number": "491711234567890" }
If no overwrite match is found or you haven’t configured anything, Zammad will return the following.
{}