Survet custom agi

Hi everyone
I need some advice in modifying the agi-VDADtransferSURVEY.agi.
What we need todo its something like this:
We have 4 DTMFS presented to the client as a first greeting
If client press 1 we need to update the status field in vicidial_list and then play a message and hangup the call.
If client press 2 we must update the status field in vicidial list and then the call must be transfered to an agent in another inbound campaign.
If client press 3 again update status as DNC play a message saying sorry and hangup the call.
If client press 4 again update status and transfer the call to an agent in another campaign.
The survey script in vicidial 2.04 and 2.05 offers the capability to transfer the call to an agent every time the client has opted in.
We need one option where the callee has opted in but the call needs to be terminated after playing a message.
And we need a dispo in the lead right after being processed by IVR.
Any advice would be appreciated.
Thanks in advance.
I need some advice in modifying the agi-VDADtransferSURVEY.agi.
What we need todo its something like this:
We have 4 DTMFS presented to the client as a first greeting
If client press 1 we need to update the status field in vicidial_list and then play a message and hangup the call.
If client press 2 we must update the status field in vicidial list and then the call must be transfered to an agent in another inbound campaign.
If client press 3 again update status as DNC play a message saying sorry and hangup the call.
If client press 4 again update status and transfer the call to an agent in another campaign.
The survey script in vicidial 2.04 and 2.05 offers the capability to transfer the call to an agent every time the client has opted in.
We need one option where the callee has opted in but the call needs to be terminated after playing a message.
And we need a dispo in the lead right after being processed by IVR.
Any advice would be appreciated.
Thanks in advance.