I can't count outgoing call

Hello friends, I have a serious problem.
I am using a (100)sip phone extension like this and I block second call if sip phone accept first incoming call. That’s works good.

exten => 100,1,Set(GROUP(outbound)=myprovider)
same => n,Set(COUNT=${GROUP_COUNT(myprovider@outbound)})
same => n,NoOp(There are ${COUNT} calls for myprovider.)
same => n,GotoIf($[${COUNT} > 1]?denied:continue)
same => n(denied),NoOp(There are too many calls up already. Hang up.)
same => n,HangUp()
same => n(continue),GoSub(callmyprovider,${EXTEN},1})

But I have a problem. If (100)sip phone outgoing call to (200)another phone and (200)another phone answered that call, during this time a (300)third phone if call (100)sip phone the phone ringing and this extensions configuration- group counter not working… Why ? I can’t fix that horrible problem. Is this a bug ? I can’t count outgoing call.

If I understand what you are saying, that is an outbound call to 100, in spite of the naming you use, you are only limiting inbound calls.

Also, surely “myprovider” should actually be “100”.

I read this part:


If sip phone 100 calls sip phone 200, and the latter answers, then whilst they are connected, sip phone 300 calls sip phone 100, the latter rings (on its second line).

yes, exactly… that’s the point of I want to telling…

Any solution ?

I’ve never used it in anger, but count both inbound and outbound, separately. I assume you can have counts in more than one class.

There will always be a risk of a clash, where an outbound call has to be aborted before the inbound call actually starts ringing.

Try use function EXTENSION_STATE at your incoming context to allow Dial only if it’s NOT_INUSE and call Set GROUP.

I don’t know if you are the provider and that dialplan resides inside your Asterisk customers to dial 100 and reach your contact center.

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