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
On Fri, Aug 20, 2004 at 01:19:54PM -0400, John Millican said:> 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?Check out the source to the privacy manager for a simple example... apps/app_privacy.c
Thanks will do that. -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com]On Behalf Of Walt Reed Sent: Friday, August 20, 2004 2:13 PM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] how to collect user entered digits On Fri, Aug 20, 2004 at 01:19:54PM -0400, John Millican said:> I have been searching thru all docs that I can find on wiki and such butcan> 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 digitssome> how before going to script and then send as an arg maybe?Check out the source to the privacy manager for a simple example... apps/app_privacy.c _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users --- Incoming 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 --- 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
On Fri, Aug 20, 2004 at 01:19:54PM -0400, John Millican said:> I have been searching thru all docs that I can find on wiki and such butcan> 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 digitssome> how before going to script and then send as an arg maybe?Check out the source to the privacy manager for a simple example... apps/app_privacy.c Well Mr. Reed, and all others on list who might help, I guess I am not as smart as I hoped I was:-) I looked at the apps_privacy file. I thought I could write something similar and compile then call from dial plan. What I get is a lot of errors about unreferenced ast_app_streamfile, ast_app_getdata, ... among others. I used all the same includes in Marks script but still no go. I tried to find where these references came from in the apps_privacy and could not find them. I typically code in C++ with QT 3.3 and would like to be able to use the DB drivers that I have in QT for PostgreSQL since I will be querying an app on a separate machine for customer info based on callid and a date in the form of digits dialed by the caller. Any help in this direction would be greatly appreciated. My original plan was an AGI script, is this a bad idea? Call levels will most likly not be very high. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.742 / Virus Database: 495 - Release Date: 8/19/2004
Thanks all for your patience. I found my answer in a post on a totally unrelated question (I new if I kept reading all posts ...) saw this in a post for call forwarding. exten => *72,1,Answer exten => *72,2,Wait(1) exten => *72,3,BackGround(allison7/please-enter-your) exten => *72,4,Playback(extension) exten => *72,5,Playback(then-press-pound) exten => *72,6,Playback(beep) exten => *72,7,Read(fromext) Had not seen anything on "Read" anywhere else, must have been looking in all the wrong places. this is a simple solution to my problem. I have been reading VOIP-info.org wiki, asterisk handbook, google searches. Can anyone point me to some other places that I can search through? John -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]On Behalf Of John Millican Sent: Tuesday, August 24, 2004 4:13 PM To: asterisk-users@lists.digium.com Subject: RE: [Asterisk-Users] how to collect user entered digits On Fri, Aug 20, 2004 at 01:19:54PM -0400, John Millican said:> I have been searching thru all docs that I can find on wiki and such butcan> 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 digitssome> how before going to script and then send as an arg maybe?Check out the source to the privacy manager for a simple example... apps/app_privacy.c Well Mr. Reed, and all others on list who might help, I guess I am not as smart as I hoped I was:-) I looked at the apps_privacy file. I thought I could write something similar and compile then call from dial plan. What I get is a lot of errors about unreferenced ast_app_streamfile, ast_app_getdata, ... among others. I used all the same includes in Marks script but still no go. I tried to find where these references came from in the apps_privacy and could not find them. I typically code in C++ with QT 3.3 and would like to be able to use the DB drivers that I have in QT for PostgreSQL since I will be querying an app on a separate machine for customer info based on callid and a date in the form of digits dialed by the caller. Any help in this direction would be greatly appreciated. My original plan was an AGI script, is this a bad idea? Call levels will most likly not be very high. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.742 / Virus Database: 495 - Release Date: 8/19/2004 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.742 / Virus Database: 495 - Release Date: 8/19/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.742 / Virus Database: 495 - Release Date: 8/19/2004
John Millican wrote:> Thanks all for your patience. I found my answer in a post on a totally > unrelated question (I new if I kept reading all posts ...) saw this in a > post for call forwarding. > exten => *72,1,Answer > exten => *72,2,Wait(1) > exten => *72,3,BackGround(allison7/please-enter-your) > exten => *72,4,Playback(extension) > exten => *72,5,Playback(then-press-pound) > exten => *72,6,Playback(beep) > exten => *72,7,Read(fromext) > > Had not seen anything on "Read" anywhere else, must have been looking in all > the wrong places. this is a simple solution to my problem.FYI - Read() is described on the wiki: http://voip-info.org/wiki-Asterisk+cmd+Read
Stephen R. Besch
2004-Aug-25 08:29 UTC
[Asterisk-Users] Re: how to collect user entered digits
Ryan Courtnage wrote:>> Had not seen anything on "Read" anywhere else, must have been looking >> in all >> the wrong places. this is a simple solution to my problem. > > > FYI - Read() is described on the wiki: > > http://voip-info.org/wiki-Asterisk+cmd+Read > _______________________________________________Even better, bookmark this link: http://www.voip-info.org/wiki-Asterisk+-+documentation+of+application+commands
John Millican
2004-Aug-25 08:46 UTC
[Asterisk-Users] Re: how to collect user entered digits
-----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]On Behalf Of Stephen R. Besch Sent: Wednesday, August 25, 2004 11:30 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Re: how to collect user entered digits Ryan Courtnage wrote:>> Had not seen anything on "Read" anywhere else, must have been looking >> in all >> the wrong places. this is a simple solution to my problem. > > > FYI - Read() is described on the wiki: > > http://voip-info.org/wiki-Asterisk+cmd+Read > _______________________________________________>Even better, bookmark this link:>http://www.voip-info.org/wiki-Asterisk+-+documentation+of+application+commands Thank You all Very Much The above links have been very helpful. John --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.742 / Virus Database: 495 - Release Date: 8/19/2004