Summary:ASTERISK-12557: [patch] app_queue on misdn channels plays wrong MoH
Reporter:Alexander Zielke (azielke)Labels:
Date Opened:2008-08-11 05:06:30Date Closed:2009-01-27 14:56:14.000-0600
Versions:Frequency of
Environment:Attachments:( 0) _20081205_bug13280_r161354.patch
( 1) misdn-moh.patch
Description:When configuring a queue to play a specific MoH with musicclass=test, the Settings seems to get ignored on misdn channels.

With SIP-Channels, the Log says:
   -- Executing [414@dispatch:3] Queue("SIP/1015-08219b68", "test") in new stack
   -- Started music on hold, class 'test', on SIP/1015-08219b68

which is expectet, but with misdn channels, it gives:
   -- Executing [414@dispatch:3] Queue("mISDN/1-u0", "test") in new stack
   -- Started music on hold, class 'default', on mISDN/1-u0

The only way to change this behavior is to set the musicclass directly in misdn.conf, but that would override the music class outside of the queues aswell.
Comments:By: Alexander Zielke (azielke) 2008-08-11 06:13:40

i did some searching around, and it seems like that misdn does something similar to setting CHANNEL(musicclass).

I managed to track it down to channels/chan_misdn.c, in read_config, there is a call to ast_string_field_set(ast, musicclass, localmusicclass);

Commenting out that line solved the issue and the correct moh is played when queued.

By: Alexander Zielke (azielke) 2008-08-11 07:15:29

i added an patch that adds an mohinterpret field to the chan_list struct which is then used to set the moh for each port.

This way, one can set the moh used for holding a call, but different moh in queues still work as intended.

By: Alexander Zielke (azielke) 2008-08-11 07:24:38

i forgot to mention that the patch is against SVN trunk r137185.

By: Leif Madsen (lmadsen) 2008-12-05 10:45:09.000-0600

I'm going to confirm this issue since it has a patch and is described well. I'm also assigning to Qwell for now in the hopes we can move this issue along since the patch seems pretty trivial. If you need to reassign, please feel free!

By: Alexander Zielke (azielke) 2008-12-05 11:06:59.000-0600

I updated the patch so it applies cleanly against the current SVN.

By: Richard Mudgett (rmudgett) 2009-01-27 14:55:48.000-0600

I checked in a fix on Jan-09-2009 that contains the patch above with one minor difference in the size of the mohinterpret[] array into the following locations:
v1.4 -r168191
trunk -r168192
v1.6.0 -r168237
v1.6.1 -r168266

Noted as a fix for JIRA AST-175/ABE-1757 with miscellaneous doxygen comments added also.