[asterisk-users] ChanIsAvail querry

Michiel van Baak michiel at vanbaak.info
Wed Nov 25 04:14:54 CST 2009


On 14:59, Wed 25 Nov 09, ABBAS SHAKEEL wrote:
> Hello
> 
> We need to know if a channel is not in use and can be used to dial a number
> etc..
> I have tried the ChanIsAvail function with different parameters.
> ie ChanIsAvail(DAHDI/1&DAHDI/2) ,ChanIsAvail(DAHDI/1,s) etc
> 
> no matter the channel is busy or not it always return 0 .
> 
> Please suggest

As the documentation will tell you:
 This application sets the following channel variable upon completion:
   AVAILCHAN     - the name of the available channel, if one exists

So check the contents of that variable after running ChanIsAvail()



-- 

Michiel van Baak
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer aficionados are both called users?"




More information about the asterisk-users mailing list