[KB] ACR Webhook help

Issue #1726 resolved
copluk repo owner created an issue

Starting from 27.2 ACR has implemented a very handful feature called Webhook.

A webhook can be described as a web event. If you have your own web server and some development knowledge you can enable ACR to send a request to your server after each call. It can be used to upload recordings or keep the details of your calls.

Create a web page or service that accepts following form data and enter its URL to Server setting under ACR Webhook settings.

ACR will post following multipart/form-data with user agent ACR after every call to the address you have provided

input name input value
source ACR
file Recorded file as multipart data
acrfilename Original file name stored in ACR (Only posted if "file" is posted too
secret Password / secret key for service access . Optional
date Call start time as epoch time
duration Recording duration in milliseconds
direction 0 means incoming 1 means outgoing
important 1 if it is, 0 if it is not. Would only be 1 if user has Keep Recording prompt enabled and marked as important before saving the recording
note Recording note. Only possible if Keep Recording prompt is enabled
phone Phone number
contact Contact name

You are free to switch these inputs on or off as you wish under Webhook settings.

ACR expects response with HTTP status code 200 for successful upload/post. If status code returned is either 401 (unauthorized) or 404 (not found) it would automatically disconnect from the service (unless user disabled Auto Disconnect under Cloud Services' Other settings.

See our repo at https://bitbucket.org/copluk/acr-webhook/ for open source implementations of front and backends

Feel free to let us know if you develop a script or service to accept these inputs.

Comments (28)

  1. Maryan Shvets

    It will be better if you will send file name always, because file can be synchronized by ftp later, for example when wifi will available,

    Becouse I want to receive information about call immediately, but upload call record later, when wifi will be available

  2. copluk reporter

    That's possible but you can build filename your self too. Number and date is posted. Search this site for acr file naming convention

  3. Maryan Shvets

    I have set rule for the file name building in the settings panel

    but once (may be 1 year ago ) after updating ACR rule for the file name building was set to the default and I fix file name building in my script after some time (when see this problam)

    so if you will send filename via web hook it will be like double check

  4. Former user Account Deleted

    Is there somekind of limit on the amount files you can upload trough a webhook ?

    Everytime when I try to upload all recordings at the 59th upload I get this error:


  5. copluk reporter

    Have you implemented your own back-end? That would be your servers limitation. Check serve logs about the error

  6. Former user Account Deleted

    Yes it is my own backend, I've checked the server logs but I don't see any errors in there, also I see 59 incoming requests in the server. Is there a way to check what the connection error is in ACR?

  7. copluk reporter

    You can enable debug logging and send logs to email Please go to ACR Settings, tap on the ACR version information at the bottom and then tap on the Debug logging, enter password "letmedebug", tap on Start. Make a test call, end your call. Come back to Debug logging and tap on Stop and finally tap on Send to send it toyour email

  8. Дмитрий Деулин

    Authorization does not work. I send the request in the format http: // login: password@server.net/call/post - I get an error about the authorization error on the server. Exactly the same query from the browser string works without problems.

  9. copluk reporter

    Can you please send us debug logs. Please go to ACR settings and tap on version then tap on Debug and enter letmedebug as password. Make a call while debug is enabled, come back open debug logging and select send to send debug logs to me.

    Make sure you reference to the issue in your new email so I would know for what to look

  10. Даниил Алексашин

    Thanks for this awesome feature! I've been trying to implement this into Telegram Bots to upload recordings automatically since release, but failed.

    Now though I finally made the bot working! It's available in Telegram by searching @callhistory_bot Backend is all pure PHP, credentials are stored in MySQL in encrypted fields. Feel free to try it out!

  11. Даниил Алексашин

    Did ACR v.32 somehow changed the JSON format listed here? I cannot get my bot working with ACR v32.0+, only lower versions.

    With new versions whenever I send voice record I get lots of “missing fields” errors which are listed here and should be sent along the file.

  12. Даниил Алексашин

    Thank you very much! Made changes to my bot to accept both cloud implementations.

  13. Log in to comment