AGI & WaitExten

Hi all,
I’ve been trying to setup a way to authenticate users with an IVR.
For now, my user is well authenticate, but when i ask him to enter a number to call, it hangup just after i’ve entered the first digit…

Here is a part of my AGI Script :

$caller=$agi[callerid];
$sql="select * from users, sip_buddies where sip_buddies.username=users.username and users.username=\"$caller\"";
....
if ($sip)
{
     write ('EXEC Authenticate '.$user[password].'');
     write ('EXEC NoOP _______Authentification_Accepted________');
     write ('EXEC PlayBack vm-enter-num-to-call');
     write ('EXEC  WaitExten 30');
}


Does anybody have an idea on what i should do in order to allow the user to enter the whole number he wants to call…

Thank You guys.[/code]

are you sure he is still in a context where he CAN dial an exten? Possibly he dials something, which doesn’t match anything, and there is no ‘i’ so it falls through and hangs up…

Also not sure if they are allowed to dial an exten outside the agi script while still in the agi script, so you might try authenticating them with the script and then releasing them back to the dialplan to dial and stuff…