Call records and sources
Bring call records in from uploaded or emailed files, a carrier's SFTP or FTPS server, the push API or a webhook, map the columns with the wizard, route one carrier account's calls to many customers, and fix rows that could not be read.
Every phone system and carrier reports calls in its own format. A call record source takes one of those feeds and turns it into the same normalised call, ready to be priced and billed. No call is ever counted twice, however often a file is sent.
Open Sales and billing > Call records. The page lists every source with its customer, state, Calls this month, Rejected rows and Last call.
Add a source
- Press Add a source.
- Give it a Name, for example the carrier and the kind of file.
- Under Whose calls choose One customer (that customer's phone system or carrier account) or Many customers (one carrier account whose calls belong to several customers).
- Choose how the records arrive:
- Uploaded or emailed
- From a server (SFTP or FTPS)
- Sent by API
- Sent per call (webhook)
- Choose the Column map: Set it up from a sample file, a Ready-made map, or one Saved by your team.
- Optionally set the Country of the numbers, so national numbers in the file are read correctly. Left empty, the customer's country is used.
- Press Add source.
A source's page has five tabs: Calls, Files, Rejected, Mapping and Settings.
Connecting a 3CX, Yeastar or Teams Phone with your own account creates its source for you. See Connecting a phone system.
Uploaded files
On the Files tab press Choose files or drop them on the page. CSV, text, Excel, .gz and .zip are read; each file inside a zip is listed on its own.
The list shows every file with Calls added, Already there and Rejected. The same file twice is read once, and files that overlap add only the calls not already held.
Emailed files
- On the source's Settings tab press Give this source an email address.
- Give that address to the carrier or set it on the phone system for its daily or monthly files.
- Optionally fill Accept files only from with email addresses or domains, one per line.
Every attachment is read with the column map. A message from a sender not on the list, or with no call record attachment, is refused with the reason. The address appears once inbound email is set up in Settings > Support email.
From a carrier's server
Most carriers leave call record files on an SFTP server. On the source's Settings tab fill in File server:
- Protocol, Server, Port and Folder.
- File names: which files to take, with
*for any text and several patterns separated by;. - Sign-in: enter a user name with a password or a private key, or use a login already in the vault. Either way it is kept in the vault.
- After a file is read: leave it, move it to a folder, or delete it. A copy is always kept by Tenvara first.
- Look for new files: from every 15 minutes to once a day.
- When a read file changes: hold it for someone to read or ignore (the default), or read it at once with the calls already taken skipped.
Then trust the server's key:
- Under Server key press Check connection. Nothing is sent to the server at this point.
- Compare the key shown with the one the carrier gave you.
- Press Trust this key.
Tenvara signs in only when the server shows the trusted key, so a password never goes to the wrong server. If the key changes, the source stops and says why. Plain FTP is never used.
A held file shows on the Files tab with Read and Ignore. Fetch new files now looks at once. Only public addresses are reached unless you tick Inside the network on purpose, for a phone system on your own network or VPN.
Sent by API
For your own integration, or a phone system that can post its records. The source's Settings tab shows Push API with the Address, an API token (press Make a token) and an example to copy, plus a script to download.
Batches of calls are sent as JSON with the token, and each answer says what became of every call: new, already there, or rejected with the reason. The token can only send calls to that one source. New token replaces it at once.
Sent per call (webhook)
For phone systems and carriers that send each call as it ends. The Settings tab shows the Webhook address to point the sender at, and asks:
- What the sender sends: Tenvara's own call record format, a carrier's status callback, or the sender's own fields read with the column map.
- Signature: every webhook must be signed with the Signing secret, made on the tab or pasted in from the sender. An unsigned webhook is refused.
For both API and webhook sources, Received lists the last 50 batches and webhooks with what happened to each.
The mapping wizard
The Mapping tab says which column is which.
- Press Upload a sample and choose a few days of the file. Tenvara recognises many formats from the headings and offers Use this preset.
- Under Columns check each part of a call: start, duration, from, to, direction, outcome, account, extension, trunk, call ID and carrier cost. Start and the number called are required.
- Under How the file is written set the first row, Dates written as, the time zone of the times, Durations written as, the decimal separator and the currency of the costs.
- How the sample reads shows the calls the rows become, before anything is saved.
- Press Save the map.
Ready-made maps cover common phone system and carrier exports, such as 3CX call record files, Asterisk and a generic SIP trunk carrier file. Save for the team keeps a map for other sources. A source keeps its own copy, so changing a saved map never changes a source behind your back.
Routing a carrier file to customers
A Many customers source needs routes. On its Settings tab, under Routes, press Add a route and say which calls belong to which customer, matching on account code, a number, a number range, a number prefix, an extension or a trunk. The first route that matches a call wins. Press Save routes.
A call no route matches is rejected until one does, so nothing is billed to the wrong customer. A one-customer source can have routes too, to send some calls elsewhere.
Rows that could not be read
The Rejected tab keeps every row that did not become a call, with Why, What was wrong and the row as written: a missing start time, a date or duration that cannot be read, no number, no customer. Nothing is dropped.
Fix the cause (the column map, or a route), then press Read again or Read all again: rows that now read become calls and move to Fixed. Dismiss sets aside rows that will never be calls, such as a footer line.
Was this page helpful?
Thanks for the feedback.