DeleteFile command

The DeleteFile command is used for deleting your source file what you do not need anymore from a specified directory. Important to mention that you only can delete from stated directories like the directory at that location where you installed the Ozeki Phone System, the Voicemails directory which contains the old, new and the attachment directories of an extension and the directory of the uploaded files.

Command example usage:

It is widely used as a Voicemail functionality (for more information about the Voicemail please click here) when you would like to remove your listened old messages.

Parameters:

Parameter name Value Description Mandatory
SourceFile string value,
e.g. $item.message
Your chosen file to delete from the directory. This is the full access path of the file. Yes

OzML simple example:

It deletes all of your messages from the „oldvoicemails” array.

<?xml version="1.0"?>
<Response>
	<ForEach source='oldvoicemails'>
	 	<DeleteFile>$item.message</DeleteFile>
	</ForEach>
</Response>

Detailed voicemail example:

This speaks the 2 sentences between the <InitialCommands></InitialCommands> nodes repeatedly with a 5 second delay and scans the pressed numbers at the same time.
By pressing 1 the system will go through your old voicemails array with the ForEach loop and it will play them. If you press 1 again, you can delete the current message with the <DeleteFile></DeleteFile> command.

<?xml version="1.0"?>
<Response>
    <UserInput repeat ='true'digits ='1'>
        <InitialCommands>
            <Speak>This is the voicemail of user $username .</Speak>
            <Speak>To listen to your old messages, press 1.</Speak>
            <Delay>5</Delay>
        </InitialCommands>
        <Inputs>
            <Input key ='1'>
                <ForEach source ='oldvoicemails'>
                    <Speak>This voicemail has been recorded at $item.date from $item.from .</Speak>
                    <Play>$item.message</Play>
                    <UserInput digits ='1' timeout ='3'>
                        <InitialCommands>
                            <Speak>To delete this message, press 1.</Speak>
                        </InitialCommands>
                        <Inputs>
                            <Input key ='1'>
                                <DeleteFile>$item.message</DeleteFile>
                            </Input>
                        </Inputs>
                    </UserInput>
                </ForEach>
                <Speak>End of old messages.</Speak>
            </Input>
        </Inputs>
    </UserInput>
</Response>

MoveFile command is used in OzML responses to these Api Extension Control notifications:
ForEach, Array, Var, Call, Hangup, SendSMS, Play

More information