Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Follow below instructions if you want to change the default Music On Hold for Voice calls.

Method 1

Update default MOH class in Asterisk config file

If you want to change the default MusicOnHold class permanently, follow below instructions:

...

Image Removed

...

Code Block
languagebash
[default]
mode=files
directory=/var/opt/motion2/server/files/moh/<moh_name>
sort=random

...

Restart asterisk service to apply changes

Code Block
languagebash
service asterisk restart

Method 2

Change default MOH class runtime

If you want to dynamically change the default MusicOnHold class during the call flow, follow below instructions:

  • Create your custom moh class and add your audio files

Image Added


  • Create variable CHANNEL(musicclass)
Note

Please refer here to create a Variable


Image Modified

  • Update MOH class on runtime
    1. If you use Internal/Inbound dialplan, you need to add the Set application with following syntax

      Image Modified

    2. If you use CallySquare project, you need to add the Set block with following syntax

      Image Modified