Edwin Groothuis
2008-Feb-04 02:50 UTC
[asterisk-users] AGI: Not getting answers from get_data in a call-file call
I have the following situation: I drop a call-file into the Asterisk spool directory and I get called back. That all works. And I have this script: #!/usr/bin/perl -w use Asterisk::AGI; my $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); $AGI->answer(); my $i; $i = $AGI->channel_status(); $AGI->say_digits($i); $i = $AGI->get_data("one-moment-please", 10000, 3); $AGI->say_digits($i); As you can see, nothing serious. When running this script in a normal telephone call, it works. When running this script in the call created with the call-file, I do hear the output of the first say_digits and the one-moment-please, but the pressing of the DTMF keys is not recognized by the system, the get_data() times out and the function returns nothing. This script once worked in 1.2.x (It was part of a bigger project) but now that I want to move it to 1.4 it gives this strange behaviour. Is there anybody with a hint on how to resolve this? Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin at mavetju.org | Weblog: http://www.mavetju.org/weblog/
Matt Riddell
2008-Feb-04 03:08 UTC
[asterisk-users] AGI: Not getting answers from get_data in a call-file call
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Edwin Groothuis wrote:> I have the following situation: I drop a call-file into the Asterisk > spool directory and I get called back. That all works. > > > And I have this script: > > #!/usr/bin/perl -w > > use Asterisk::AGI; > > my $AGI = new Asterisk::AGI; > my %input = $AGI->ReadParse(); > > $AGI->answer(); > > my $i; > $i = $AGI->channel_status(); > $AGI->say_digits($i); > > $i = $AGI->get_data("one-moment-please", 10000, 3); > $AGI->say_digits($i); > > > As you can see, nothing serious. When running this script in a > normal telephone call, it works. When running this script in the > call created with the call-file, I do hear the output of the first > say_digits and the one-moment-please, but the pressing of the DTMF > keys is not recognized by the system, the get_data() times out and > the function returns nothing. > > This script once worked in 1.2.x (It was part of a bigger project) > but now that I want to move it to 1.4 it gives this strange behaviour. > > Is there anybody with a hint on how to resolve this?You'd need to show us: a) The call file b) the snippet of extensions.conf that this is called in - -- Kind Regards, Matt Riddell Director _______________________________________________ http://www.venturevoip.com (Great new VoIP end to end solution) http://www.venturevoip.com/news.php (Daily Asterisk News - html) http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHpoHKDQNt8rg0Kp4RAskFAJ9T/K8gpl6HKa6mjRRNdm/r1MESGwCbBC4i R0buf80sRINRhdUGZk0asPY=CmpE -----END PGP SIGNATURE-----
Edwin Groothuis
2008-Feb-04 03:17 UTC
[asterisk-users] AGI: Not getting answers from get_data in a call-file call
> a) The call fileChannel: Zap/g4/0409227633 MaxRetries: 0 RetryTime: 60 WaitTime: 30 Extension: 0409227633 Callerid: 0409227633 Context: barnet-callback Priority: 1> b) the snippet of extensions.conf that this is called in; ; dial back ; exten => 0293353699,1,AGI(callback1.agi) [barnet-callback] exten => _.X,1,NoOp(callback time) exten => _.X,n,Answer() exten => _.X,n,AGI(callback2.agi) exten => _.X,n,Hangup exten => OutgoingSpoolFailed,1,NoOp(Failed) You dial in on 02 9335 3699, come into the AGI script which creates the above call-file (that works), it calls you back on via the call-file and then drops into the callback2.agi script which is the one I had in the earlier email. As I said earlier: nothing strange, nothing spectacular. Just strange that it doesn't work for calls initiated by Asterisk. -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin at mavetju.org | Weblog: http://www.mavetju.org/weblog/
Matt Riddell
2008-Feb-04 03:29 UTC
[asterisk-users] AGI: Not getting answers from get_data in a call-file call
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Have you tried with AGI Debug on? - -- Kind Regards, Matt Riddell Director _______________________________________________ http://www.venturevoip.com (Great new VoIP end to end solution) http://www.venturevoip.com/news.php (Daily Asterisk News - html) http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHpoaqDQNt8rg0Kp4RAmDDAJ9DiVusLAV2ZlU42YKDr5uo05GIWgCeOliN 7Oe1nB1xymr3Uw+PlshOg3Y=H5n9 -----END PGP SIGNATURE-----
Edwin Groothuis
2008-Feb-04 04:46 UTC
[asterisk-users] AGI: Not getting answers from get_data in a call-file call
> Have you tried with AGI Debug on?Yes! Even before you asked :-) This is when I use DeadAgi (for some reason): -- Executing [h at barnet-callback:3] DeadAGI("Zap/4:103-1", "callback2.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/callback2.agi AGI Tx >> agi_request: callback2.agi AGI Tx >> agi_channel: Zap/4:103-1 AGI Tx >> agi_language: en AGI Tx >> agi_type: Zap AGI Tx >> agi_uniqueid: 1202098745.49994 AGI Tx >> agi_callerid: 0288159096 AGI Tx >> agi_calleridname: unknown AGI Tx >> agi_callingpres: 3 AGI Tx >> agi_callingani2: 0 AGI Tx >> agi_callington: 33 AGI Tx >> agi_callingtns: 0 AGI Tx >> agi_dnid: 88159305 AGI Tx >> agi_rdnis: unknown AGI Tx >> agi_context: barnet-callback AGI Tx >> agi_extension: h AGI Tx >> agi_priority: 3 AGI Tx >> agi_enhanced: 0.0 AGI Tx >> agi_accountcode: AGI Tx >> AGI Rx << CHANNEL STATUS AGI Tx >> 200 result=6 AGI Rx << SAY DIGITS 6 "" [Feb 4 15:19:19] WARNING[19954]: file.c:643 ast_readaudio_callback: Failed to write frame -- <Zap/4:103-1> Playing 'digits/6' (language 'en') AGI Tx >> 200 result=-1 AGI Rx << GET DATA one-moment-please 10000 3 [Feb 4 15:19:19] WARNING[19954]: file.c:643 ast_readaudio_callback: Failed to write frame -- <Zap/4:103-1> Playing 'one-moment-please' (language 'en') AGI Tx >> 200 result=-1 AGI Rx << SAY DIGITS 1 "" [Feb 4 15:19:19] WARNING[19954]: file.c:643 ast_readaudio_callback: Failed to write frame -- <Zap/4:103-1> Playing 'digits/1' (language 'en') AGI Tx >> 200 result=-1 -- AGI Script callback2.agi completed, returning -1 And this is with normal AGI: -- Executing [0288159096 at barnet-callback:3] AGI("Zap/4:100-1", "callback2.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/callback2.agi AGI Tx >> agi_request: callback2.agi AGI Tx >> agi_channel: Zap/4:100-1 AGI Tx >> agi_language: en AGI Tx >> agi_type: Zap AGI Tx >> agi_uniqueid: 1202099898.50183 AGI Tx >> agi_callerid: 0288159096 AGI Tx >> agi_calleridname: unknown AGI Tx >> agi_callingpres: 3 AGI Tx >> agi_callingani2: 0 AGI Tx >> agi_callington: 33 AGI Tx >> agi_callingtns: 0 AGI Tx >> agi_dnid: 82572599 AGI Tx >> agi_rdnis: unknown AGI Tx >> agi_context: barnet-callback AGI Tx >> agi_extension: 0288159096 AGI Tx >> agi_priority: 3 AGI Tx >> agi_enhanced: 0.0 AGI Tx >> agi_accountcode: AGI Tx >> AGI Rx << ANSWER AGI Tx >> 200 result=0 AGI Rx << CHANNEL STATUS AGI Tx >> 200 result=6 AGI Rx << SAY DIGITS 6 "" -- <Zap/4:100-1> Playing 'digits/6' (language 'en') AGI Tx >> 200 result=0 AGI Rx << GET DATA one-moment-please 10000 3 -- <Zap/4:100-1> Playing 'one-moment-please' (language 'en') AGI Tx >> 200 result= (timeout) -- AGI Script callback2.agi completed, returning 0 When running it as a normal call (i.e. not initated by a call-file), it shows up with: AGI Rx << GET DATA one-moment-please 10000 3 -- <Zap/93-1> Playing 'one-moment-please' (language 'en') AGI Tx >> 200 result=354 AGI Rx << SAY DIGITS 354 "" -- <Zap/93-1> Playing 'digits/3' (language 'en') -- <Zap/93-1> Playing 'digits/5' (language 'en') -- <Zap/93-1> Playing 'digits/4' (language 'en') AGI Tx >> 200 result=0 -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin at mavetju.org | Weblog: http://www.mavetju.org/weblog/
Kev S
2008-Feb-04 05:13 UTC
[asterisk-users] Wait in Queue for 120 seconds for agent A to become free, THEN ring next agent
Hi all Just trying to set up a queue and wondering if this is possible. We have 3 agents, One of them is sort of the first point of contact What i am looking to do is 1. Someone rings the queue. 2. It rings Agent A.. If Agent A is on the phone then put them on hold for 120 seconds, and if Agent A gets off the phone within those 120 seconds, put the call to them. 3. If 120 seconds expires, then call agent B, if B rings out, Call agent C So all i need is for the call to wait 120 seconds for agent A to get off the phone. Then progress the call if they dont. Is this possible? If so, any pointers? Cheers - Kev -- This message has been scanned for viruses and dangerous content by Mail Call antivirus software, and is believed to be clean.
Lenz
2008-Feb-04 09:01 UTC
[asterisk-users] Wait in Queue for 120 seconds for agent A to become free, THEN ring next agent
You create three queues: queue A has only agent A, queue B only agent B, and queue C only agent C. You call the firts queue witha timeout of 120 seconds; if call timed out, you call queue B with a timeout of 120 seconds and so on. One note: this does not sound great from a service-level point of view :-) l. On Mon, 04 Feb 2008 06:13:17 +0100, Kev S <kev at mailcall.com.au> wrote:> Hi all > > Just trying to set up a queue and wondering if this is possible. > > We have 3 agents, One of them is sort of the first point of contact > > What i am looking to do is > > 1. Someone rings the queue. > > 2. It rings Agent A.. If Agent A is on the phone then put them on hold > for 120 seconds, and if Agent A gets off the phone within those 120 > seconds, put the call to them. > > 3. If 120 seconds expires, then call agent B, if B rings out, Call agent > C > > So all i need is for the call to wait 120 seconds for agent A to get off > the phone. Then progress the call if they dont. > > Is this possible? If so, any pointers? > > Cheers > - Kev >-- Loway Research - Home of QueueMetrics http://queuemetrics.com
Kev S
2008-Feb-05 05:31 UTC
[asterisk-users] Wait in Queue for 120 seconds for agent A to become free, THEN ring next agent
Sorry to be painful, But how do i set the queue timeout? Regards Kev Lenz wrote:> You create three queues: queue A has only agent A, queue B only agent B, > and queue C only agent C. > You call the firts queue witha timeout of 120 seconds; if call timed out, > you call queue B with a timeout of 120 seconds and so on. > One note: this does not sound great from a service-level point of view :-) > l. > > > > On Mon, 04 Feb 2008 06:13:17 +0100, Kev S <kev at mailcall.com.au> wrote: > > >> Hi all >> >> Just trying to set up a queue and wondering if this is possible. >> >> We have 3 agents, One of them is sort of the first point of contact >> >> What i am looking to do is >> >> 1. Someone rings the queue. >> >> 2. It rings Agent A.. If Agent A is on the phone then put them on hold >> for 120 seconds, and if Agent A gets off the phone within those 120 >> seconds, put the call to them. >> >> 3. If 120 seconds expires, then call agent B, if B rings out, Call agent >> C >> >> So all i need is for the call to wait 120 seconds for agent A to get off >> the phone. Then progress the call if they dont. >> >> Is this possible? If so, any pointers? >> >> Cheers >> - Kev >> >> > > > >-- This message has been scanned for viruses and dangerous content by Mail Call antivirus software, and is believed to be clean.
Philipp Ott
2008-Feb-05 08:23 UTC
[asterisk-users] FastAGI: how does remote process learn of hangup/disconnect
Hello! I m reading all sorts of descriptions of FastAGI() on the internet but I m finding no information how asterisk signals the remote process that the connection has been hungup. In an AGI script you receive a SIGHUP. What happens with a FastAGI connection? Regards