Ticket #1046 (closed Feature Requests: fixed)

Opened 6 years ago

Last modified 3 years ago

Allow MOH module to support streams

Reported by: joa Assigned to:
Priority: minor Milestone: 2.5
Component: Music On Hold Version: 2.1
Keywords: moh setup show failure Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by RobThomas)

(Original Description)

I try to describe a Music on hold problem when setting it up for streaming from an url. My goal was to activate streaming for a "jo-stream" class. After some struggle I installed the mpg123 following the Nerdvittles guidelines. When inserting the settings in the conf file at my first attempt it worked as expected. However after some more attempts to set additional directorie "jo-music" with ordinary mp3 files the moh function stoppped completely for the "jo-stream" class . I noticed the format of the moh classes show command displayed diffrent results. When the command provided the below listing the moh function worked i could listen to the music from the url (please note I have not included the complete listing here).

Class: jo-stream asteriskMode: mp3 asteriskDirectory: mp3:http://69.28.128.148:80/stream/radioio_jazz_lo asteriskFormat: slin

However when the moh classes show command displayed the below the result below the moh function for the "jo-stream" class did not work at all any longer.

Class: jo-stream

Mode: mp3 Directory: mp3:http://69.28.128.148:80/stream/radioio_jazz_lo Format: slin

When testing further it was not possible to get the first kind of display back and the moh function to work for the "jo-stream" class. I could however setup and use the default class to work with streaming from url. I could never get the "jo-stream" class to function any more regardless of if I used the new or old format to define the class.

You can see the work "asterisk" has disappeared from the listing when the mof streaming stopped work.

I did also observe there is a mix of the old and new format in the conf files. The acc-1 is set up twice. The acc-2 -- 10 directories was not set up by the trixbox 1.1 iso set up file.

There are some recommendation at the Aussie documentation pages to restart the amp portal. Whe doing so there seems to be a risc the asterisk is stopped immediately causing exception.

I also tried the pod download, without success.

It would be nice to have the functions to setup streaming from url and podcatching available at the freepbx management menues.

It would reduce the difficulties to set up customer moh if the custom file was set to moh-customer and not overwritten by freepbx.

It would also be desireable if only one format was used in the default setup.

Attachments

strange-moh (3.4 kB) - added by jan.olof.axelsson@telia.com on 07/26/06 03:58:56.
The strange out put from the moh classes show command

Change History

07/26/06 03:58:56 changed by jan.olof.axelsson@telia.com

  • attachment strange-moh added.

The strange out put from the moh classes show command

07/28/06 23:14:17 changed by joax

I updated running the trixbox-update.sh script today, The moh works except the "moh files show" command that did not provide any results.

Now it looks like this:

asterisk1*CLI> moh reload asterisk1*CLI> 3 classes reloaded. asterisk1*CLI> moh files show asterisk1*CLI> moh classes show Class: jo-stream

Mode: mp3 Directory: http://radioio.sc.llnwd.net:8075/ Format: slin

Class: default

Mode: mp3 Directory: /var/lib/asterisk/mohmp3 Format: slin

asterisk1*CLI> !ls /var/lib/asterisk/mohmp3 acc_1 acc_4 acc_8 fpm-sunshine.mp3 QuajiroPromo?.mp3 acc_10 acc_5 acc_9 fpm-sunshine.wav TristeAlegriaPromo?.mp3 acc_2 acc_6 fpm-calm-river.mp3 fpm-world-mix.mp3 acc_3 acc_7 fpm-calm-river.wav fpm-world-mix.wav asterisk1*CLI> moh files show

However after changing the settings in musiconhold.conf to [default] mode=files directory=/var/lib/asterisk/mohmp3/ it worked like this, the moh files show command display successfully:

Class: default

File: /var/lib/asterisk/mohmp3//fpm-calm-river File: /var/lib/asterisk/mohmp3//fpm-world-mix File: /var/lib/asterisk/mohmp3//QuajiroPromo File: /var/lib/asterisk/mohmp3//fpm-sunshine File: /var/lib/asterisk/mohmp3//TristeAlegriaPromo

asterisk1*CLI> Class: default

The fault can be reproduced by changing to : [default] mode=files directory=/var/lib/asterisk/mohmp3/

Further observation: the quietmp3 did produce the same bad result.

07/28/06 23:45:54 changed by joax

I hope my report was clear: eg Mode: mp3 cause the moh files show commmand show no results. Mode: quietmp3 cause the moh files show commmand show no results. Mode: files cause the moh files show commmand to show some results, see below. (e.g. note there is an additional back dash in the printout results) File: /var/lib/asterisk/mohmp3//fpm-calm-river


However after writing in this format directory=/var/lib/asterisk/mohmp3 it display ok. It was also observed the freepbx application seems to add one / at the end of the string causone the additional back dash in the printout. See below. File: /var/lib/asterisk/mohmp3//fpm-calm-river


mode=files directory=/var/lib/asterisk/mohmp3/jo-music/

07/29/06 00:12:38 changed by joax

It was also observed the acc_1 to acc_10 did not display class information using the moh classes show command if the corresponding file directory was empty. When I uploaded a file it displayed the class. Class: acc_2I>

Mode: files Directory: /var/lib/asterisk/mohmp3/acc_2/ Format: slin

Please note tha class name is acc_2I> Howver the class is installed as Category: acc_2 in free pbx In some way the I> characters was added to the end. acc_2I>


Please note, my tests and observations of the moh are not complete. ---

07/29/06 00:38:31 changed by joax

However, when I changed to format to [acc_1] mode=mp3 directory=:/var/lib/asterisk/mohmp3/acc_1 the moh classes displayed ok. It was possible to reproduce the fault by changing to the other format, eg the freepbx defult acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_1 .. The confusing thing now is the mode=mp3 is ok for class acc_1 to acc_10 but not default. This means the problem desribed above using mode=mp3 refers only when using the default class. Below is the printout: asterisk1*CLI> moh files show Class: jo-music

File: /var/lib/asterisk/mohmp3/jo-music//some-song

Class: acc_2

File: /var/lib/asterisk/mohmp3/acc_2//some-other-song

Class: default

File: /var/lib/asterisk/mohmp3/fpm-calm-river File: /var/lib/asterisk/mohmp3/fpm-world-mix File: /var/lib/asterisk/mohmp3/QuajiroPromo File: /var/lib/asterisk/mohmp3/fpm-sunshine File: /var/lib/asterisk/mohmp3/TristeAlegriaPromo

Changing to mode=files in default class, result below: asterisk1*CLI> restart now asterisk1*CLI> Disconnected from Asterisk server asterisk1*CLI> moh files show Class: jo-music

File: /var/lib/asterisk/mohmp3/jo-music//some-song

Class: acc_2

File: /var/lib/asterisk/mohmp3/acc_2//some-other-song

The default class is not displayed when mode=mp3, however mode=files is ok.

I hope the problem is claerly described.

09/15/06 20:15:29 changed by RobThomas

  • type changed from Bugs to Feature Requests.
  • version changed from 1.10.010 to 2.1.
  • component changed from - choose - to On Hold Music Module.
  • description changed.
  • summary changed from Music on hold problem, strange behaviour, no function, wrong result from moh classes show command to Allow MOH module to support streams.

I'm going to move this to a feature request, actually. But it's definately a good one. Might even be able to do it this weekend.

01/08/07 13:46:49 changed by

  • milestone deleted.

Milestone 2.3 deleted

01/08/07 14:11:08 changed by vgster

  • milestone set to 2.3.

09/08/08 00:33:32 changed by p_lindheimer

  • status changed from new to closed.
  • confirmation set to Unreviewed.
  • engine_version changed.
  • svn_rev changed.
  • milestone changed from 4.0 to 2.5.
  • resolution set to fixed.

added the ability to add an application type in place of the MoH files, I believe this should allow all forms of streaming whether to an internet source of sound source on the system.