Call in a queue,playing an announcement to know who is called

Hello,

I’m trying to configure freepbx for 2 uses at home but I don’t know exactly how to proceed to make both work.

An old person I know recently started to need help very frequently day and night.

I was asked by the person helping him to find a way he could call him when needed without needing to make any phone number.

I set a php code that is called when a small wireless remote is pressed, it generates a .call file that connects a handsfree SIP 2 way speaker picking the call at one end and at the other end calling the person for help.

But if the person helping is not answering at his extension I would like that the system calls another person on her mobile phone through a trunk,

and before each call attempt to play a record saying “calling XXXX” so the old person knows who the PBX is calling.

Unfortunately that’s where I’m having difficulties to make it work with the second use.

I could configure each extension to play an announcement before the call is answered

but the second use is a video doorphone connected to the PBX that calls a queue until the person helping answers and we don’t want people at the door hearing a message saying “calling XXX”

At this time I made the help function work using 2 queues, if the assistant doesn’t answers while the call is in his queue, it redirects the call to another queue for the other person.

But I’m not sure it’s the best way to do that.

A third queue is used for the doorphone.

I also tried to play the announcement making an extension in extensions_custom.conf

;# // BEGIN Call to Mary

exten => 300,1,Answer

exten => 300,3,Wait(1)

exten => 300,4,Playback(custom/calling_Mary)

exten => _.,n,goto(from-internal,100,1)

;# // END Call to Mary

It works when calling directly extension 300 but I tried to put the extension 300 in a queue it just rings without playing the message.

Is it the expected behavior or an error I made ?

The 2 functions needed are:

Call for help>announcement the phone calls the assistant>if no answer announcement the phone is calling a friend

Call from the doorphone>queue to wait an answer from the assistant

What would be the best way to achieve this ?

Thanks

First of all, your dialplan is missing the 2 priority.

Anyhow, you should be able to do it like this:

exten => 300,1,Answer
exten => 300,n,Wait(1)
exten => 300,n,Playback(custom/calling_Mary)
exten => 300,n,Dial(local/100@from-internal,20)
exten => 300,n,Playback(custom/calling_XXXX)
exten => 300,n,Dial(local/XXXX@from-internal)

I believe that this will try 100 for 20 seconds, if no answer, it’ll continue the dialplan.

Thanks, it works perfectly :slight_smile:

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