[asterisk-users] Music on hold for sub tenants

Darrick Hartman dhartman at djhsolutions.com
Thu Sep 25 22:52:44 CDT 2008


...since everyone else top posted.

Take a look at the application setmusiconhold.

CLI> core show application SetMusicOnHold

You can use this in a dialplan as follows:

[tenant1incoming]
exten => s,1,Wait(1)
exten => s,n,Answer()
exten => s,n,Background(tenant1sounds/welcome)
exten => s,n,SetMusicOnHold(tenant1)

[tenant2incoming]
exten => s,1,Wait(1)
exten => s,n,Answer()
exten => s,n,Background(tentant2sounds/welcome)
exten => s,n,SetMusicOnHold(tenant2)

Use that with the previously supplied info.

Darrick

carl Lougher wrote:
> Hi,
> I tried this but it still uses the default moh. Is there some way to define it based on a context in the sip.conf or extensions.conf???
> 
> Taff...
> 
> 
> --- On Fri, 26/9/08, Nhadie <nhadie at gmail.com> wrote:
> 
>> From: Nhadie <nhadie at gmail.com>
>> Subject: Re: [asterisk-users] Music on hold for sub tenants
>> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com>
>> Date: Friday, 26 September, 2008, 4:10 AM
>> Hi,
>>
>> i think you can define it like this:
>>
>> [moh-company-a]
>> mode=files
>> directory=/var/lib/asterisk/moh/companya
>>
>> [moh-company-b]
>> mode=files
>> directory=/var/lib/asterisk/moh/companyb
>>
>> regards,
>> nhadie
>>
>>
>> carl Lougher wrote:
>>> Howdy,
>>> Is there a way to apply a music on hold class to
>> different context user groups?
>>> I have multiple clients on my asterisk server and they
>> each want different music on hold.
>>> Company A 
>>> Company B



More information about the asterisk-users mailing list