Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] AGI: Not getting answers from get_data in a


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
edwin at mavetju.org
Guest





PostPosted: Sun Feb 03, 2008 9:50 pm    Post subject: [asterisk-users] AGI: Not getting answers from get_data in a Reply with quote

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/
Back to top
matt at venturevoip.com
Guest





PostPosted: Sun Feb 03, 2008 10:08 pm    Post subject: [asterisk-users] AGI: Not getting answers from get_data in a Reply with quote

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Edwin Groothuis wrote:
Quote:
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-----
Back to top
edwin at mavetju.org
Guest





PostPosted: Sun Feb 03, 2008 10:17 pm    Post subject: [asterisk-users] AGI: Not getting answers from get_data in a Reply with quote

Quote:
a) The call file

Channel: Zap/g4/0409227633
MaxRetries: 0
RetryTime: 60
WaitTime: 30
Extension: 0409227633
Callerid: 0409227633
Context: barnet-callback
Priority: 1

Quote:
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/
Back to top
matt at venturevoip.com
Guest





PostPosted: Sun Feb 03, 2008 10:29 pm    Post subject: [asterisk-users] AGI: Not getting answers from get_data in a Reply with quote

-----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-----
Back to top
edwin at mavetju.org
Guest





PostPosted: Sun Feb 03, 2008 11:46 pm    Post subject: [asterisk-users] AGI: Not getting answers from get_data in a Reply with quote

Quote:
Have you tried with AGI Debug on?

Yes! Even before you asked Smile

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/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services