@Asteriskdude: Isn’t call queues more for like a call center application? Someone calls in, hits the queue until an operator is available? I need it to hunt through a bunch of extentions (that will be broken into analog channels to plug into a legacy PBX)
@Dufus: Checking $DIALSTATUS wouldn’t work because the endpoint is still accepting the call. I edited my context’s so that the first thing it does (even before checking for voicemail) is to check the huntgroup. It by-passes all the provisions to keep a Busy from happening (like you said, voicemail, call-waiting, three-way, ect) because I want a Busy if the line is in use. I’m trying to get this to work like traditional POTS huntgroup. (The call goes to the first line, if theres someone on it, it goes to the second, if someone is on it it goes to the third, ect ect until it finds an open channel)
I was able to get the endpoint to report back a 406 (“Busy Here”) when a second call comes down the line. It works, but it really bothers me to depend on the endpoint for routing decisions.
What I was hoping for is a way to incorporate the same type of info I get from “show hints” in the CLI into my dialing plan so if there is already a call, I’ll get a “InUse” or “Busy” response, if theres no call in progress I get an “Idle” ect. Kind of like querying the D channel of a PRI on a TDM circuit to get B channel states.
I tried ChanIsAvail, but I always get back a 0 for ${AVAILSTATUS} if the channel is registered and a 5 if it isn’t.
I would think there would have to be a way to check from within the dialplan the state of a channel and only send a call if the asterisk reports the state as Idle.
I was looking at incorporating groups into my dialplan, but that just seems like a pain.
Mind you, I’m using this Asterisk in a carrier environment (not a ITSP, but a normal CLEC), and will be delivered to the client as normal TDM lines.
We put in some type of circuit between us and the client (DSL, T1, Ethernet ect), and then install CPE that breaks the SIP channels into a POTS or PRI handoff (like an Adtran TA900).
Our next step will be to use a media gateway to convert the SIP calls into TDM calls and deliever PRI right to our customer [what ever happen to that DS3 card digium promised us?]).