Jump to content
  • PBXCall.PlayMessage


    VBScript   → Lua


    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.







    Name of soundfile.


    PBXCall.PlayMessage "Welcome.wav"


    If no explicit path is given in the filename, SwyxServer searches this file in the database, in the following scopes in that order:


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


    It is also possible to play a local file from the SwyxServer machine. In this case it is necessary, that the Windows user account the SwyxServer service is running under (usually the SwyxServiceAccount), has read privileges on that file.


    PBXCall.PlayMessage "C:\Announcements\MyMessage.wav"


    The .wav file must be in 16kHz, 16bit, PCM, mono format.


    The GetFilesInFolder function from the Function Collection shows an example that plays all .wav files in a given folder.





    Optional. Default: 0


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





    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.





    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.


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


    Tom Wellige


  • 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.