Hi
Guys I wonder if its possible to set a different MoH based on
groups, I mean if one of the Admin group put on hold the call play music
1, if another from Technical Support put on hold the call play music 3,
something like this
Admin - Music1
Contrallors - Music 2
Technical Support - Music 3
Thanks
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20090723/dd24c5ba/attachment.htm
On Thu, Jul 23, 2009 at 9:35 AM, Juan C. Crespo R.<jcrespo at ifxnw.com.ve> wrote:> Hi > > ??? Guys I wonder if its possible to set a different MoH based on groups, I > mean if one of the Admin group put on hold the call play music 1, if another > from Technical Support put on hold the call play music 3,? something like > this > > Admin - Music1 > Contrallors - Music 2 > Technical Support -? Music 3Seems like a perfect use of SetMusicOnHold.. <http://www.voip-info.org/wiki/view/Asterisk+cmd+SetMusicOnHold> -jonathan
Juan C. Crespo R. schrieb:> Guys I wonder if its possible to set a different MoH based on > groups, I mean if one of the Admin group put on hold the call play music > 1, if another from Technical Support put on hold the call play music 3, > something like this > > Admin - Music1 > Contrallors - Music 2 > Technical Support - Music 3Some dialplan logic around Set(CHANNEL(musicclass)=...) should do the trick I guess. Maybe the easiest way (in Asterisk 1.6) would be to add setvar=musicclass=admin / setvar=musicclass=support / ... to your SIP peers and then do something like _X. => { Set(CHANNEL(musicclass)=${SIPPEER(${EXTEN},chanvar[musicclass])}) Dial(SIP/${EXTEN}); } in your dialplan (untested). Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de --
Depending on how your dialplan is set you can use the SetMusicOnHold application after creating classes in your musiconhold.conf http://www.asteriskguru.com/tutorials/setmusiconhold.html Ish Juan C. Crespo R. wrote:> Hi > > Guys I wonder if its possible to set a different MoH based on > groups, I mean if one of the Admin group put on hold the call play > music 1, if another from Technical Support put on hold the call play > music 3, something like this > > Admin - Music1 > Contrallors - Music 2 > Technical Support - Music 3 > > Thanks > -- > ------------------------------------------------------------------------ > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Ishfaq Malik Software Developer PackNet Ltd Office: 0161 660 3062
I do this using the setvar facility in sip.conf.
eg. setvar=MOH=music1
Then in the dialplan (extensions.conf) all you need to do is
'Set(CHANNEL(musicclass)=${MOH})'
Remember, setvar in sip.conf makes that variable a global variable.
Andrew Thomas
Technical Services Manager
Juan C. Crespo R. wrote:> Hi
>
> Guys I wonder if its possible to set a different MoH based on
> groups, I mean if one of the Admin group put on hold the call play
> music 1, if another from Technical Support put on hold the call play
> music 3, something like this
>
> Admin - Music1
> Contrallors - Music 2
> Technical Support - Music 3
>
> Thanks
You can use 'Set(CHANNEL(musicclass)=${MOH})' anywhere in your dialplan
- so you can set it at any stage of an inbound or outbound call (as long as it
is before the Dial/Queue command).
Eg:
[inbound]
exten => _X.,1,Set(CHANNEL(musicclass)=${MOH})
exten => _X.,n,Dial(whomever-you-want)
[outbound]
exten => _X.,1,Set(CHANNEL(musicclass)=${MOH})
exten => _X.,n,Dial(where-ever-you-want)
Then, when 'whomever-you-want' puts the call on hold - they get
'whomever-you-want's MOH.
Simples :)
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces
at lists.digium.com] On Behalf Of Philipp Kempgen
Sent: 24 July 2009 14:20
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Music on hold based on user
Andrew Thomas schrieb:> I do this using the setvar facility in sip.conf.
>
> eg. setvar=MOH=music1
>
> Then in the dialplan (extensions.conf) all you need to do is
> 'Set(CHANNEL(musicclass)=${MOH})'
> Juan C. Crespo R. wrote:
>> Guys I wonder if its possible to set a different MoH based on
>> groups, I mean if one of the Admin group put on hold the call play
>> music 1, if another from Technical Support put on hold the call play
>> music 3, something like this
>>
>> Admin - Music1
>> Contrallors - Music 2
>> Technical Support - Music 3
The way I understood the OP was that he wants different MoH classes
depending on the callee (not depending on the caller).
Philipp Kempgen
--
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de
--
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users