More Intercom Help

EagleLink
Posts: 86
Member Since:
2006-11-26

ok, I asked before how to possibly set up music over the intercom that is interupted when someone speaks. dickson was kind enough to point me to the following link.

http://www.trixbox.org/modules/newbb/viewtopic.php?viewmode=thread&topic...

But now I have another question, how can I pre-record a message and send it to the intercom? I have found one wat to do it, instead of using the meetme command, I can use the dial command to call the conference room, specifying a macro to run. Before the conference room is dialed, I can record a message. Then, in the macro, I can have the message played to the conference room. This seems to work, except I can't get it to hang up right away after the playback. This also requires staying on the phone while the message is being played to keep the line open. So my challenge for the people that know a little more, or a lot more, than me, is to be able to pre-record a message, hang up, then hear the message over the intercom. Either through Dialing the console/dsp or dialing a conference room. The conference room is preferred because that is how I get the music on the intercom until someone joins the conference, then the music stops.



crees
Posts: 293
Member Since:
2006-08-09
Re: More Intercom Help

Here is another way to do a page. This method will allow you to dial a number (in this case 111) and then it will do a double beep. You then say the mesage, hang up and then it will play back via the alsamixer (PCM channel) over the speakers/amp system through the sound card speaker output. However you will need to use the mic-input for your music source for it to work effectivly (and also have your mixer settings set right) This setup will also allow your MOH to work without your callers hearing the page.

Fist open up extensions_additional.conf in the configedit program

Add the page context below the Global variables part of extensions_additional.conf (the global variables are the fist part of the conf file)

[page]
exten => s,1,Record(page:wav)
exten => h,s,System(aplay /var/lib/asterisk/sounds/page.wav)

Find the [app-speakingclock] context and add the following lines after the "exten => *60,n,Hangup" but before ";end of [app-speakingclock]"

exten => 111,1,Answer
exten => 111,n,Wait(1)
exten => 111,n,Playback(beep)
exten => 111,n,Goto(page,s,1)

You will need to run alsamixer and unmute the PCM channel and adjust it to the right level (the page volume) including any master volume levels etc.(just like you would on a windows volume mixer) NOTE: this setup was configured with my MOH setup with mic in. Its possible that if this does not work that you will need give rights/permmission to asterisk to run the sound card. Here is more info on that

http://www.trixbox.org/modules/newbb/viewtopic.php?topic_id=9966&...

This whole setup is entirely using the sound card for line-in/mic-in source of music and speaker output music and paging. I am now working on getting the line-in/mic-in to mute when there is a page and I should have that solved here soon using amixer arguments. Basically I just need to manipulat the mixer playback volume to go down before the page and then go back up after. This effect will sound more professional and clean.

Hope this helps and will give you some ideas on how to use the recorder page method using the sound card(if your pc has one).

crees



EagleLink
Posts: 86
Member Since:
2006-11-26
Re: More Intercom Help

That will definately help if I decide to use the line in for music on hold, but if possible I would like to use the conference idea. By putting a user and admin password on the conference, the intercom feature can connect to the conference without any problems, but nobody from the outside can without the password. And as admin, I can login and lock the conference, which will disable paging with the feature code set up and tell them that it is locked. I guess what I would need to figure out how to do, is make some kind of dummy extension dial the conference, play back the sound, then hang up. The way it is set up now is making my extension dial the conference and play back the message, which means I can't hang up until it is done. Any ideas on making a dummy extension call the conference room? Maybe a softphone on the trixbox machine with auto answer? I'll post what I have that works right now. These are called from feature codes added using misc applications.

[custom-intercom-announce]
;make an announcement
exten => s,1,ChanIsAvail(console/dsp|j) ;check if soundcard is in use, if so, jump to n+101
exten => s,2,Dial(console/dsp,,A(niceding)) ;connect to sound card and play 'niceding'
exten => s,5,Hangup
exten => s,102,MeetMe(1,1,7635) ;enter soundcard conference
exten => s,103,Hangup

[custom-intercom-prerecord]
exten => s,1,Wait(1)
exten => s,2,Playback(jedi-extension-trick)
exten => s,3,Record(/tmp/intercom:gsm)
exten => s,4,ChanIsAvail(console/dsp|j)
exten => s,5,Dial(console/dsp,,A(/tmp/intercom))
exten => s,6,Hangup
;exten => s,105,MeetMe(1,1,7635)
;decided to use local dial instead of meetme because meetme didn't allow me to use playback.
exten => s,105,Dial(Local/1@from-internal/n,10,M(pre-record))
exten => s,106,Hangup

[custom-intercom-music]
;overhead music on/off
exten => s,1,ChanIsAvail(console/dsp|j) ;check if soundcard is in use, if yes, jump to n+101
exten => s,2,Playback(conference)
exten => s,3,Playback(activated)
exten => s,4,Dial(console/dsp,,M(music)) ;call the sound card and send to macro 'music'
exten => s,5,Hangup
exten => s,102,Softhangup(OSS/dsp|a) ;hang up the sound card
exten => s,103,Playback(conference)
exten => s,104,Playback(de-activated)
exten => s,105,Hangup

[macro-music]
exten => s,1,SetMusicOnHold(stream1) ;set on-hold music to the correct context
exten => s,2,MeetMe(1,M1q,7635) ;enter conference quietly with music-on-hold

[macro-pre-record]
exten => s,1,Wait(1)
exten => s,2,Playback(/tmp/intercom)



bubbapcguy
Posts: 3774
Member Since:
2006-06-02
Re: More Intercom Help

look at the Announcement module in fpbx
you can do some cool stuff with that

also look at the custom recording at the bottom of the extension_custom.conf

I have it so they can record messages and by dialing an set exten trigger the Announcement to play in the conference.



EagleLink
Posts: 86
Member Since:
2006-11-26
Re: More Intercom Help

ok, I was up all night, which is normal for me, I work nights, but last night was my day off. Anyway, I came up with the following code.

[custom-intercom-announce]
;make an announcement
exten => s,1,ChanIsAvail(console/dsp|j)
exten => s,2,Dial(console/dsp,,M(intercom-ding)H)
exten => s,5,Hangup
exten => s,102,Dial(Local/1@from-internal/n,10,M(intercom-ding)o)
exten => s,103,Hangup

[custom-intercom-prerecord]
exten => s,1,Wait(1)
exten => s,2,Playback(jedi-extension-trick)
;exten -> s,2,Festival('Record your page after the tone.') ;Can't seem to get this to work, Flite either.
exten => s,3,Record(/tmp/intercom-${CALLERID(num)}:gsm)
exten => s,4,ChanIsAvail(console/dsp|j)
exten => s,5,Dial(console/dsp,,M(intercom-prerecord)S(1)o)
exten => s,6,Hangup
exten => s,105,Dial(Local/1@from-internal/n,10,M(intercom-prerecord)S(1)o)
exten => s,106,Hangup

[custom-intercom-music]
;overhead music on/off
exten => s,1,ChanIsAvail(console/dsp|j)
exten => s,2,Playback(conference)
exten => s,3,Playback(activated)
exten => s,4,Dial(console/dsp,,M(intercom-music))
exten => s,5,Hangup
exten => s,102,Softhangup(OSS/dsp|a)
exten => s,103,Playback(conference)
exten => s,104,Playback(de-activated)
exten => s,105,Hangup

[macro-intercom-music]
exten => s,1,SetMusicOnHold(default)
exten => s,2,MeetMe(1,M1q,7635)

[macro-intercom-ding]
exten => s,1,Wait(1)
exten => s,2,Playback(niceding)

[macro-intercom-prerecord]
exten => s,1,Wait(1)
exten => s,2,Playback(niceding)
exten => s,3,Playback(/tmp/intercom-${CALLERID(num)})

---------------------------------------------------------------------------------

Ok, now if anyone can give me help getting Flite or Festival to work here I'd appreciate it. Also, I would like to have it ask the person to accept, replay, or re-record the message. If anyone is wondering about the ${CALLERID(num)} part, once I figure out the menu system, I would like to add in the beginning to record a new page or repeat the last page. This method records the pages from different extensions as "/tmp/intercom-102.gsm" so that my idea will be possible later.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.