Jump to content
Tom Wellige

PBXCall.PlayMessage

Recommended Posts

This function plays a given wav file.

 

PBXCall.PlayMessage (bstrSoundfile, [nSkipFirstSeconds], [bRepeatAfterHoldOrTransfer], [FileOwner])

This function returns an integer value of  PBXSuccess (0) on success. See list of defined return values.

 

If the current call is already in state Alerting or Connected the function call will be ignored.

 

Parameters:

 

bstrSoundfile

 

Name of soundfile.

 

SwyxWare v6.x (and newer): If without path the server searches the file in the following order in the database:

  1. User scope
  2. User Default scope
  3. Global scrope
  4. System Default scope  

You can use the SwyxWare Administration or the IpPbXFile Explorer (from SwyxWare DVD's Tools folder) to upload files directly into the desired scope.

 

SwyxWare v5.x (or older) If without path the server searches the file in the following order in the SwyxWAre file share:

  1. <userdir>\Phoneclient\voicemail
  2. <serverdatadir>\PhoneClient\voicemail
  3. <serverdatadir>\system

 

If with path the file will be played from there. UNC pathes are possible. As the script is started from the SwyxServer, the user account the SwyxServer service is running with (usually the SwyxWare Service Account) needs read access privileges to that given path.

 

nSkipFirstSeconds

 

Optional. Default: 0

 

Skip the first n seconds of the given sound file. If value is 0 then file will be played completely.

 

bRepeatAfterHoldOrTransfer

 

Optional. Default: TRUE

  • FALSE: sound file will NOT be repeated after current playback was interruppted by a 'hold' or 'transfer' user action.
  • TRUE: sound file will be repeated after current playback was interruppted by a 'hold' or 'transfer' user action.

 

FileOwner

 

Optional. Default: 0

 

Defines user whose file should be played. Can be a user ID or a user name. If 0 bstrSoundfile of the current script user will be played. Note that only non-private files of other users can be accessed.

 

Examples:

 

PBXCall.PlayMessage "beep.wav"
PBXCall.PlayMessage "Weclome.wav", 10, True, "Operator"

 
 

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.