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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to