How to Budge into a call with an audio file every 30 seconds

Hi All,

I would like to know how to play an audio file every 30 seconds between participants in a call on FreePBX 12.0.76.3? Ideally I would like this to apply to every call on both the caller and the individual being called.

Regards,
Kevin

I can’t think of a way to do that reliably.

I can think of some ahcky, kludgy, might work sometimes ways, but not reliably.

That sounds like something you should talk to the commercial support guys about.

Just add the L(x,y,z) option and the relevant file references to your dial command, ref:-

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial

1 Like

It is not difficult to apply @dicko’s suggestion by modifying the dial options for the trunk in the GUI, but that will only work for outbound calls. Inbound calls would be considerably more difficult.

@dicko, thanks for the suggestion. But can I add these options in the FreePbx GUI as per @lgaetz suggestion without a trunk as I am currently testing this solution locally on SIP phones.

Please note that I am still relatively new to Asterisk and FreePBX so my questions might be a bit basic.

@cynjut, just curious what is ahcky, kludgy suggestion?

They can be added seperately as needed for outbound calls and for inbound/internal calls in the GUI’s “Advanced Settings” as something like L(100000000,999990000,30000) :-

Asterisk Dial Options

and

Asterisk Outbound Trunk Dial Options

The “variables” referenced in the dial command

could be defined also as needed in

/etc/asterisk/globals_custom.conf

LIMIT_WARNING_FILE = custom/myannouncement

@dicko, with the options above I get (503) service unavailable from both my extensions. I have two extensions setup. But as soon as I revert to the default options, “Ttr” I can successfully make calls between the extensions. Is there perhaps something I am missing?

Don’t replace , just append (see the link I posted for the exact syntax for how options should look like, maybe post yor work here here) watch the CLI for errors reported

Please see the output of Asterisk Log Files here → [2016-09-24 14:27:32] VERBOSE[1916] res_agi.c: == AGI Command 'asyncagi break' r - Pastebin.com limited to 1000 entries. I am using extension 204 to call extension 203

Below is how my Asterisk Dial Options looks like.

I typo’ed , the arguments to L() are : separated , did you read the link I posted for the exact syntax ?

Thanks @dicko, the typo was the problem. I can successfully playback the number of seconds remaining in a call.

Quick question, what format does the LIMIT_TIMEOUT_FILE have to be, e.g mp3, wav, e.t.c?

Again is it possible to play the timeout audio simultaneously between the caller and callee when LIMIT_PLAYAUDIO_CALLEE is set to yes. Currently it plays to the caller first, then plays to the callee.

Asterisk will use and transcode if necessary and it can , the best file named custom/myannouncement.* , don’t use mp3, wav or slin is good.

As to the LIMIT_PLAYAUDIO* I suggest you use what works for you, I have only used the defaults

I’m intrigued, Why do you want this?

I have successfully managed to play a custom file a as a *.sln and also after modifying file and folder permissions.

We are working on a museum tour guide solution with both live and recorded audio (hence the 30 seconds). Next step in this will be in conferencing a group of people on one tour. But I will probably open a new topic for that should I run into further problems.

Can you perhaps point me in the right direction with regards to the LIMIT_PLAYAUDIO_CALLEE? This behaviour has also been noted here --> forums.asterisk.org/viewtopic.php?f=1&t=79850

Well, I guess you get what you get and this won’t work for you.

Perhaps use the JACK_HOOK function if app_jack has been compiled into your asterisk, also perhaps an EAGI solution, also you could just rely on conferences. All these should be considered advanced and the GUI won’t help you there.

Good Luck

This solution was very promising but I think maybe I should just consider conferences.

Do you perhaps know of a quick howto guide on conferencing with particular emphasis on the context of what the L(100000000,999990000,30000) dial option does?

Sorry but I don’t think you will find a “quick howto guide” for your edge case (nor someone to write it for you for free :slight_smile: ). But I am sure if you read and absorb

http://asterisk-service.com/downloads/Asterisk-%20The%20Definitive%20Guide,%204th%20Edition.pdf

a few times, you would be well on your way to writing it yourself.

Good Luck