Broadcasting: delay in playing a message on answer

Is there a way to change the behavior, or did that change in one of the recent updates? Ideally I’d like it to behave the way it did before. I tested on my cell phone and if I don’t say anything it waits about 10 seconds before it starts playing the message. If I answer right away and say hello it waits 2-3 more seconds before playing the message. Getting a lot of complaints about a blank message playing, but I’m pretty sure that’s them just hanging up before it plays anything.

Broadcast module is at 13.0.11
PBX Firmware: 10.13.66-14
FreePBX 13.0.167

This is from the asterisk log when I didn’t say anything, so about a 6 second delay between it detecting the call was answered (seems to be a good 1 second delay from when the phone thinks it answered) and when the audio started playing. Probably doesn’t help that there’s about a 1 second pause at the beginning of the recording as well. I replaced the cell phone number with NXXXXXXXXX for this thread in case anyone is confused by that.

[2016-09-02 11:21:49] dial.c: Local/NXXXXXXXXX@from-internal-0000063e;1 answered
[2016-09-02 11:21:49] pbx.c: Executing [s@broadcast-campaign-10:1] Set(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “CALLERID(name)=robert cell”) in new stack
[2016-09-02 11:21:49] pbx.c: Executing [s@broadcast-campaign-10:2] Set(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “CALLERID(num)=NXXXXXXXXX”) in new stack
[2016-09-02 11:21:49] pbx.c: Executing [s@broadcast-campaign-10:3] Set(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “MACHINE=0”) in new stack
[2016-09-02 11:21:49] pbx.c: Executing [s@broadcast-campaign-10:4] Answer(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “”) in new stack
[2016-09-02 11:21:49] pbx.c: Executing [s@broadcast-campaign-10:5] Set(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “_STATE=answered”) in new stack
[2016-09-02 11:21:49] pbx.c: Executing [s@broadcast-campaign-10:6] AGI(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “broadcast_log.php”) in new stack
[2016-09-02 11:21:49] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/broadcast_log.php
[2016-09-02 11:21:49] bridge_channel.c: Channel Local/NXXXXXXXXX@from-internal-0000063e;2 joined ‘simple_bridge’ basic-bridge
[2016-09-02 11:21:49] res_agi.c: <Local/NXXXXXXXXX@from-internal-0000063e;1>AGI Script broadcast_log.php completed, returning 0
[2016-09-02 11:21:49] pbx.c: Executing [s@broadcast-campaign-10:7] AMD(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “”) in new stack
[2016-09-02 11:21:49] app_amd.c: AMD: Local/NXXXXXXXXX@from-internal-0000063e;1 (N/A) (N/A) (Fmt: slin)
[2016-09-02 11:21:49] app_amd.c: AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256] maximumWordLength [5000]
[2016-09-02 11:21:49] app_amd.c: AMD: Channel [Local/NXXXXXXXXX@from-internal-0000063e;1]. Changed state to STATE_IN_SILENCE
[2016-09-02 11:21:50] app_amd.c: AMD: Channel [Local/NXXXXXXXXX@from-internal-0000063e;1]. Short Word Duration: 80
[2016-09-02 11:21:51] app_amd.c: AMD: Channel [Local/NXXXXXXXXX@from-internal-0000063e;1]. Detected Talk, previous silence duration: 1200
[2016-09-02 11:21:51] app_amd.c: AMD: Channel [Local/NXXXXXXXXX@from-internal-0000063e;1]. Short Word Duration: 20
[2016-09-02 11:21:53] app_amd.c: AMD: Channel [Local/NXXXXXXXXX@from-internal-0000063e;1]. ANSWERING MACHINE: silenceDuration:2500 initialSilence:2500
[2016-09-02 11:21:53] pbx.c: Executing [s@broadcast-campaign-10:8] GotoIf(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “0?human,1”) in new stack
[2016-09-02 11:21:53] pbx.c: Executing [s@broadcast-campaign-10:9] NoOp(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “Unsure. Treating as machine.”) in new stack
[2016-09-02 11:21:53] pbx.c: Executing [s@broadcast-campaign-10:10] WaitForSilence(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “1000”) in new stack
[2016-09-02 11:21:53] app_waitforsilence.c: Waiting 1 time(s) for 1000 ms silence with 0 timeout
[2016-09-02 11:21:54] app_waitforsilence.c: Exiting with 1000ms silence >= 1000ms required
[2016-09-02 11:21:54] pbx.c: Executing [s@broadcast-campaign-10:11] Set(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “MACHINE=1”) in new stack
[2016-09-02 11:21:54] pbx.c: Executing [s@broadcast-campaign-10:12] Set(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “_STATE=machine”) in new stack
[2016-09-02 11:21:54] pbx.c: Executing [s@broadcast-campaign-10:13] AGI(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “broadcast_log.php”) in new stack
[2016-09-02 11:21:54] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/broadcast_log.php
[2016-09-02 11:21:55] res_agi.c: <Local/NXXXXXXXXX@from-internal-0000063e;1>AGI Script broadcast_log.php completed, returning 0
[2016-09-02 11:21:55] pbx.c: Executing [s@broadcast-campaign-10:14] Goto(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “app-announcement-10,s,1”) in new stack
[2016-09-02 11:21:55] pbx_builtins.c: Goto (app-announcement-10,s,1)
[2016-09-02 11:21:55] pbx.c: Executing [s@app-announcement-10:1] GotoIf(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “1?begin”) in new stack
[2016-09-02 11:21:55] pbx_builtins.c: Goto (app-announcement-10,s,4)
[2016-09-02 11:21:55] pbx.c: Executing [s@app-announcement-10:4] NoOp(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “Playing announcement SCS Card Broadcast”) in new stack
[2016-09-02 11:21:55] pbx.c: Executing [s@app-announcement-10:5] Playback(“Local/NXXXXXXXXX@from-internal-0000063e;1”, “custom/scs-card-broadcast,noanswer”) in new stack
[2016-09-02 11:21:55] file.c: <Local/NXXXXXXXXX@from-internal-0000063e;1> Playing ‘custom/scs-card-broadcast.slin’ (language ‘en’)

This has never changed. Its all part of asterisk AMD and we dont touch anything in AMD but you can change settings and tune AMD with the amd.conf file asterisk has.

Thanks. I’ve been messing with that file and have it playing more promptly, but I’m not sure how well that’s going to work if the voicemail/answering machine answers.

Well when a VM answers it talks right away so it will detect that as a VM as its a continous talk and that is what it looks for.

Hi Bob,

Do you remember what variables you changed?

[general]
initial_silence = 2500 ; Maximum silence duration before the greeting.
; If exceeded then MACHINE.
greeting = 1500 ; Maximum length of a greeting. If exceeded then MACHINE.
after_greeting_silence = 200 ; Silence after detecting a greeting.
; If exceeded then HUMAN
total_analysis_time = 5000 ; Maximum time allowed for the algorithm to decide
; on a HUMAN or MACHINE
min_word_length = 100 ; Minimum duration of Voice to considered as a word
between_words_silence = 50 ; Minimum duration of silence after a word to consider
; the audio what follows as a new word
maximum_number_of_words = 3 ; Maximum number of words in the greeting.
; If exceeded then MACHINE
silence_threshold = 256

I just looked nd the only thing I changed was the initial_silence parameter to 500 ms

So far its worked well, but it may not be ideal.

1 Like

I’m testing out broadcast Xact dialer and I have the same issue with a delay on pickup
when I change initial_silence parameter to 500 ms in amd.conf it will automatically over right after a reload so how can I permanently change the delay of Broadcasting

there should be some kind of setting to control this because it took 15 seconds on my cell phone from when I said hello and on my landline it took 5 seconds and sometimes it takes on my cell phones 5 Seconds as well and it will take much longer if you don’t say hello or sometimes it doesn’t recognize the hello
FreePBX 14.0.13.24
Broadcast 14.0.1.13

FreePBX>Applications>AMD Settings

1 Like

thank you I see the settings
which value should I change I wanted to start speaking 1 second after the person picks up doesn’t matter if he says something or not

If you don’t care about AMD (same message for human or machine) change the total analysis time to something much lower, like one.

1 Like

thank you I’ll test it out

I got it down to 5 to 6 seconds when silence as well

1 Like