Sunday, December 2, 2007

Re: [asterisk-users] get SIP extension status without calling it

Thanks for the "sip show peers" script, Dave.
But that won't work for me.
It won't tell me whether the extension will actually
accept a call or not (eg. if DND is ON only on the
"client side").

This link might clarify the problem I am facing:

http://lists.digium.com/pipermail/asterisk-users/2007-September/195936.html

and the following links discuss a way to determine an
extension's DND state in order to use the
{Add,Remove}QueueMember function efficiently from a
custom cron script.

http://lists.digium.com/pipermail/asterisk-users/2007-September/196345.html

http://lists.digium.com/pipermail/asterisk-users/2007-September/196437.html

The need to determine if an extension accepts calls or
not (and what's missing here is to detect DND on/off
on the client side) is related to queues and agents.
Basically, if, say, all agents are in the queue but
have DND on then what I need is to bail the caller out
because it doesn't make much sense from a practical
point of view to have he/she wait "forever" for an
agent to turn DND off.

Maybe it's a big limitation in SIP protocol but I'd
like to know if other users have found a viable, open
source solution.

--- dave cantera <david.cantera@iacnet.net> wrote:

> vieri,
> you can get sip status with the following shell
> script... I named it
> 'sipshowpeer'...

> Vieri wrote:
> > Hi,
> >
> > I am trying to get a SIP extension's status
> without
> > actually making a call.
> >
> > I am using sofia-sip's "options" example utility
> and
> > the sip clients are SJphone softphones.
> >
> > >From Asterisk I run the "options" utility and
> query a
> > sip extension at 10.215.147.240. I get:
> >
> > # ./options -1 --all sip:10.215.147.240
> > SIP/2.0 501 Not Implemented
> > Via: SIP/2.0/UDP
> >
>
10.215.144.27:38098;branch=z9hG4bKUKS02S3F8H8ZS;received=10.215.144.27
> > From: <sip:10.215.144.27>;tag=U3DKgF7HgFKXH
> > To: "unknown" <sip:10.215.147.240>;tag=614733430
> > Call-ID: b6968197-1b7d-122b-0ab0-00c09f10e472
> > CSeq: 92182805 OPTIONS
> > Content-Length: 0
> > Server: SJphone/1.65.377a (SJ Labs)
> >
> > I guess that the softphone should be answering
> with a
> > 2xx code followed by a status description?
> > So I tried with the INVITE method and set DND on
> the
> > SIP extension:
> >
> > # ./options -1 --all --method INVITE
> > sip:10.215.147.240
> > SIP/2.0 486 Busy Here
> > Via: SIP/2.0/UDP
> >
>
10.215.144.27:38098;branch=z9hG4bK5Z3BS8F737t0e;received=10.215.144.27
> > From: <sip:10.215.144.27>;tag=590Z1ND8B6XpN
> > To: "unknown" <sip:10.215.147.240>;tag=1a2d77b524
> > Call-ID: 668ad4fa-1b7e-122b-fcb6-00c09f10e472
> > CSeq: 92182952 INVITE
> > Content-Length: 0
> > Server: SJphone/1.65.377a (SJ Labs)
> >
> > The above would suit me fine because I get a "486
> Busy
> > Here" response.
> > However, if DND is off then I get:
> >
> > # ./options -1 --all --method INVITE
> > sip:10.215.147.240
> > SIP/2.0 180 Ringing
> >
> > and the SIP extension actually "rings", as
> > expected.(but this is undesireable)
> >
> > Now, does someone know another way to get the
> status
> > (ie. does it accept calls or not?) without making
> the
> > extension "ring"?
> >
> > Thanks
> >
> > Vieri

____________________________________________________________________________________
Be a better sports nut! Let your teams follow you
with Yahoo Mobile. Try it now.

http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

http://lists.digium.com/mailman/listinfo/asterisk-users

No comments: