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

CFD script to delete file

Status
Not open for further replies.

pluym

Gold Partner
Advanced Certified
Joined
Apr 7, 2011
Messages
8
Reaction score
0
I use a call flow where the customer is able to record a message. When the customer records a message and disconnects the line i use the disconnect handler flow to email the message (wav file) anyway (many customers forget to decent close the recording) .

There is one problem: when the customer disconnects before a wav file is recorded and before another customer lefts a message, the previous wav file is send by email again for the second time.

In the VAD i simply removed the wav file when it existed before starting a recording.

The new CFD uses C# scripts. Can you give me an exampe of a C# script to remove a file ?

Or can you add "remove file" to the "Read/Write to file" (Advanced Options) ??
 
Hi @pluym,

Currently there is no component to delete files. You need to use a Launch External Script component, and write the C# code to delete the file, which is pretty simple, just "File.Delete(filePath)". But you need to put this code in a class and call that method from the CFD.

In this article you have an example on how to call C# code from the CFD.

Kind regards.
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,632
Messages
748,963
Members
144,749
Latest member
leo13215464
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.