Enable call recording by default for all current and future users

David_K

Bronze Partner
Joined
Apr 3, 2019
Messages
200
Reaction score
27
Hello,

We run 3CX V20 (AI Edition) and we would like to record all calls for all users.

Is there also a global default or a user template, so that every new user created later is automatically set to record calls?

Currently we plan to use the bulk edit on the Users list (select all, Edit, Options > Call Recordings > Record Calls).
But if it's not in a template, it won't be done on a regular basis.

Thank you for your help.
 
I suppose you could run a cron job every X minutes to check for new users and use XAPI to adjust the RecordCalls setting for the user.

Here's a (very simple) Python function that does it:

Python:
def patch_UserRecordCalls(user_id):
  url = f"https://{fqdn}/xapi/v1/Users({user_id})"

  payload = {"RecordCalls": True}

  print(f"Sending: {json.dumps(payload)}")

  try:
    response = requests.patch(url, json=payload, headers=request_headers())
    response.raise_for_status()
    if not response.text.strip():
      print("Success! (Status {response.status_code}, No body returned)")
    else:
      result=response.json()
      print("Success! Response body:", result)
  except requests.exceptions.HTTPError as err:
    print(f"HTTP error occurred: {err}")
    print(f"Response Body: {response.text}")
  except requests.exceptions.JSONDecodeError:
    print("Success, but the response was not valid JSON.")
 
  • Like
Reactions: David_K
theres the ability to "Copy" extension when creating a new one so just make yourself a template user.
 
I suppose you could run a cron job every X minutes to check for new users and use XAPI to adjust the RecordCalls setting for the user.

Here's a (very simple) Python function that does it:

Python:
def patch_UserRecordCalls(user_id):
  url = f"https://{fqdn}/xapi/v1/Users({user_id})"

  payload = {"RecordCalls": True}

  print(f"Sending: {json.dumps(payload)}")

  try:
    response = requests.patch(url, json=payload, headers=request_headers())
    response.raise_for_status()
    if not response.text.strip():
      print("Success! (Status {response.status_code}, No body returned)")
    else:
      result=response.json()
      print("Success! Response body:", result)
  except requests.exceptions.HTTPError as err:
    print(f"HTTP error occurred: {err}")
    print(f"Response Body: {response.text}")
  except requests.exceptions.JSONDecodeError:
    print("Success, but the response was not valid JSON.")
Rhanks @Kevin Attard Compagno
No native way to do it?