[asterisk-users] AVAILSTATUS always 0

Joshua Colp jcolp at digium.com
Fri Oct 5 07:39:38 CDT 2012


Jonas Kellens wrote:
> Hello,

Hola,

> I notice that the function ChanIsAvail always returns result : 0
>
> It does not matter if the realtime SIP peer is registered or not.
>
> How come ??
>
> My dialplan :
>
> exten => s,n,ChanIsAvail(SIP/${SIPPEERNAME})
> exten => s,n,NoOp(availstatus = ${AVAILSTATUS})

If you use the following:

exten => s,n,ChanIsAvail(SIP/${SIPPEERNAME},s)

${AVAILSTATUS} will reflect the status according to the device state 
core. I have not tested this with the various realtime setups so I can't 
comment on how accurately it will reflect the state of the world, but I 
think it will work for you.

Here's the list of states in case you need it:

0 = Unknown
1 = Not in use
2 = In use
3 = Busy
4 = Invalid
5 = Unavailable
6 = Ringing
7 = Ringing and in use
8 = On hold

Cheers,

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org



More information about the asterisk-users mailing list