Emergency Ring Group To Group Conference

Hello,

I am new to FreePBX and I hope that someone could assist me. I have been asked to use the PBX as follows:

An extension is dialed and it rings up to 10 separate and unique extensions. As each extensions is picked up, they are automatically put into the same conference. We want one person to dial a group of people and all of them who answer are put in a conference to discuss an issue.

This is going to be used for emergency communications at my institution. Is this possible? I have explored ring groups but once someone answers, the other extensions are dropped.

Is there a feature or module or configuration that would work for us?

Thank you in advance for your time.

Paging pro does this for you. In paging pro you can tell it not to page the phones and instead call them and as they answer they are dropped into the conf room.

Here’s a simple working example. There’s enough there to get you started, just fill in some of the blanks. Let me know if you’ve got any questions.

Edit /etc/asterisk/extensions_custom.conf. Add the following where appropriate:

[from-internal-custom]
include => custom-alert
include => custom-alert-answer

[custom-alert]
exten => ctat,1,NoOp(Beginning alert IVR for ${CALLERID(num)})
;    list of users to call. FIRST number is where we dumb the alerted user into, SECOND is the caller ID, and all comma-separated entries after that are people getting alerted.
;    To be clear, you should change:
;    5000 to be your conference room or extension you want called
;    1000 to be the caller ID number users see on their phones
;    3456,4567 to be a comma-separated list of as many numbers as you want called
;  same => n,Set(anothergroup=5000,1000,3456,4567)
  same => n,Set(alertees=5560,${CALLERID(num),5067)
;    check that the caller is something local. dont rely on this.
  same => n,GosubIf(${LEN(${CALLERID(num)})}=4?ok:notok)
  same => n(ok),NoOp("Length checked out, continuing")
  same => n,GoSub(alertivr,1)
  same => n(notok),NoOp(Bad extension length (${LEN(${CALLERID(num)})}), hanging up..)
  same => n,Playback(goodbye)
  same => n,Hangup()

;    prompt for caller to enter password; you could have different alerts based on password entered if you wanted.
exten => alertivr,1,NoOp(Entering alert IVR)
  same => n,Background(enter-password)
  same => n,WaitExten(4)
  same => n,Hangup()

;    an example 'password'
exten => 1234,1,NoOp(${CALLERID(num)} entered the right password)
;    execute the call file script, passing in the variable with our alertees - this is what youd change with different 'passwords'
  same => n,System(/home/asterisk/alertfolks.sh ${alertees})
  same => n,Wait(1)
  same => n,Playback(goodbye)
  same => n,Hangup()

;    where the caller ends up; you could prompt them to accept the conference or whatever.
[custom-alert-answer]
exten => atan,1,NoOp(Alerting someone and dumping them in a conference)
  same => n,Playback(minneapolis&minnesota)
  same => n,Dial(Local/[email protected])
  same => n,Hangup()

Create /home/asterisk/alertfolks.sh, include the following:

#!/bin/bash
#    template call file location
here="/home/asterisk"
callfile="alert.call"

#    what the alerted extension will be subbed for
alertext="%EXTEN%"

#    what the alerted destination will be (extension/conference/etc)
dest="%DEST%"

#    get arguments and put them in the ${extarr[@]} array
IFS=, read -ra extarr <<< "[email protected]"

#    set the first element as the destination, second as CID, then discard them
destext=${extarr[0]}
fromext=${extarr[1]}
alertees=${extarr[@]:2}

#    loop through the alertees and build/move the call file
for i in $alertees; do
    cp $here/$callfile $here/$i-$callfile
    sed -i -e "s/$alertext/$i/g" $here/$i-$callfile
    sed -i -e "s/$dest/$destext/g" $here/$i-$callfile
    sed -i -e "s/$cid/$fromext/g" $here/$i-$callfile
    mv $here/$i-$callfile /var/spool/asterisk/outgoing
done

Create /home/asterisk/alert.call, include the following:

Channel: Local/%EXTEN%@from-internal
WaitTime: 8
MaxRetries: 2
RetryTime: 12
Callerid: %CID%
Context: custom-alert-answer
Extension: %DEST%

You can modify waittime/retrytime/maxretries as needed, obviously.

Set permissions on stuff, reload asterisk

chown asterisk. /home/asterisk/alert*
chmod +x /home/asterisk/alertfolks.sh
asterisk -rx 'dialplan reload'

Configure FreePBX:
Admin > Custom Destinations
Target: custom-alert,ctat,1
Description: CustomAlertDest

Applications > Misc Application
Description: CustomAlert
Feature Code: <some extension>
Destination: Custom Destination/CustomAlertDest

At this point you should have a basic, working alert system. You can dial the Feature Code you just entered to test. From here you can probably figure out how to schedule it, if you wanted to. All you need to do is change the list in extensions_custom.conf and you’re set; the rest shouldn’t need much/any touching (although you can do lots with just what i’ve given you).

If you have problems, please do the following from linux shell:

asterisk -rvvvvvvvvv
<reproduce issue>
exit

Copy resulting scrollback to pastebin.com, copy that link, paste it here.

https://pastebin.com/nTvB998H

Hey there, just tried this out today. I’m not extremely savvy with custom destinations and coding as such but I seem to be stuck on this error. I call the custom destination and enter the password and then it hangs upevery time. The only things I changed were the numbers here: ; same => n,Set(anothergroup=5000,1000,18,14,22,12)

Sorry, just saw this; are you still having trouble?

Hi Tony, can you elaborate how Paging Pro can do this? We want the same behavior as the topic starter, so we are curious if Paging Pro is able to do this. In the feature list of Paging Pro it is not clear that this is possible. Thanks in advance, Jan

See wiki: https://wiki.freepbx.org/display/FPG/Page+Pro-Admin+Guide

You can link an outbound route to a page group

Hi Itzik, thanks for your fast response. I am fairly new to FreePBX, so excuse me for these questions. But how can you link a conference to the page group with an outbound route. That part is not clear for me. Do you have an example? Thanks in advance, Jan

No conference.

In the outbound route you’ll link it to a page group.

In that wiki I linked earlier, you can see the page group and the outbound route how it’s linked.