Dial plan for outbound on PSTN CheckAvail

I’m having problem with dial plan – I have four pstn lines in and I want to find the first available to go outbound on for all users. Any suggestions on my dialplan . . . it no worky.

Many thanks!

plancomment=DialPlan1
include=default
exten=_911.,1,Macro(trunkdial,${trunk_1}/${EXTEN:0})
comment=_911.,1,911,standard
exten=_9XXXXXXX!,1,ChanIsAvail(Zap/2&Zap/3&Zap/4)
exten=_9XXXXXXX!,2,Macro(trunkdial,${CUT(AVAILCHAN||1)}//w${EXTEN:0})
comment=_9XXXXXXX!,1,outbound2,standard

I’ve been parsing through several of the Asterisk docs:
[ul] digium | Asterisk OS PBX TDM400P user manual => Chap.3
extensions.conf => file’s notation for [globals]
Astrisk the future of telephony by O’reilly => Chap.5 - page 95, Enabling outgoing dialing [/ul]
These are a good place to start. As I understand it, check your Zapata.conf file to make sure that you have under Group=2 the following assignments;
[ul] ;;FXO modules
group=2
signaling=fxs_ks
context=incoming
channel=w-z (or) channel=w,x,y,z :where w,x,y,& z are the fxo ports respectively.[/ul]
IN your extensions.conf file under [globals], you have the assignment;
[ul] TRUNK=Zap/g2[/ul]

In your dialplan, whenever you want to use the 1st available outbound line, you use the expression ${TRUNK}, not ${TRUNK_1}