Welcome, Guest. Please login or register.
Did you miss your activation email?
July 30, 2010, 12:11:24 AM
Home Help Search Login Register
News: Noojee Receptionist 3.5 Beta 2 released with Asterisk 1.6 support.
See the full details here.

+  Noojee Telephony Solutions Forums
|-+  Noojee Receptionist
| |-+  General Discussion
| | |-+  Music on hold trc-inbound
« previous next »
Pages: [1] Print
Author Topic: Music on hold trc-inbound  (Read 794 times)
sebele67
Jr. Member
**
Offline Offline

Posts: 61


« on: September 12, 2009, 01:24:02 AM »

Hi!

Some of our customer wants to play music instead of the ringing on incoming calls

Have you a solution for this?
Logged
Brett Sutton
Asterisk IT Staff
Sr. Member
*****
Offline Offline

Posts: 404



« Reply #1 on: September 12, 2009, 11:27:05 AM »

I suspect that you can change the dial plan as follows

[default]
exten => trc-inbound, 1, answer
; exten => trc-inbound, 2, ringing  -- remove this line
exten => trc-inbound, 2, musiconhold() ; and replace it with this line.
exten => trc-inbound, 3, wait(7)
exten => trc-inbound, 4, GotoIf($[trc${trc-running} = trc]?7)
exten => trc-inbound, 5, wait(23)
exten => trc-inbound, 6, goto(trc-inbound,2)
exten => trc-inbound, 7, Return()
Logged
sebele67
Jr. Member
**
Offline Offline

Posts: 61


« Reply #2 on: September 12, 2009, 06:32:26 PM »

I have already tried this.

When it answers I only have the musiconhold and the dialplan doesn't exit if trc is not running.
When Asterisk comes on musiconhold it stops execute the dialplan.

Any others ideas?

Logged
rlsutton1
Administrator
Jr. Member
*****
Offline Offline

Posts: 56


« Reply #3 on: September 22, 2009, 09:57:10 AM »

Hi,
 You'll have to use the background command as musiconhold stops the flow of the dialplan. background doesn't use the moh class so you'll have to provide the sound files for it to play. given that the dial plan loops every 30 seconds you'll need to make sure the file is 30 seconds long.

[default]
exten => trc-inbound, 1, answer
; exten => trc-inbound, 2, ringing  -- remove this line
exten => trc-inbound, 2, background(messageSoundFile) ; and replace it with this line.
Logged
rlsutton1
Administrator
Jr. Member
*****
Offline Offline

Posts: 56


« Reply #4 on: September 22, 2009, 03:17:24 PM »

you could also try startmusiconhold() in stead of background
Logged
sebele67
Jr. Member
**
Offline Offline

Posts: 61


« Reply #5 on: September 23, 2009, 06:45:50 PM »

Thanks,
startmusiconhold() work great
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!