REFER Transfer

Hello Experts,

I need help with Refer Transfer, I’m new to asterisk, Here is my setup.

I’ve Existing Callcenter PBX working on Legacy system in one location, And I’ve another location which we manage call using Audiocodes Mediant 1000 device converting FXO to sip, Problem is with transfer,
Call works like this:
PSTN => Legacy phone System ACD => FXO Gateway => Sip Asterisk Ext.

Each Asterisk Ext. Has dedicated FXO port so that they get only one call sametime, Problem is with transfer, When we transfer call from sip to back to main location, it usage two channels and Agent didn’t get new call until line is available, I was thinking to transfer using legacy phone system, and for that I’ve to use hook-flash, I asked vendors help, He said I’ve to use Refer Transfer in order to archive this, Here is vendors comment:

**** Refer***

  1. FXO–à Audiocodes --à IP Phone system --à SIP user
  2. SIP user transfer the call to another PSTN side user and send Refer message to Audiocodes with Refer-To header pointing the new number where the transfer goes.
  3. When Audiocodes receives Refer, it first send hook flash to FXO line , then it sends digits from Refer-To header.

Can you please help with sample dial plan for refer transfer.

Transfer application.