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