QUESTION Play audio after caller hangs up for paging system

michaelb

New Member
Joined
Feb 12, 2014
Messages
19
Reaction score
2
Hope this makes sense, I'll try and explain it as best as I can.

I'm installing a new system to replace an Avaya one. They have a pager system that plugs directly into one of the cards on the Avaya. I have tried to simply put in a new extension on a FXS port directly wired into the pager, but it just heavily distorts the phone ringing sound, and doesn't pick up. I believe that this is because the Avaya was sending just the audio from the call out on that line through the card.

So, I've built a device out of an old corded phone and an Arduino that now sits in the middle between the FXS and the pager, it's designed to detect ringing, answer the call, and allow the audio to be transmitted for 10 seconds, before closing the call physically, like any other corded phone would.

The problem is this: If the extension calling the paging extension (501) hangs up before the end of that 10 seconds, I get the 'beep beep beep beep' sound of the line being disconnected until the 10 seconds are up. I'd really like it to play an audio file after the caller hangs up.

Why? I think that if i upload a blank wav file in the correct format and of length 10 seconds, that would keep the beep beep sound from playing across the output.

I think it should be possible creating a custom configuration, but I'm not familiar enough to know where to start. Any thoughts would be greatly appreciated.

Thanks!
 

Bart

Active Member
Joined
Nov 14, 2007
Messages
447
Reaction score
25
You probably need a matching transformer to match the impedance of the FXO (600 ohms) to Microphone input (1.2 K ohms)

My choice:

Modify an old sip phone to auto-answer and have speaker or handset go to amplifier input - may need matching transformer. Inside user just dials ext to this phone. I might create a custom context that when dialed will record messages from inside caller and use callfile to dial phone and play message (like above)
 

michaelb

New Member
Joined
Feb 12, 2014
Messages
19
Reaction score
2
Thanks for the quick response Bart, I think though I may need to explain a little more.

It's not as much an issue of getting the audio out, in fact I think it might all be working well enough for the needs. I will look at modifying an old sip phone i have around here too.

Is there any way of playing a wave file at the hangup of the originating call?
 

phonebuff

Guru
Joined
Feb 7, 2008
Messages
1,117
Reaction score
129
So,

Algo which has great tools is making an announcement at Asricon --

http://www.algosolutions.com/products/audible-and-visual-alerting/8301.html

Also, at one time there was a post here by the late John Mullinix on a tool for this. You called in, and had couple of options to record / playback, start over or finish. When you finished it would create and submit a call file to send the page over the intercom. Don't know if that script survived the great crash, or if anyone here might still have a copy.

=
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,779
Reaction score
2,192
Even though John Mullinix has passed away, his legacy of helping users remains. Here is the post for the delayed paging and I have copied the initial code below:

http://pbxinaflash.com/community/threads/delayed-paging.2654/

and someone else here: https://www.erunaheru.com/delayed-paging-on-freepbx-asterisk-with-collision-handling/


Code:
I have had customers that would like to have delayed paging. This cuts down on the feedback if the extension creating the page is near a paging speaker. Here is the code. Both extensions are in the from-internal-custom context.

[from-internal-custom]

; Delayed paging. It this case, you dial 3205 to activate the paging system
; This context records your page, creates a call file that plays the message
; back. Extension 3206 actually plays back the file once the paging system
; answers. The third line of 3205 is used to set the extension number of your
; paging system.
exten => 3205,1,Answer
exten => 3205,2,Wait(2)
exten => 3205,n,set(pageext="local/305")
exten => 3205,n,flite(Reecord your message and then press the pound key)
exten => 3205,n,record(asterisk-recording:ulaw)
exten => 3205,n,system(echo "Channel: ${pageext}" > /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "WaitTime: 20" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "Context: from-internal" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "Extension: 3206" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "Priority: 1" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(chmod 777 /var/spool/asterisk/outgoing/john.call)
exten => 3205,n,system(mv /var/spool/asterisk/tmp/john.call /var/spool/asterisk/outgoing/)
exten => 3205,n,hangup()

exten => 3206,1,playback(beep)
exten => 3206,n,playback(asterisk-recording)
exten => 3206,n,Wait(2)
exten => 3206,n,Hangup
 
Last edited:

mp3geek

Guru
Joined
Nov 1, 2007
Messages
106
Reaction score
11
Even though John Mullinix has passed away, his legacy of helping users remains. Here is the post for the delayed paging and I have copied the initial code below:

http://pbxinaflash.com/community/threads/delayed-paging.2654/

and someone else here: https://www.erunaheru.com/delayed-paging-on-freepbx-asterisk-with-collision-handling/


Code:
I have had customers that would like to have delayed paging. This cuts down on the feedback if the extension creating the page is near a paging speaker. Here is the code. Both extensions are in the from-internal-custom context.

[from-internal-custom]

; Delayed paging. It this case, you dial 3205 to activate the paging system
; This context records your page, creates a call file that plays the message
; back. Extension 3206 actually plays back the file once the paging system
; answers. The third line of 3205 is used to set the extension number of your
; paging system.
exten => 3205,1,Answer
exten => 3205,2,Wait(2)
exten => 3205,n,set(pageext="local/305")
exten => 3205,n,flite(Reecord your message and then press the pound key)
exten => 3205,n,record(asterisk-recording:ulaw)
exten => 3205,n,system(echo "Channel: ${pageext}" > /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "WaitTime: 20" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "Context: from-internal" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "Extension: 3206" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(echo "Priority: 1" >> /var/spool/asterisk/tmp/john.call)
exten => 3205,n,system(chmod 777 /var/spool/asterisk/outgoing/john.call)
exten => 3205,n,system(mv /var/spool/asterisk/tmp/john.call /var/spool/asterisk/outgoing/)
exten => 3205,n,hangup()

exten => 3206,1,playback(beep)
exten => 3206,n,playback(asterisk-recording)
exten => 3206,n,Wait(2)
exten => 3206,n,Hangup


I was just going to dig into my code snippets to find John's code above, when I saw kenn10 beat me to it. I have used it basically as is, just changing extension numbers to more closely match my system. I used a Grandstream phone set to auto-answer and had a line level audio cable plugged in to the headset jack. WAY cheaper than any other alternative I have found. Worked swimmingly :)
 

Members online

Forum statistics

Threads
25,812
Messages
167,763
Members
19,241
Latest member
bellabos
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top