Thread: [Asterisk-java-users] Re: Receiving DTMF digits via FastAGI
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2005-07-27 10:11:21
|
> A question about the FastAGI stuff in general. Many of the functions > provided by AbstractAGIScript allow DTMF input to be received from the > server. > Is there a way to catch multiple dtmf input instead of a single charact= er? > i.e. I can wait for any digit from 0-9, but I can't wait for '10'.. Most of Asterisk's AGI commands can be interrupted by pressing a DTMF dig= it. Which - if any - DTMF digits should cause an interruption can be specifie= d via the escapeDigits parameter of many of AbstractAGIScript's methods. Th= e singe character that those methods return corresponds to the digit that has been pressed to interrupt the command. There is no way to say "Abort this command only if user presses DTMF digi= t 2 after he pressed DTMF digit 1". If you want to read DTMF digits for further processing, you can use the GetDataCommand. See http://asterisk-java.sourceforge.net/apidocs/net/sf/asterisk/fastagi/comm= and/GetDataCommand.html The corresponding getData() methods are available in Asterisk-Java CVS-HEAD, but you can as well use the GetDataCommand with Asterisk-Java 0.1 vial channel.sendCommand() =3DStefan |
From: Peter H. <pe...@li...> - 2005-08-10 07:01:38
|
I'm getting an error with using sendCommand(GetDataCommand). I'm not sur= e=20 if this is an asterisk problem or if it's a asterisk-java problem or if i= t's=20 a provider problem. Occassionally, when executing the script, dtmf input is recognized, and t= he=20 AGIReply will always list the response as null (timeout). This will then= =20 happen for the duration of the call, even if subsequent Get Data commands= =20 are executed. This put the provider and asterisk at the top of my list. However, I had= n't=20 had that problem with any of my providers prior to switching over to usin= g=20 AGI script. Any ideas what might be causing this? Peter ----- Original Message -----=20 From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Wednesday, July 27, 2005 3:11 AM Subject: [Asterisk-java-users] Re: Receiving DTMF digits via FastAGI >> A question about the FastAGI stuff in general. Many of the functions >> provided by AbstractAGIScript allow DTMF input to be received from the >> server. >> Is there a way to catch multiple dtmf input instead of a single=20 >> character? >> i.e. I can wait for any digit from 0-9, but I can't wait for '10'.. > > Most of Asterisk's AGI commands can be interrupted by pressing a DTMF=20 > digit. > Which - if any - DTMF digits should cause an interruption can be specif= ied > via the escapeDigits parameter of many of AbstractAGIScript's methods. = The > singe character that those methods return corresponds to the digit that > has been pressed to interrupt the command. > There is no way to say "Abort this command only if user presses DTMF di= git > 2 after he pressed DTMF digit 1". > > If you want to read DTMF digits for further processing, you can use the > GetDataCommand. See > http://asterisk-java.sourceforge.net/apidocs/net/sf/asterisk/fastagi/co= mmand/GetDataCommand.html > The corresponding getData() methods are available in Asterisk-Java > CVS-HEAD, but you can as well use the GetDataCommand with Asterisk-Java > 0.1 vial channel.sendCommand() > > =3DStefan > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: Stefan R. <sr...@re...> - 2005-08-10 08:04:54
|
Hi Peter, > Occassionally, when executing the script, dtmf input is recognized, and > the > AGIReply will always list the response as null (timeout). This will th= en > happen for the duration of the call, even if subsequent Get Data comman= ds > are executed. That sounds odd. However if this only happens from time to time I am almost sure it is not an Asterisk-Java problem. What type of channel do you use in this scenario? (IAX2, SIP, Zap, ..?) > This put the provider and asterisk at the top of my list. However, I > hadn't > had that problem with any of my providers prior to switching over to us= ing > AGI script. Did you process DTMF prior to switching? =3DStefan |
From: Peter H. <pe...@li...> - 2005-08-10 08:32:32
|
----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Wednesday, August 10, 2005 1:04 AM Subject: Re: [Asterisk-java-users] Re: Receiving DTMF digits via FastAGI > Hi Peter, > >> Occassionally, when executing the script, dtmf input is recognized, and >> the >> AGIReply will always list the response as null (timeout). This will then >> happen for the duration of the call, even if subsequent Get Data commands >> are executed. > > That sounds odd. However if this only happens from time to time I am > almost sure it is not an Asterisk-Java problem. > What type of channel do you use in this scenario? (IAX2, SIP, Zap, ..?) > I'm using IAX2 channels, but it seems sporadic... I just wish I could reproduce the error so I could get some more details. I've run 30 tests or so in a row w/o hitting the error again, but it has happened to me about 3 times total on 3 different providers on 3 different days. >> This put the provider and asterisk at the top of my list. However, I >> hadn't >> had that problem with any of my providers prior to switching over to >> using >> AGI script. > > Did you process DTMF prior to switching? Before switching to AGI script, I simply relied on the extension being inputted. i.e. a user hitting '123' would be routed to exten => 123,1,... Now, I'm trying to use the Get Data to check for 123. Another thing I should mention is that I'm stringing a couple of Get Data commands together to play different wav files. Would this cause any problems? Peter |
From: Peter H. <pe...@li...> - 2005-08-10 08:46:31
|
> >> Hi Peter, >> >>> Occassionally, when executing the script, dtmf input is recognized, and >>> the >>> AGIReply will always list the response as null (timeout). This will >>> then >>> happen for the duration of the call, even if subsequent Get Data >>> commands >>> are executed. >> >> That sounds odd. However if this only happens from time to time I am >> almost sure it is not an Asterisk-Java problem. >> What type of channel do you use in this scenario? (IAX2, SIP, Zap, ..?) >> > > I'm using IAX2 channels, but it seems sporadic... I just wish I could > reproduce the error so I could get some more details. I've run 30 tests > or so in a row w/o hitting the error again, but it has happened to me > about 3 times total on 3 different providers on 3 different days. > >>> This put the provider and asterisk at the top of my list. However, I >>> hadn't >>> had that problem with any of my providers prior to switching over to >>> using >>> AGI script. >> >> Did you process DTMF prior to switching? > > Before switching to AGI script, I simply relied on the extension being > inputted. i.e. a user hitting '123' would be routed to exten => 123,1,... > Now, I'm trying to use the Get Data to check for 123. > > Another thing I should mention is that I'm stringing a couple of Get Data > commands together to play different wav files. Would this cause any > problems? > Hmm.. I'm also setting the timeout to 1 ms for the files that I'm streaming that are immediately proceeded by another streaming file. Would this cause any issues? Peter |
From: Stefan R. <sr...@re...> - 2005-08-10 09:01:40
|
>> Before switching to AGI script, I simply relied on the extension being >> inputted. i.e. a user hitting '123' would be routed to exten =3D> >> 123,1,... >> Now, I'm trying to use the Get Data to check for 123. >> >> Another thing I should mention is that I'm stringing a couple of Get >> Data >> commands together to play different wav files. Would this cause any >> problems? >> > > Hmm.. I'm also setting the timeout to 1 ms for the files that I'm > streaming > that are immediately proceeded by another streaming file. Would this > cause > any issues? I wouldn't use Get Data in that case but rather just Stream File. You can provide escape digits to stream file so you can interrupt it. I think thats a cleaner solution. =3DStefan |
From: Peter H. <pe...@li...> - 2005-08-10 19:13:49
|
>>> Before switching to AGI script, I simply relied on the extension being >>> inputted. i.e. a user hitting '123' would be routed to exten => >>> 123,1,... >>> Now, I'm trying to use the Get Data to check for 123. >>> >>> Another thing I should mention is that I'm stringing a couple of Get >>> Data >>> commands together to play different wav files. Would this cause any >>> problems? >>> >> >> Hmm.. I'm also setting the timeout to 1 ms for the files that I'm >> streaming >> that are immediately proceeded by another streaming file. Would this >> cause >> any issues? > > I wouldn't use Get Data in that case but rather just Stream File. You can > provide escape digits to stream file so you can interrupt it. I think > thats a cleaner solution. Right, but the escape digits only allow for a single dtmf input, correct? Peter |
From: Stefan R. <sr...@re...> - 2005-08-10 19:38:50
|
> Right, but the escape digits only allow for a single dtmf input, correc= t? yes, but if you detect that the user escaped you can read the missing digits via waitForDigit |
From: Peter H. <pe...@li...> - 2005-08-10 19:57:22
|
>> Right, but the escape digits only allow for a single dtmf input, correct? > > yes, but if you detect that the user escaped you can read the missing > digits via waitForDigit > I'll give that a try. If there are still any missed dtmf, it'd probably be an asterisk issue. Thanks again, Peter |