[asterisk-users] MusicOnHold class working for internal calls, not for external

Ishfaq Malik ish at pack-net.co.uk
Thu Aug 26 05:32:11 CDT 2010


On Thu, 2010-08-26 at 12:10 +0200, Jonas Kellens wrote:
> Hello list,
> 
> I have defined a new MoH-class in musiconhold.conf :
> 
> [default]
> mode=files
> directory=/var/lib/asterisk/moh
> random=yes
> ;
> [106002]
> mode=files
> directory=/var/lib/asterisk/moh/106002
> random=yes
> 
> In sip.conf I have this commented out :
> 
> ;mohinterpret=default
> ;mohsuggest=default
> 
> Asterisk sees these moh-classes and files :
> 
> vps2301*CLI> moh show classes
> Class: default
>     Mode: files
>     Directory: /var/lib/asterisk/moh
> Class: 106002
>     Mode: files
>     Directory: /var/lib/asterisk/moh/106002
> vps2301*CLI> moh show files
> Class: default
>     File: /var/lib/asterisk/moh/macroform-cold_day
>     File: /var/lib/asterisk/moh/macroform-robot_dity
>     File: /var/lib/asterisk/moh/macroform-the_simplicity
>     File: /var/lib/asterisk/moh/reno_project-system
>     File: /var/lib/asterisk/moh/fpm-calm-river
>     File: /var/lib/asterisk/moh/manolo_camp-morning_coffee
>     File: /var/lib/asterisk/moh/fpm-sunshine
>     File: /var/lib/asterisk/moh/fpm-world-mix
> Class: 106002
>     File: /var/lib/asterisk/moh/106002/Long2
> 
> 
> In my SIP peer definitions I have :
> 
> musiconhold=106002
> 
> 
> 
> Now, when SIPuser1 calls internally to SIPuser2, then the MoH-class
> '106002' is used and the files which reside in the
> directory /var/lib/asterisk/moh/106002.
> 
> But when there is an external call, and SIPuser1 wants to put this
> call on hold, then MoH-class 'default' is used !!
> 
> 
> How can I have MoH-class '106002' also for external calls ?!
> 
> 
> 
> Kind regards,
> 
> Jonas.
> -- 
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

I always though for external calls you had to use SetMusicOnHold in the
dialplan

http://www.voip-info.org/wiki/view/Asterisk+cmd+SetMusicOnHold

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062




More information about the asterisk-users mailing list