Skip to main content

cdr

The Call Detail Record summary produced after the call is completed. It carries the final status of the call, its duration and, if there is one, the link to the recording.

This is the real source for reporting and archiving: finalize your per call record here.

This scenario uses a different schema from the others

cdr does not use the common field schema. Its field names are in Turkish (arayan, aranan, sure, ...), the call identifier is in asteriskId instead of unique_id, and numeric fields arrive as real numbers rather than text. Handle this scenario separately in your parser.

Sample body

scenario: cdr
{
"bas": "2026-01-01 09:00:00",
"kimlik": 100000001,
"ortakkimlik": 100000001,
"clid": "\"05551112233\" <05551112233>",
"arayan": "05551112233",
"aranan": "8501234567-announcement-karsilama",
"sure": 35,
"sondurum": 1,
"santral": "8501234567",
"yon": 2,
"seskaydi": "https://dosyaindir.netgsm.com.tr/download?p=<signed-value>&h=<hash>&v=<version>",
"asteriskId": "sip1-1767225600.10001",
"trunk": "8501234567",
"scenario": "cdr",
"channel_variables": {
"disposition": "ANSWERED"
},
"callConnectedTime": 0,
"callEndedTime": 1767225651000,
"callInitiatedTime": 0,
"callQueuedTime": 0
}
Send this body to your own address

The sample body above is sent to the address below as a POST request. The request goes from your browser, so the response cannot be read if the receiving endpoint sends no CORS header; the request itself still arrives. Use the cURL equivalent to try it from the server side.

cURL equivalent:

curl -X POST 'https://your-address.example/webhook' \
-H 'Content-Type: application/json' \
-d '{"bas":"2026-01-01 09:00:00","kimlik":100000001,"ortakkimlik":100000001,"clid":"\"05551112233\" <05551112233>","arayan":"05551112233","aranan":"8501234567-announcement-karsilama","sure":35,"sondurum":1,"santral":"8501234567","yon":2,"seskaydi":"https://dosyaindir.netgsm.com.tr/download?p=<signed-value>&h=<hash>&v=<version>","asteriskId":"sip1-1767225600.10001","trunk":"8501234567","scenario":"cdr","channel_variables":{"disposition":"ANSWERED"},"callConnectedTime":0,"callEndedTime":1767225651000,"callInitiatedTime":0,"callQueuedTime":0}'

The <...> placeholders in the seskaydi field are there for readability; the real request contains a long, signed link.

Fields

FieldTypeDescription
scenariostringAlways cdr.
asteriskIdstringUnique identifier of the call. It is the same value as unique_id in the other scenarios; correlate events with it.
kimliknumberIdentifier of the call record.
ortakkimliknumberShared identifier that groups linked calls, for example on a transfer.
basstringStart of the call, local time in YYYY-MM-DD HH:mm:ss format.
arayanstringCalling number.
arananstringCalled destination. It can be a number, or a flow step as in the sample.
clidstringRaw caller identity, in "name" <number> format.
surenumberCall duration, in seconds.
sondurumnumberFinal status of the call.
yonnumberCall direction.
santralstringYour PBX number.
trunkstringThe trunk the call used.
seskaydistringDownload link of the recording. Empty when there is no recording.
channel_variablesobjectPBX channel variables. The disposition field takes values such as ANSWERED, NO ANSWER, BUSY, FAILED.
callInitiatedTimenumberThe moment the call was initiated (ms, Unix epoch).
callQueuedTimenumberThe moment the call entered the queue (ms, Unix epoch).
callConnectedTimenumberThe moment the call was connected (ms, Unix epoch).
callEndedTimenumberThe moment the call ended (ms, Unix epoch).
Time fields may arrive as 0

The callConnectedTime, callQueuedTime and callInitiatedTime fields arrive as 0 when the corresponding step did not happen, as in the sample body. Do not interpret 0 as a valid date, treat it as "unknown".

Use channel_variables.disposition for the answer status

This field is the clearest way to tell whether the call was answered. The sondurum and yon fields also encode the state; if you are going to use them, verify the values you expect against your own traffic.

Lifetime of the recording link

seskaydi is a signed download address and it does not last forever. If you need to keep the recording, download and archive the file itself rather than the link.