Specific music on hold

Status
Not open for further replies.

albert-g

Member
Aug 11, 2020
85
2
8
44
I have different ring groups on the same tenant, and want to use separate 'music on hold' per group and per direction (local, external), I only can find MOH per extension. Can someone advise.
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
Ring groups don't have a way to set MOH normally since that isn't really a needed function of a *Ring*group. Ring groups simply send a call to multiple phones in the prescribed manner.

As mentioned, you can change the ringback sound to a MOH source instead of the default ringing sound a caller hears.

To customize when a certain MOH source is used, you would need to build a dial plan to test the condition you want to match and then set MOH to the stream you want. Set hold_music=local_stream://my.domain.com/CustomMOH as needed.
 
  • Like
Reactions: pksml and albert-g

albert-g

Member
Aug 11, 2020
85
2
8
44
Ring groups don't have a way to set MOH normally since that isn't really a needed function of a *Ring*group. Ring groups simply send a call to multiple phones in the prescribed manner.

As mentioned, you can change the ringback sound to a MOH source instead of the default ringing sound a caller hears.

To customize when a certain MOH source is used, you would need to build a dial plan to test the condition you want to match and then set MOH to the stream you want. Set hold_music=local_stream://my.domain.com/CustomMOH as needed.
Thanks a lot for advise, I will try to figure out this.
One thing that I noted, is that in "Destination" there is one setting, I set my message there, but it didnt change anything, not sure what doing this setting there.

1611044956763.png
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
Yes. If you set a "hold music" in Destinations, it will add a "set hold_music=selected hold music" but.... if there is hold music specified somewhere else in the dial plan such as in the Extension settings, it will be overridden.
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
85
2
8
44
Yes, when I set 'hold music' on 'destinations', its really changed XML as you said, but hold music remains the default one, I will attache the log part.

1611069465764.png

Code:
cd75eb81-a71e-4199-9cdf-3e90e348cc02 2021-01-19 16:11:23.554744 [DEBUG] switch_ivr.c:632 sofia/external/anonymous@anonymous.invalid Command Execute [depth=0] playback(local_stream://default)
cd75eb81-a71e-4199-9cdf-3e90e348cc02 EXECUTE [depth=0] sofia/external/anonymous@anonymous.invalid playback(local_stream://default)
2021-01-19 16:11:23.554744 [DEBUG] mod_local_stream.c:909 Opening Stream [default/8000] 8000hz
cd75eb81-a71e-4199-9cdf-3e90e348cc02 2021-01-19 16:11:23.554744 [DEBUG] switch_ivr_play_say.c:1488 Codec Activated L16@8000hz 1 channels 20ms

For comparison, I changed hold music on extension, and it is worked well:
Code:
7e069629-f5b6-41dd-b36e-9219c2cd439a 2021-01-19 16:09:52.914720 [DEBUG] switch_channel.c:1927 (sofia/internal/20@192.168.29.45:11868) Callstate Change ACTIVE -> HELD
d8c085f8-2e75-4db9-a6b4-dc42337bcf1f 2021-01-19 16:09:53.074722 [DEBUG] switch_ivr.c:632 sofia/external/anonymous@anonymous.invalid Command Execute [depth=0] playback(/var/lib/freeswitch/recordings/vo****.nt/2a_*****.wav)
d8c085f8-2e75-4db9-a6b4-dc42337bcf1f EXECUTE [depth=0] sofia/external/anonymous@anonymous.invalid playback(/var/lib/freeswitch/recordings/voi*****nt/2a_-*****.wav)
d8c085f8-2e75-4db9-a6b4-dc42337bcf1f 2021-01-19 16:09:53.095014 [DEBUG] switch_ivr_play_say.c:1488 Codec Activated L16@8000hz 1 channels 20ms
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
That hold_music in your inbound route isn't valid. It should show as a local_stream or shout URL
hold_music=local_stream://MessageOnHold for example.

Also check more of your logs or CDR details to follow the dial plan progress. It will show where/when hold music is set or reset before bridging the call.
 

albert-g

Member
Aug 11, 2020
85
2
8
44
That hold_music in your inbound route isn't valid. It should show as a local_stream or shout URL
hold_music=local_stream://MessageOnHold for example.

Also check more of your logs or CDR details to follow the dial plan progress. It will show where/when hold music is set or reset before bridging the call.

OK, I created custom 'music on hold' with this my hold-music, and then set in destination this custom 'music on hold', in 'inbound routes' it is looks good, but still my hold music goes to default one:

1611139163644.png
1611139169894.png
1611139176010.png

If I use the same custom created 'music on hold', on extension, it is working without any problems. Don't understand what I am missing here.
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
Be sure you clear cache when updating inbound routes for the changes to take effect immediately.
Other than that, only way to know why it isn't working is to check the FS log or CDR details to see full call flow. There might be another dial plan setting hold_music somewhere.
 
Status
Not open for further replies.