Call File Calls Not Going to Voicemail

I’m not sure if I’m missing something obvious, but I have, in my dialplan, something I set up that is like (I’d imagine, since I could never get it working), the Broadcast module. It works perfectly fine for the most part, but the calls to the extensions never go to voicemail, the phone just keeps ringing. It should, after three attempts, go to voicemail and record the message to be broadcast three times, then end the voicemail. The calls are generated by my Python script (really, I just have a template call file, the Python script replaces the template text with the correct caller ID and channel name to call).

It could still be a lack of full understanding of call files or dialplan. Here’s the relevant dialplan code (I never remember how to pre-format text here, so sorry):

[5090rec]
exten => start,1,Playback(custom/record-5090-notification)
same => n,Record(custom/VoiceMessage2:gsm)
same => n,Background(custom/record-or-accept)
same => n,WaitExten(5)

exten => *,1,GoTo(5090rec,start,1) ; re-record
exten => #,1,GoSub(pushnotify) ; accept the recording

same => n(pushnotify),Playback(custom/broadcast-begin-shortly)
same => n(pushnotify),System(python /var/www/html/broadcast/bcast.py ${911or5090})
same => n,Hangup()

[notify-5090]
exten => announce,1,NoOp(calling 5090 phones) ; repeat message three times to callees
same => n,Playback(custom/VoiceMessage2&silence/2&custom/VoiceMessage2&silence/2&custom/VoiceMessage2)
same => n,Hangup()

(Also, I’ve tried finding easy ways to make the message play three times without having to daisychain them like that; I’ll admit it’s been quite some time since I looked, not sure if there is a way or whether the way I have it is fine enough)

And here is an example of a call file that gets generated:

Channel: PJSIP/3717
MaxRetries: 3
RetryTime: 60
Context: notify-5090
Extension: announce
Callerid: 0911 Notification
Priority: 1

You’re originating a call directly to the pjsip endpoint which bypasses all the FreePBX generated dialplan. What you probably want to use is

local/3717@from-internal
1 Like

I went ahead and adjusted that (I’m guessing I do that in the call file, which now has “Channel: local/DESTNUMBER@from-internal”).

It did seem to change things a bit. So now the call goes through and it stops trying after about 6 rings, which is what I changed the timing too. Then it waits a bit longer (forgot to start a timer), then tries calling again. At that point, it begins to ring apparently forever again. After about 40 seconds of ringing, I see another call coming through, and it is the same notification call. After probably 20-30 seconds, that second call goes away (or maybe it’s the first, I’m not sure). Then it just continues in that cycle until I finally pick the phone up and hang up (pick up and hang up twice when it’s showing 1/2 on the phone).

Here’s a pastebin of the whole thing. It does mention something about not being able to set utime in the spool/outgoing directory. Is that something I need to worry about / look into what it means?

https://pastebin.freepbx.org/view/4178fc16

I’m not seeing an Answer in the trace, which I would not expect to be required, but maybe because of the call file it’s needed. It won’t hurt to add it ahead of the playback line

same => Answer()
same => n,Playback(custom/VoiceMessage2&silence/2&custom/VoiceMessage2&silence/2&custom/VoiceMessage2)

Hmm, I’ve gone ahead and added in that line. I do see “answered” a few times, that’s when I physically picked up the handset to answer the call. Still endless ringing though on x5000 as a test, never seems to want to go to voicemail.

Most recent paste:

https://pastebin.freepbx.org/view/0416203b

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