Problem with agi script execution

Hi all,

Iam new to asterisk,now am trying to set up a call center demo with only 4 agents.I have created both the queues and agents in queue.conf and agents.conf respectively.I used a simple dial plan configuration where calls being logged through my agi script.My dial plan configuration as :

exten => 121,1,SetGlobalVar(CALL_TIME=${TIMESTAMP})
exten => 121,n,SetMusicOnHold(inbound_cus)
exten => 121,n,Queue(test)
exten => 456,1,SetGlobalVar(AGNTID=${CALLERIDNUM})
exten => 456,n,AgentCallbackLogin(||${AGNTID}@acd_agent_call)

exten => _2XXX,1,Dial(SIP/${EXTEN})
exten => h,1,DeadAGI(|${CALL_TIME}|${ANSWEREDTIME})
exten => h,n,Hangup()

The problem here is when i took an incoming call my agi script start execution.It also works for all agents who were logged in.I tried to use “_2XXX” instead of “h” extension.But it works only for conjestion and not for answering.Can any body help me to fix this problem???

AgentCallbackLogin is deprecated. What version of Asterisk are you trying this with?

I am using asterisk 1.2.I know that AgentCallbackLogin was being depricated and no longer used in asterisk 1.4 or higher versions.But my scenario works here with AgentCallbackLogin.I dont know whether it happens due to incorrect dial plan configuration or like…What you think???