Playback delay with AGI script

Hello all,
We have an application making bulk call through PRI lines.That make calls to mobile numbers and announce a gsm file message. We have 6 E1 connection to for this.When i use extension.conf or Realtime mysql connection for the dialplan it the file is playing perfectly with out any delay.I am using PHP-AGI for the AGI purpose.My problem is that when i use AGI the file is taking delay to play, almost about 20 second some time.When a single number is called there is no such delay.Problem occurs when making simultaneous calls .

Anyone fased issue like this or anyone know a solution for this.Please reply.
Regards,
Bipin