• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

ReadWriteFile

Status
Not open for further replies.

MBear

Joined
May 25, 2018
Messages
2
Reaction score
0
Hi!
How to use ReadWriteFile for
1. Generate a random file name.
2. write to the file the extension number that received the call in the queue?

thanks.
 
Hello @MBear,

1. Generate a random file name.
In order to generate a random file name, you need to use a C# expression. For example:
"SomePrefix" + new System.Random().Next(1000000) + ".txt"

will create a string containing a fixed prefix, then a random number, and finally the extension. You can do this as complex as you need. If you need many different characters for example, you can iterate many times with a for and concatenate a different character each time. That's up to you...

2. write to the file the extension number that received the call in the queue?
Regarding the second question, you don't have this information before you transfer the call. Your CFD app is processing the call before sending it to the agent, so you can't know this. If you need this information, you will need to check the CDRs, but not from a CFD app. Please note that CFD apps are only executed when they receive an inbound call.

Kind regards.
 
Thanks for the answer.
unfortunately, it is possible to receive data from the CDR only after the end of the call.
Can it be possible to get this data directly from the database? This is necessary to connect to our helpdesk system.
 
If you need the information in real time, you need to use the 3CX Call Control API:
https://www.3cx.com/docs/call-control-api/

But please note that you need to use this API in a C# program you create, you can't do this from a CFD app because the app will not be active when the call is being handled by the agent.
 
As Ernesto mentioned, you can create a service (windows service or Linux Daemon) which monitors for all answered calls using the Call Control API, or you could create a 3CX Phone for Windows plugin to perform the same function. We use both approaches for several of our tools. https://www.3cx.com/call-center/crm-integration/
 
Status
Not open for further replies.
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.