Automatic call outgoing

Hi everyone,
i would like reproduce a message when i put a .call file inside /var/spool/asterisk/outgoing.
everything works but when the extention that i have to call is a ring group the sound message is not played.


ring group ext: 2001 file:

Channel: Local/[email protected]
MaxRetries: 2
RetryTime: 60
WaitTime: 45
Context: alert-filmtermo
Extension: s


exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(custom/alertfilmtermo)
exten => s,n,Wait(1)
exten => s,n,Goto(s,3) ; replay message
exten => s,n,Hangup()

Are you sure that it isn’t being played as early media. If the ring group answers the call, the action will start immediately.

You have a redundant answer() at the start of your action (the all is already up before the dialplan is started), but there is an equivalent answer in the ring group logic, that would cause the message to be played too early. I seem to remember that there is an option that controls whether FreePBX will answer early, but I can’t find it on a quick search.

Yes I’m sure! nothing is played. i have tried to remove answer() but nothing has changed

The answer in your code is redundant. Removing it will just speed things up by a few milliseconds. The question was whether the ring group extension tries to answer the call before entering the queue.

Could you please provide logs, at at least verbosity 5, for the execution of the call file. The forum preference is to upload them to, and they should be taken directly from the log file, not screen scraped.

I have found this:
WARNING[8312][C-00004e96] app_playback.c: Playback failed on Local/[email protected];1 for custom/alertfilmtermo

I’d expect a message shortly before that as to why ast_streamfile failed. However, it does appear that it is not being played, as against being played too soon.

One thought is that this is because you are relying on a language recorded against the external destination. I believe a ring group is really a special case of a queue and, unlike when using the Dial application, the local channel won’t be optimised out, so Playback would see the local channel’s language. However, I’m not sure if language prefixes are considered when there is a directory in the name. What is the full path to the file you are trying to play?

the full patch is / var / lib / asterisk / sounds / it / custom, but I think Playback (custom / alertfilmtermo) is ok because if I set Channel: SIP / 212 (212 is an extension) everything works

i found the solution! i set the full path / var / lib / asterisk / sounds / it / custom and it works!

thankyou @david55

1 Like

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