[asterisk-users] Problems with ChanIsAvail always return status 0

Jared Smith jaredsmith at jaredsmith.net
Mon Jun 25 21:00:13 CDT 2007


On 6/25/07, Alvaro Parres <aparres at gmail.com> wrote:
>     I'm having the next problem, it appear that the application ChanIsAvail
> is not working on Asterisk 1.4.5 always return me 0 in AVAILSTATUS.
> I add my dialplan and the output to the cli.

This isn't really a problem with ChanIsAvail... it's more of a
misunderstanding of what's going on.  In your case, it appears that
your SIP device will accept multiple calls at the same time from
Asterisk.  So even if your phone is on a call, Asterisk will come
along, try to make another call to it, and the phone says "Hey, go
ahead! I don't mind!"

You've got quite a few options to solve your problem.  While none of
them are exactly perfect, it's good to have lots of options:

 o  Try using the 's' option to ChanIsAvail().  (You might have to
turn on call limits in sip.conf to get this to work correctly.  Last
time I played with this, it seems that the limitonpeers setting had to
be set to yes as well.)
 o  Use the GROUP() dialplan function to assign calls to call groups,
and then use the GROUP_COUNT() function to check to see if that phone
is already on any calls.
 o  Turn off call waiting on your IP phone, so that it'll only accept
one call at a time
 o  Simply get call limits in sip.conf working correctly.  (This is
probably the hardest to do, unfortunately.)

Hopefully, one of those options will help you out.  (I've placed them
in the order I'd try... but your mileage may vary.)

-Jared



More information about the asterisk-users mailing list