Zap Channel Problem

Hi to all,

Is any body knows how to find whether zap channel is busy or not. I tried out many things. But I don’t get success.

If any body know or previously done that then please tell me in details i.e. about extensions.conf or other files.

My current extensions.conf file is as follows,

exten => s,1,GotoIf($["${DIALSTATUS}" = “BUSY”]?4:2)
exten => s,2,AGI(Somefile.php)
exten => s,3,Hangup()
exten => s,4,AGI(OnBusy.php)
exten => s,5,Hangup()[/quote]

My current zaptel-channel.conf file as follows,

[quote];;; line="6 WCTDM/0/5 FXSKS"
channel => 5

In above extensions.conf file you see that on second line I used DIALSTATUS Variable but ianplain told me that in past post, variable DIALSTATUS is define when call ended. So, I think above idea that I used is wrong or missing something in that. So, Please suggest me nice solution for how to detect channel busy or not.

Please Share your valuable knowledge.