Reject additional call during a call

When A is in a call with B, if C attempts to call A or B, how do l make C’s call rejected automatically? l looked through configuration for res_pjsip, and l can’t find anything that can achieve it.

On chan_sip there was an option called call-limit ,I don’t think there is equivalent options on pjsip, but you can use the group_count() function

l am using pjsip, so l don’t think chan_sip would be a viable option for me. Can you give me more detail on how to use group_count()? Do l use that in extensions.conf? Or can you provide me a link, so l can go figure it out?

So, A called B, and B picked it up, then when C called A, that line is returning false. What did l do wrong?

How have GROUP_COUNT variable defined and use?

Because in dialplan GotoIf application variable it will return current value “0”.

You can check variable values by using NoOp application

ok… so how do l define GROUP_COUNT? should “same = 3,Set(GROUP()=${EXTEN})” be doing that? Or l will need a separate line? Or l even have to define it somewhere else?

First of all, variable names should omit to use “()” .
GROUP_COUNT if you reference to {EXTEN} and if context start with “s” {EXTEN} value it will be “s” .

The code you were given was an example to help you understand the basic use of group counts. You will rarely get complete solutions here. The sample code group counts Asterisk extensions, so it doesn’t consider the calling line at all. Reading the documentation, I have an idea of how to do that, but I’d have to try it before I could guarantee it, and you wouldn’t have understood how it works, so wouldn’t be able to maintain it yourself.

1 Like

this wiki is what l can find on these function.
Do you have a better place where l can learn more about it?

That is enough for you to be able to determine that the code you have is not sufficient. Once you understand that, I believe it has hints as to the solution, but I have no more than the that document to go on to determine whether the solution I think might exist does exist, and I have not implemented this requirement myself, so I’m not going to propose a detailed solution.

Sorry I misunderstood about GROUP_COUNT() .
Anyway it should refer a to a variable to make it work , may be the following link could help you .