[asterisk-users] use of Read cmd with AGI

Kamlesh Kumar kamlesh_kmr at hotmail.com
Fri Mar 2 05:35:37 CST 2012


Hello,
 
Using AGI script to accept the input from caller but input value is not getting stored in variable.
 
Extract from AGI Script:
 
$agi = new AGI();
$agi-> exec('Background','press_one0&press_two0&press_zero0');
$agi-> exec('Read','NUMBER,,1,3');
$agi-> verbose ("You have entered".$NUMBER);
 
Console Output:
AGI Script Executing Application: (Background) Options: (press_one0&press_two0&press_zero0)
    -- <DAHDI/21-1> Playing 'press_one0.gsm' (language 'en')
    -- <DAHDI/21-1> Playing 'press_two0.gsm' (language 'en')
    -- <DAHDI/21-1> Playing 'press_zero0.gsm' (language 'en')
    -- AGI Script Executing Application: (Read) Options: (NUMBER,,1,3)
    -- Accepting a maximum of 1 digits.
    -- User entered '1'
 pridid.php: You have entered
[Mar  2 16:56:37] ERROR[20454]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
    -- <DAHDI/21-1>AGI Script pridid.php completed, returning 0

Thanks,
Kamlesh
  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120302/0d492d3c/attachment-0001.htm>


More information about the asterisk-users mailing list