Call play_file_to_caller

Plays an audio file (local or downloaded from URL) in an existing call for the caller. Local files must be placed into Ozeki Phone System\ContentStorage\Static folder.

def play_file_to_caller filename, repeat=false

Code example 1 - Definition

Method parameters

Parameter name Value Description Default value Mandatory
filename string value
e.g. 'demo.wav'
The wav or mp3 file to play. (None) Yes
repeat string value
e.g. true
Repeat audio file. false No

Example

#get the active calls list
calls = OPS.list_active_calls '192.168.0.1', nil, 'admin', 'password'

#pick up the first call
call = calls[0]

if (call != nil)
puts call.play_file_to_caller "demo.wav"
end

Code example 2 - Play file to caller

More information