I have the same problem. But i have found the tip to use the GROUP / GROUP_COUNT to count the number of calls.
But i have not ound any really good examples of this use.
I want to check for number of calls before ai accept incoming.
I have several problems.
How to set GROUP(ext)=“call from” on one part of the call channel pair and
and GROUP(ext)=“call to” on the other part of the call channel pair.
if i set this before a call it will limit my nr of incoming calls. BUT if i transfer this call my line will not be free for calls until the transfered call ends.
anyone that can help me?
i tried this test code:
exten => 232,1,GotoIf($[${GROUP_COUNT(henrik)} >0]?bussy:)
exten => 232,n,Set(GROUP()=henrik)
exten => 232,n,Dial(SIP/232,60,rtk)
exten => 232,n(bussy),Busy()
another thing i tried was to use Dial with option G to get my hands on the two channels:
exten => 238,n,Dial(SIP/238,60,G(testgrupp^s^1))
…
[testgrupp]
exten => s,1,Goto(lbl_1)
exten => s,n,Goto(lbl_2)
exten => s,n(lbl_1),Set(GLOBAL(FR)=${CHANNEL})
exten => s,n,Set(GROUP(${CALLERID(num)})=1)
exten => s,n,Goto(lbl_3)
exten => s,n(lbl_2),Set(GLOBAL(TO)=${CHANNEL})
exten => s,n,Set(GROUP(${CALLERID(num)})=1)
exten => s,n(lbl_3),Bridge(${GLOBAL(FR)},${GLOBAL(TO)})
This is superunstable it might work but not always and using globals in this way cant be good at all.
Has someone done anything similar?
HEEEELP