Group . Disconnect all extension if even one rejects the call

I have hik vision vdp i have configure everything and everything works, all the extensions is group ring but i would like to disconnect or reject from any and all group should be hanged up.

new at this
i have tried the conf bridge from here but did not quite work for me , the extensions never ring with conf bridge defined in this link

Howdy! Welcome to the FreePBX forums!

This seems like a non-FreePBX issue – more Asterisk issue – have you tried asking on the Asterisk forums ? There’s more video door bell discussions happening there…

yeah no smiles there, gong to try some other pbx besides these 2 wasted too much time on this without help

Do the phones support sending “busy everywhere”, or some other failed everywhere response. Whilst I don’t think that Asterisk supports that, incoming, it is probably not that likely that other PABXes will behave the way you want if it isn’t used.

When dialing multiple destinations in parallel, Asterisk is emulating the old, analogue line, technique of connecting several phones in parallel. There was no way of signalling rejected everywhere, other than by answering and immediately hanging up. Is that not an option for you.

I can think of ways of implementing a first rejection, rather than a first answer, strategy on Asterisk, but they would require custom dialplan. One could call local channels, and have them kill the incoming channel (e.g. redirect it to Hangup) if the clearing reason matched your definition of rejection. As such it would not be an option for someone who wants a simple, GUI, approach.

I’d expect even using SIP proxies, and branched calls, you would need an “everywhere” rejection to kill all the branches, rather than just one.

It does look like Yeastar has this feature, but it is a property of the called “extension”. I’d need to read a lot more to understand how they use “extension” and “endpoint”, but I think extension may be close to the PJSP multiple registration concept, and, therefore, with normal phones, a line appearance on all of the phones would have to be dedicated to handling doorbell calls.

“other than by answering and immediately hanging up. I” thats what i did.
“I can think of ways of implementing a first rejection, rather than a first answer, strategy on Asterisk, but they would require custom dialplan. One could call local channels, and have them kill the incoming channel (e.g. redirect it to Hangup) if the clearing reason matched your definition of rejection.”
for this simple logic is that in a group if one rejects the call that triggers all group members extensions rejection

its too expensive for home use

What I was getting at is what status code is the phone sending. The one that it would have to send for your behaviour to be reasonable would be 603 Decline, however, I don’t think this distinction is preserved in Asterisk.

Asterisk is an ISDN PABX with SIP bolted on, and internally uses ISDN failure codes, and probably maps 603 to 21 Call Rejected, which covers lots of things, not just end user rejections.

Changing the behaviour in Asterisk itself would require changes to the Dial application, including making it SIP aware, so that it can distinguish. That’s only vaguely possible if the phone is sending 603.

An easier change would be to add an option to dial, to change the behaviour, but one would need to define which hangup cause codes should trigger the behaviour.

I think we’re missing the point that this request breaks the fundamentals of a ring group works. It’s designed so that someone does answer as much as possible. When doing Dial(PJSIP/100&PJSIP101&PJSIP/102) it’s going to ring all contacts until they each return a 4XX code, one of them answers or the Dial() times out.

Hitting “Reject” on the phone for 100 won’t stop 101 and 102 from still ringing.

Home use is a specialist market. I suspect most home users are power users, and the ability, in Asteirsk, to control the logic, at dialplan, and even source code levels, is going to be a strong plus for those.

For those who aren’t power users, the designers would be aiming for something fairly basic, otherwise the support costs would be too high, and, as you’ve indicated for your case, home users don’t want to pay a lot.

1 Like

Reading this again and now “hik vision” sounds like slang for a rural United States American and/or Canadian who sees well at night as compared, perhaps, to a city dweller who’s eye rods are broken from too many flickering LED street lights. (Not digressing into discussion on the engineering impetus to fail gracefully but yes looking at you blinking :light_bulb: manufacturers.)

Lots of smiles there on these video phone devices! :cowboy_hat_face:

Dialplan

Anyhow, back to OP, and riffing on some previous suggestions, thanks @BlazeStudios and @david55, maybe something like this works for you in FreePBX - because here we are - under Admin → Config Edit of the file extensions_custom.conf:

[from-internal-custom]

exten = door,1,NoOp(Someone is at the door.)
 same =      n,Set(DIALGROUP(hicks,add)=Local/5001@to-hicks) ; Bob
 same =      n,Set(DIALGROUP(hicks,add)=Local/5002@to-hicks) ; Charlie
 same =      n,Dial(${DIALGROUP(hicks)},42)
 
[to-hicks]

exten = _5XXX,1,NoOp(Intruder alert.)
 same =       n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})},42,g) ; g to go on
 same =       n,Answer() ; LOL
 same =       n,Hangup()

Logs

Relevant Asterisk logs are up for a month at Re: Calling all hicks - FreePBX Pastebin showing what happens when you dial from Alice extension 5000 to “door” and it starts ringing both Bob 5001 and Charlie 5002.

Testing

These are all PJSIP extensions on FreePBX:

Testing was done on Linphone - each extension registering to the test PBX from separate virtual machines running under QubesOS (with some local intra-VM firewall rule grease applied):

Links to relevant Asterisk documentation

More technical details

The ‘g’ option, in this case, goes to the next line in dialplan at the end of the SIP portion of the call leg to the hick phone - this is how the Answer() app is triggered when the call is rejected by Bob or Charlie, then because the call leg is in a Local channel it percolates the Answer back up to the Dial of the “Dial Group” AKA “Ring Group” in the from-internal-custom context, which then stops the other call leg (to Bob if Charlie canceled, or to Charlie if Bob canceled.)

This was genuinely interesting, and it is Friday after noon, but thanks for asking, and please share if it works for you @Boxiee

ok will try , thanks a lot

1 Like

I think you find that it only works if both Charlie AND Bob cancelled. The OP wants it to work for either Charlie OR Bob cancelled. No special g option code is needed for the former, when using VoIP; it is only needed for analogue.

Ack. Example provided was with the OR case in mind.

Only using g for the inner/nested Dials on each of the direct PJSIP channels - but not in the outer/group Dial on the Local channels.

The flaw in this is that the call is still answered. When Charlie hits the reject button or returns a busy, etc. you are still answering the call which makes the Dial() send a cancel to Bob. The end result is a CDR record saying Charlie answered the call for 0 seconds. It also can give the caller the impression the call was answered and hung up on. Basically whoever rejects the call first will force it to cancel to the other callee (because that’s the only way) but it will always show that whoever rejected the call answered the call.

It also means that this will happen on any non-1XX or 200 reply. Meaning that if Bob sets his phone on DND to have lunch, Charlie will never receive a call since Bob will return a 486 or 480 and trigger this. It would also mean if Charlie is on a call and returns a 486, Bob won’t get the call either.

Agreed. But door bells are different beasts vs. “phones”, so maybe this is all acceptable trade-off for OP. :red_apple: :tangerine:

This could be an additional exercise with some more dialplan eg. continue ringing for X so the person at the door does not know (or at least, knows less) what happened inside the house.

If needed, then checking values of DIALSTATUS channel variable eg. BUSY, CANCEL, etc., is your friend there. (Details in the Dial() app docs linked to in earlier post.)

door bells are different. if there is person at the door and rings a normal non video door bell and no one answers they will ring again. same thing will happen here, on reject voicemail to say please ring again no one answered. say ring again or leave a voice mail. the whole reason to reject a call is, my doorbell is at gate, suppose i am at near the gate or i have seen a known person is ringing through window , i should reject the call and for all should stop ringing. i already have setup home assistant. as soon as the button is pressed the home assistant will send a notification in all mobiles with picture in notification area plus an email with snapshot. i have lin phone in all the phones also plus hikcloud. so first hikcloud will ring and after some seconds freepbx will engage. i still have to sort one more problem that is when i answer the call with any linpone with video there is no video from doordell, now in that call only i press the camera button off and on again volah i have video too but that is not important the doorbell press was already taken care of by home assistant via notification and email. i have not tried what is in discussion because i will let the discussion mature first and i still am experimenting this all on table , today i might install the thing actually and see what happens

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