Chanisavail cannot check the network status

Hi:
When I use SIP phone (Phone A:SIP/1.1.1.1)call another phone(Phone B:SIP/2.2.2.2) through asterisk,if the network is now broken,the chanisavail() function cannot check the status of channels of SIP/2.2.2.2,the return value of chanisavail(SIP/2.2.2.2) is that the channel can be use.How can I get the real status of current channels to determinate whether hanging up it or call it by another way?

thanks alot.