[Asterisk-Users] ChanIsAvail() and SIP
Jose Solares
jsolares.lists at gmail.com
Wed Dec 14 18:57:09 MST 2005
I know, but that's what they answered to that bug report. they should
atleast state that it's not working with sip, OR how to make it work with
sip if perhaps its tricky to use.
BTW, you're not using qualify right, i saw the code trying to figure out why
it wasnt working, and if qualify is not set for the device it'll return a 0,
if it's set then it'll use a pbx builtin to see if the channel is in use,
but that's broken for sip as far as i can tell.
It should return in use if the sip device is in a call but can take another
(if it hasnt met the call-limit), and busy if it has met call-limit.
otherwise you'd have to rely on the return code from the phone when dialing,
which in my case since turning off call waiting was indeed busy, but that
messes up my PRI signalling since i send the busy with a no answer, instead
of a termination.
For me it never returned 2 or 3, it always returns 1 (Available), if you do
file a bug post the url, i'd rather use this app than having to turn off
call waiting on the sip phones ( that's what i did before i read about
groups )
On 12/14/05, Scott Maier <scott at omnigroup.com> wrote:
>
>
> On Dec 14, 2005, at 1:17 PM, Jose Solares wrote:
>
> According to this : http://bugs.digium.com/view.php?id=4506
>
> chanisavail is not intended to detect if a phone is in use or not at all,
> it's only intended to check if asterisk could send the call there.
>
>
> Well, that would go against all of the documentation that I have seen
> which indicates that passing 's' as an option
> will "Consider the channel unavailable if the channel is in use at all".
>
> <http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ChanIsAvail>
>
> Regardless, that still does not explain why the return code is 0 - I would
> expect 2 (in use) or 3 (busy) if the channel had an active call.
>
> I think I will file a bug to try and get some clarification.
>
> Thanks for the alternate suggestion, I will look in to that.
>
> - Scott
>
>
> I tried using call-limit and chanisavail, but it's broken in SIP. inuse
> gets applied only to peers, and when it gets an incomming call that is not
> answered it gets decremented and doesnt stay the same, which is a bug.
>
> You should consider using groups,
> http://www.voip-info.org/wiki-Asterisk+cmd+SetGroup
>
>
> On 12/14/05, Scott Maier <scott at omnigroup.com> wrote:
> >
> >
> > Hi everyone,
> >
> >
> > I have started trying to use ChanIsAvail() to detect when a phone is
> > in use (on any call) and my results are disappointing.
> >
> > Here are some examples out output to the console followed by the
> > meaning of the return status code based on what I have found in the
> > comments on this page: <http://www.voip-info.org/wiki/index.php?
> > page=Asterisk+cmd+ChanIsAvail>
> >
> >
> > Test using a real extension (224) that I know is in use at the time
> > of the test. Calling from 227:
> >
> > -- Executing Playback("SIP/227-c825", "silence/1") in new stack
> > -- Playing 'silence/1' (language 'en')
> > -- Executing ChanIsAvail("SIP/227-c825", "SIP/224|sj") in new stack
> > -- Executing NoOp("SIP/227-c825", "SIP/224-08ce|SIP/224|0") in new stack
> > -- Executing Dial("SIP/227-c825", "SIP/224|10") in new stack
> > -- Called 224
> > -- SIP/224-4fc4 is ringing
> >
> > /* 0 AST_DEVICE_UNKNOWN */ "Unknown", /* Valid, but unknown state */
> >
> >
> > Test using a fake extension (333) that doesn't exist and is not
> > defined anywhere. Calling from 227:
> >
> > -- Executing Playback("SIP/227-e4d2", "sales") in new stack
> > -- Playing 'sales' (language 'en')
> > -- Executing ChanIsAvail("SIP/227-e4d2", "SIP/333|sj") in new stack
> > -- Executing NoOp("SIP/227-e4d2", "||4") in new stack
> > -- Executing Hangup("SIP/227-e4d2", "") in new stack
> >
> > /* 4 AST_DEVICE_INVALID */ "Invalid", /* Invalid - not known to
> > Asterisk */
> >
> >
> > Test using a real extension (206) that is defined, but not
> > registered. Calling from 227:
> >
> > -- Executing Playback("SIP/227-8a76", "sales") in new stack
> > -- Playing 'sales' (language 'en')
> > -- Executing ChanIsAvail("SIP/227-8a76", "SIP/206|sj") in new stack
> > -- Executing NoOp("SIP/227-8a76", "||5") in new stack
> > -- Executing Hangup("SIP/227-8a76", "") in new stack
> >
> > /* 5 AST_DEVICE_UNAVAILABLE */ "Unavailable", /* Unavailable (not
> > registred) */
> >
> >
> > This all seems to be fine, except for the 1st example where I am
> > testing a known, registered, in use Polycom 501.
> >
> > Does anyone have any idea why Asterisk is returning 0 for that test?
> > Is anyone else using ChanIsAvail() successfully?
> >
> > This is with Asterisk 1.2.0.
> >
> >
> > - Scott
> >
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051214/c869c325/attachment.htm
More information about the asterisk-users
mailing list