[Asterisk-Users] how to collect user entered digits

John Millican john at millican.us
Fri Aug 20 10:19:54 MST 2004


Hello all,

I have been searching thru all docs that I can find on wiki and such but can
not get an answer.  I am trying to collect a date from user input in the
form of digits dialed from the phone to use in an agi script to do a
database look up.  I have tried to use "Get Data filename, timeout,
maxdigits " in the agi script. In * console I get message saying playing
filename but it exits as soon as it starts. Could I collect the digits some
how before going to script and then send as an arg maybe?

in extensions.conf:
exten => 657, 1, Ringing
exten => 657, 2, wait(5);
exten => 657, 3, BackGround(1)
exten => 657, 4, agi,callid.c|${CALLERIDNUM}

the important part of the agi script:
printf("GET DATA abandon-all-hope, 5000, 6 \"\"\n");


the message in * console:
 Executing AGI("Zap/1-1", "callid.c|1111111111") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/callid.c
    -- Playing 'abandon-all-hope' (language 'en')
  == Spawn extension (default, 657, 4) exited non-zero on 'Zap/1-1'
agi_request: callid.c
    -- Hungup 'Zap/1-1'

What am I doing Wrong?

Thank you very much for any help

John Millican (a newbie obviously)
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004




More information about the asterisk-users mailing list