Get count of free/idle channels in a technology

Dear All,

Is there a way to find out how many channels are ‘FREE’ / ‘IDLE’ in a given technology/resource.

Eg: I want to find out how many Channels are free in “DAHDI/g0”

In my application, I have created a trunk group called “0”. This group has 3 spans of 4-Port
PRI cards (12 PRIs).

Also, in our application we are required to dial more than 3-4 numbers in PARALLEL so that
one of them can answer the call. We do this by dahdi/g0/123456&dahdi/g0/234567&dahdi/g0/345678

I tried ChanIsAvail(dahdi/go). But, this gives me only one channel that is available (does not give me count of channels free).

My requirement is to know the free channels available in ‘dahdi/g0’ before hand than handle a case of DIALSTATUS = CHANUNAVAIL.

Any info/help is highly appreciated.

Thanks a lot,
Govinda Padaki

You are still going to have to handle failures, as the situation can change between the pre-test and the actual call.

Dear David55,

I agree with you. However, I can bail out if I don’t even have 2 channels available when I needed 4 or 5…

I can still spend few milliseconds expecting that few more channels might become available. But, on the same note, remaining 2 channels can also get occupied… :laughing:

Do I need to do anything with asterisk source code ? Where can I get more info on this?

Thanks in advance,
Warm Regards,
Govinda Padaki.


It is definitely impossible for most VoIP technologies, as the local system has no idea of what limits are imposed by the other end. For circuit switched technologies, you would be more interested in the number free within a group, but I suspect, from the lack of answer, that there is no provision to do that.

Asking on the right forum might get more answers, but I doubt it. This forum is for discussions, not for asking questions.