Dial extention in old pbx

My company doesn’t want to change their old PBX for a channel bank yet, so we are using asterisk just for VOIP calls I have an IareaNet x100 that connects to my * server via IAX protocal

What I need is to be able to dial 101 on my IP phone,and have asterisk find the first available zap line, (all of which connect into the PBX), flash it and send 101, and bridge the IAX and Zap lines.

Can anyone offer any advice on how to deal with this?