[asterisk-users] get SIP extension status without calling it
Vieri
rentorbuy at yahoo.com
Sun Dec 2 20:17:20 CST 2007
I appreciate the feedback. I too am not using and hope
not to use agent login. I don't know if I can apply
your dialplan because I need to distinguish whether an
agent is busy (thus average conversation time is
usually around 1-2 minutes) or has DND on (agent can
be absent for quite a while, eg. 15 min.).
So if it's "busy" I want it to loop over and over. If
it's DND then bail out.
Also, the DND detection thing I'm obsessed with is
two-fold. I can also use it as a kind of "presence"
indicator so that other users can tell if the
extensions they want to reach are "available" or not
before even making/transferring the call.
Am wondering if IAX is better at this than SIP.
Thanks again.
--- Richard Revels <rrevels at bandwidth.com> wrote:
> I'm using 1.2.6 with the dialplan I posted so I
> guess the UA you are
> using is just plain hosing you.
>
> Anyway, with the queue I believe the music on hold
> is played to the
> inbound side until the call is picked up by an
> agent. The queue tries
> every <retry> seconds to get an agent for <timeout>
> seconds. If that
> fails for however long you set the limit to then the
> dialplan
> continues. I use this to set the priority of the
> call a little higher
> and loop it back into the queue but it could be used
> for a problem
> such as yours just as easily. I don't use the agent
> login and all
> that so I may be talking about something that
> doesn't apply to your
> configuration. If so, sorry for wasting your time.
>
> exten => +1XXXXXXXXX,1,NoOp(Inbound call from
> ${CALLERIDNUM})
> exten => +1XXXXXXXXX,n,Answer()
> exten => +1XXXXXXXXX,n,Set(GROUP()=cloud)
> exten => +1XXXXXXXXX,n,Set(QUEUE_PRIO=0)
> exten =>
> +1XXXXXXXXX,n(waiting),Queue(mainline,,,,600)
> exten =>
> +1XXXXXXXXX,n,Set(QUEUE_PRIO=$[${QUEUE_PRIO} + 5])
> exten => +1XXXXXXXXX,n,GoTo(waiting)
> exten => +1XXXXXXXXX,n,HangUp
>
> On Dec 2, 2007, at 7:02 PM, Vieri wrote:
>
> > I'd like to add that "show hints" on * CLI
> displays
> > the following for ext 4053 tested below:
> >
> > 4053 : SIP/4053
> > State:Idle Watchers 0
> >
> > (it should be "unavailable" or something, but
> anyway,
> > ChanIsAvail reports an AVAILSTATUS of 0, ie.
> unknown)
> >
> > --- Vieri <rentorbuy at yahoo.com> wrote:
> >
> > > Thanks Richard but I think that ChanIsAvail must
> be
> > > buggy (based on some user comments in the wiki,
> > > although quite outdated).
> > >
> > > I have the hint entry as you say (am using
> FreePBX
> > > and
> > > it's already there).
> > >
> > > But whenever I call ChanIsAvail with the s
> option I
> > > always get:
> > > ${AVAILSTATUS} = 0 AST_DEVICE_UNKNOWN -
> "Unknown";
> > > channel is valid, but unknown state.
> > >
> > > I might be doing something wrong but here is the
> > > code:
> > >
> > > [IVR-menu1]
> > > exten => s,1,Answer()
> > > (...)
> > > exten => s,n,Playback(welcome)
> > > exten => s,n,ChanIsAvail(SIP/4053|s)
> > > exten => s,n,NoOp(DEBUG: availstatus is
> > > ${AVAILSTATUS})
> > >
> > > In extensions.conf I also have:
> > > exten => 4053,hint,SIP/4053
> > >
> > > I'm using Astrisk 1.2. Is ChanIsAvail working
> well
> > > in
> > > 1.2?
> > >
> > > As far as setting a time limit on a call in the
> > > queue
> > > is concerned, it doesn't sound "nice" for the
> caller
> > > to be dropped after a few rings when it could
> have
> > > been dropped right fom the beginning. It could
> be a
> > > solution but it doesn't sound "right" ;-).
> > >
> > > Vieri
> > >
> > > --- Richard Revels <rrevels at bandwidth.com>
> wrote:
> > >
> > > > In the sip.conf entry assign a context.
> > > >
> > > > In that context, hint the extension i.e. exten
> =>
> > > > 7302,hint,SIP/7302.
> > > >
> > > > Before you get ready to dial, or whatever, do
> > > > chanisavail i.e.
> > > >
> > > > exten =>
> > > >
> _1XXXX,n(CheckUse),ChanIsAvail(SIP/${EXTEN:1},js)
> > > > exten => _1XXXX,n,Playback(beep)
> > > > exten => _1XXXX,n,Dial(SIP/${EXTEN},2)
> > > > exten =>
> > > > _1XXXX,n,Goto(result-${DIALSTATUS},${EXTEN},1)
> > > > exten =>
> _1XXXX,CheckUse+101,SayDigits(${EXTEN:1})
> > > > exten =>
> > > _1XXXX,CheckUse+102,Playback(vm-isonphone)
> > > > exten => _1XXXX,CheckUse+103,Hangup()
> > > >
> > > > This is from the paging stuff. It checks the
> > > > primary extension before
> > > > ringing the auto answer extension of the
> phone. I
> > > > seem to remember it
> > > > detecting DND as well for the Cisco 7960.
> > > >
> > > > I don't see it in this message but I seem to
> > > > remember seeing somewhere
> > > > in this thread that the goal is to keep people
> > > from
> > > > being in a queue
> > > > forever. Why not just set a time limit on the
> > > queue
> > > > and play back
> > > > "all operators busy" and hang up if a call
> hits
> > > that
> > > > limit?
> > > >
> > > > Richard
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the asterisk-users
mailing list