Initiate a call with an announcement on both channels

Hi Everyone,

I hope you can help. I’m trying to put a dialplan together which bridges an incoming call to the CONSOLE/ALSA channel (it plays out incoming audio to a sound card connected to a tannoy system).

I’ve got this :
exten => 140,1,NoOp(Tannoy Announcement Call)
exten => 140,2,Dial(CONSOLE/ALSA,20,G)

The audio to the sound card streams immediately which is GREAT! However, I’d like to introduce a bingbong sound on both channels when the call is bridged. So the caller knows they are connected, and the ‘audience’ hears a bingbong before the announcer starts talking.

Does anyone know of a simple way to play a WAV into the call immediately after the call connects please? The ALSA device is on auto answer so the connection is without delay, but then if I can auto play the audio file to both channels that would be perfect.

I’ve tried Playback, Background, and a number of others, but of course the Dialplan hangs after the Dial command until there is another call event, like a Hangup. Can I continue the Dialplan after the call establishes to initiate a playback? Or trigger a macro on call connection?

Thanks so much for help. I’m plumbing this for free so I don’t have to manually go to the office every 30 mins to make announcements on the tannoy. I’m trying to replace a really messy mic + ATA & analog converter with one Rasp PI and a sound board, using Asterisk to replace the dodgy ATA and a self written script to generate call files that then play announcements via Asterisk (If I use Asterisk to play the announcements, if anyone tries to dial in to do an announcement, the ALSA channel will be engaged if it’s doing a pre-rec announce).

Any support on this would be hugely valued,

Bon

The G option, if well formed, which I don’t think it is, will prevent the call being bridged! It will GoTo out of Dial before the bridge would be formed.

The A option on all currently supported versions of Asterisk allows announcements, which can be different, to be made on both sides. It will probably even work in conjunction with G as it is the last thing tested before G.

I’ve checked the code and G will be ignored without its arguments.

Hi David,

Really appricate your help, Thank You.

I changed my G to an A, like this…
exten => 140,1,NoOp(Tannoy Announcement Call)
exten => 140,2,Dial(CONSOLE/ALSA,20,A)
exten => 140,3,Background(bingbong)
exten => 140,4,Hangup()

Still no joy though. In my Asterisk call log I get this :
[Feb 25 17:35:10] WARNING[19845]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 141
[Feb 25 17:35:10] NOTICE[19844]: res_pjsip_geolocation.c:194 handle_incoming_request: PJSIP/141-00000001: Endpoint has no geoloc_incoming_call_profile. Done.
– Executing [140@tannoy:1] NoOp(“PJSIP/141-00000001”, “Tannoy Announcement Call”) in new stack
– Executing [140@tannoy:2] Dial(“PJSIP/141-00000001”, “CONSOLE/ALSA,20,A”) in new stack
<< Call placed to ‘ALSA’ on console >>
<< Auto-answered >>
– Called CONSOLE/ALSA
– ALSA/default answered PJSIP/141-00000001
> 0x7f6c0449f0 – Strict RTP learning after remote address set to: 10.1.0.238:31868
– Channel ALSA/default joined ‘simple_bridge’ basic-bridge
[Feb 25 17:35:10] WARNING[19853][C-00000002]: chan_alsa.c:573 alsa_indicate: Don’t know how to display condition 26 on ALSA/default
– Channel PJSIP/141-00000001 joined ‘simple_bridge’ basic-bridge
[Feb 25 17:35:10] WARNING[19853][C-00000002]: chan_alsa.c:573 alsa_indicate: Don’t know how to display condition 26 on ALSA/default
> 0x7f6c0449f0 – Strict RTP switching to RTP target address 10.1.0.238:31868 as source
> 0x7f6c0449f0 – Strict RTP learning complete - Locking on source address 10.1.0.238:31868
– Channel PJSIP/141-00000001 left ‘simple_bridge’ basic-bridge
– Channel ALSA/default left ‘simple_bridge’ basic-bridge
== Spawn extension (tannoy, 140, 2) exited non-zero on ‘PJSIP/141-00000001’
[Feb 25 17:35:25] WARNING[19853][C-00000002]: chan_alsa.c:573 alsa_indicate: Don’t know how to display condition 26 on ALSA/default
<< Hangup on console >>
[Feb 25 17:35:25] WARNING[19844]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 141

The audio relay works great, I can hear my voice from the phone coming through the audio out on the PI, with very little delay. However it’s still not doing the little bingbong wav on connection to both channels. ARG!!!

Any other ideas? I really appreciate the advice,

Bon

You didn’t provide any arguments to A!

Priority 3 will not be run unless and until the call fails, in which ce there will no callee to wake up. Dial doesn’t just dial; it also supervises the call, unless you provide valid arguments for G, but, in that case, it won’t even bridge the call.

Also, Background does more than play an announcement; if it was otherwise reasonable to procedurally play one, you would use Playback.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.