<div>Dear Gareth,</div><div><br></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; ">DEVICE_STATE function is not available in asterisk, even DEVSTATE does not work for me in asterisk 1.4.35. Any other method function to check the channel status</span></div>
<div><br></div>--<br clear="all"><div>Regards,</div><div>Shariq Khan</div><div>0333-3501125</div><br>
<br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 5:11 PM, Gareth Blades <span dir="ltr"><<a href="mailto:list-asterisk@skycomuk.com">list-asterisk@skycomuk.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Just see what the function returns when the agents are busy. You said in<br>
your first post you want to skip the queue if both agents are already on<br>
a call. The dialplan I gave was just an example. You will need to modify<br>
it to do exactly what you want.<br>
<br>
I have asterisk emulating a traditional hunt group but I use the<br>
DIAL_STATUS to avoid calling people if they are already on a call. That<br>
way I can still keep call waiting enabled on the phones without it<br>
frequently bothering end users unless its an urgent internal call.<br>
<div class="im"><br>
Shariq Khan wrote:<br>
> Dear Tarek,<br>
><br>
> IN_USE is other then the BUSY status, i want to skip the BUSY agent but<br>
> not IN_USE<br>
><br>
> --<br>
> Regards,<br>
> Shariq Khan<br>
> 0333-3501125<br>
><br>
><br>
><br>
> On Wed, Sep 15, 2010 at 4:07 PM, Tarek Sawah <<a href="mailto:tareksawah@hotmail.com">tareksawah@hotmail.com</a><br>
</div><div><div></div><div class="h5">> <mailto:<a href="mailto:tareksawah@hotmail.com">tareksawah@hotmail.com</a>>> wrote:<br>
><br>
> Gareth<br>
><br>
> Usualy the queue has the ability to know if the agent is "INUSE" and<br>
> skip<br>
> them.. you can simply use ringinuse=no to the queues.conf under the<br>
> queue<br>
> itself or the general section and that's it .. no need for the whole<br>
> dialplan.. as you are using SIP members.<br>
> Salam<br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>
> <mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>><br>
> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>
> <mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>>] On Behalf Of<br>
> Gareth Blades<br>
> Sent: Wednesday, September 15, 2010 1:46 PM<br>
> To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
> Subject: Re: [asterisk-users] Skip Busy Agents/Channels from Queue<br>
><br>
> Yes something like this. Note the Execif syntax I have used is for<br>
> asterisk 1.6<br>
><br>
> exten => s,n,Set(AGENTSBUSY=yes)<br>
> exten => s,n,ExecIf($[${DEVICE_STATE(SIP/1009} =<br>
> NOT_INUSE]?Set(AGENTSBUSY=no))<br>
> exten => s,n,ExecIf($[${DEVICE_STATE(SIP/1010} =<br>
> NOT_INUSE]?Set(AGENTSBUSY=no))<br>
> exten => s,n,ExecIf($[$AGENTSBUSY = no]?QUEUE(xxx))<br>
><br>
><br>
> Shariq Khan wrote:<br>
> > You mean, I need to check the DEVICE_STATUS of both (sip) users<br>
> before<br>
> > sending the caller into queue, otherwise skip the caller from<br>
> going into<br>
> > Queue by using ExecIf.<br>
> ><br>
> ><br>
> > --<br>
> > Regards,<br>
> > Shariq Khan<br>
> > 0333-3501125<br>
> ><br>
> ><br>
> ><br>
> > On Wed, Sep 15, 2010 at 3:16 PM, Gareth Blades<br>
> > <<a href="mailto:list-asterisk@skycomuk.com">list-asterisk@skycomuk.com</a> <mailto:<a href="mailto:list-asterisk@skycomuk.com">list-asterisk@skycomuk.com</a>><br>
> <mailto:<a href="mailto:list-asterisk@skycomuk.com">list-asterisk@skycomuk.com</a><br>
> <mailto:<a href="mailto:list-asterisk@skycomuk.com">list-asterisk@skycomuk.com</a>>>> wrote:<br>
> ><br>
> > Shariq Khan wrote:<br>
> > > Is there a way skip / ignore the member whose status is<br>
> busy in<br>
> > the Queue.<br>
> > ><br>
> > > I have two channel member in queue and i have set the peer<br>
> limit<br>
> > 2 for<br>
> > > these members.<br>
> > ><br>
> > > I want to skip those member who are currently on the call<br>
> > (answered to<br>
> > > calls) and now their status is busy, if Queue see the busy<br>
> status<br>
> > caller<br>
> > > will not enter in the Queue and go to the next priority.<br>
> > ><br>
> > > [test-queue]<br>
> > > strategy = rrmemory<br>
> > > memberdelay=0<br>
> > > timeoutrestart = no<br>
> > > joinempty = strict<br>
> > > leavewhenempty = yes<br>
> > > timeout = 50<br>
> > > member => SIP/1009<br>
> > > member => SIP/1010<br>
> > ><br>
> > > sip.conf<br>
> > ><br>
> > > [1009]<br>
> > > username=1009<br>
> > > type=friend<br>
> > > secret=XXXX<br>
> > > mailbox=779000<br>
> > > context=default<br>
> > > host=dynamic<br>
> > > call-limit=2<br>
> > ><br>
> > > [1010]<br>
> > > username=1010<br>
> > > type=friend<br>
> > > secret=XXXX<br>
> > > mailbox=779000<br>
> > > context=default<br>
> > > host=dynamic<br>
> > > call-limit=2<br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Regards,<br>
> > > Shariq Khan<br>
> > > 0333-3501125<br>
> > ><br>
> ><br>
> > You could use ${DEVICE_STATE(SIP/1009}. Set a variable to<br>
> indicate all<br>
> > extensions are busy and then a couple of ExecIf calls to<br>
> reset the<br>
> > variable if either of the extensions state is set to<br>
> NOT_INUSE. You<br>
> then<br>
> > have a variab you can use to decide where to jump to in the<br>
> dialplan<br>
> > depending on whether both phones are busy or not.<br>
> ><br>
> ><br>
> > --<br>
> ><br>
> _____________________________________________________________________<br>
> > -- Bandwidth and Colocation Provided by<br>
> <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
> > New to Asterisk? Join us for a live introductory webinar<br>
> every Thurs:<br>
> > <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
> ><br>
> > asterisk-users mailing list<br>
> > To UNSUBSCRIBE or update options visit:<br>
> > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
> ><br>
> ><br>
><br>
><br>
> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
><br>
> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
><br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>