search for: readparse

Displaying 20 results from an estimated 43 matches for "readparse".

Did you mean: readpage
2004 Jun 10
4
How to get the Called id with AGI
Hi all, Is there a way to get the "called id" (the B number) with AGI perl ? I know how to get the caller id which is working fine and is just below: #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); $callerid = $input{'callerid'}; $AGI->say_digits($callerid); } Thanks in advance, Angel. --------------------------------- Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://li...
2004 May 10
1
AGI.pm wait_for_digit() not working for me!!!
...extension in my dialplan..... exten => 21,1,answer exten => 21,2,meetme(21|pb) ..........and here is my AGI........... #!/usr/bin/perl -w #use strict; $aginame="conf-background.agi"; use File::Copy cp; use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); $char=0; #while(1) { #$AGI->exec('WaitExten','25000'); #$char = $AGI->receive_char('600'); $char=chr($AGI->wait_for_digit('600')); print STDERR "input form rec char : $char\n"; if($c...
2004 Oct 05
5
Asterisk Perl AGI
...don't know why yet. To describe you my stage y must start with my configuration in the extensions.conf file. This single line should describe it: exten => 771,1,AGI,myagi.agi Then, this is my code... #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); $AGI->answer(); my $pin = $AGI->get_data("beep"); exit(0); Can somebody tell me why the number I enter after the "beep" is not then stored in $pin ? I'll really preciate any help. Thanks in advance V?ctor Cartes -------------- next part -------------- An HTM...
2004 Jul 01
2
DISA and AGI: authenticate by caller ID?
...uot;; $host = "hostname"; $port = "3306"; $userid = "dbuser"; $password = "dpasswd"; $connectionInfo = "DBI:mysql:database=$db;$host:$port"; $dbh = DBI->connect($connectionInfo,$userid,$password); $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); $AGI->answer(); if (my $callerid = $input{'callerid'}) { $AGI->say_digits($callerid); $query = "SELECT active FROM cids WHERE cid=$callerid"; # active should be 1 if the caller ID is found and set active $sth = $dbh->prepare($query...
2003 Apr 29
6
callerid send to shell script with system command
hi! anyone has a idea how to send caller id (incoming number) to shell script like: exten => s,1,wait,2 exten => s,2,System(/bin/script callerid-number) exten =>s,3,answer i need to run script in shell with command line like "/bin/script -a 123456789 " this 123456789 must be callerid (incoming call) number. tnx, Thomas
2003 Nov 26
3
AGI - CallerID ??
...can get the callerid if I call from an internal extension. But if I call from an outside line it comes up unknown. And if I were to call a internal extension the callerid comes up on the phone. Any pointers.... <script> use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); print STDERR "AGI Environment Dump:\n"; foreach $i (sort keys %input) { print STDERR " -- $i = $input{$i}\n"; } if (my $callerid = $input{'callerid'}) { $AGI->say_digits($callerid); } exit; </script> <results> == CDR updated on...
2003 Nov 27
1
AGI (IF/ELSE)
I need some help with some statements..... #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); my $callerid = $input{'callerid'}; if ($optemp != 1) { my $empid = $AGI->get_data('employee',-1,5); $AGI->stream_file(entered); $AGI->say_digits($empid); my $optemp = $AGI->get_data('correct',-1,1); }else{ my $strid = $AGI-...
2009 Apr 08
1
Perl AGI
...t fetch the extension value to inside the script and assign it to another variable...I highlighted it in red #!/usr/bin/perl #use DBD::mysql; use DBI; use DBD::mysql; use Asterisk::AGI; ############################ #To read asterisk variable values. $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); $AGI->verbose("AGI Environment Dump:", 3); my $micho = $input{9}; $AGI->verbose("my dialed no is :$micho"); foreach my $i (sort keys %input) { $AGI->verbose(" -- $i = $input{$i}", 3); } ################## #To get the asterisk dial no whihc is 112...
2003 Apr 11
1
Weird AGI/X100P behavior
...#39;Zap/1-1' -- Starting simple switch on 'Zap/1-1' The line never gets answered, though....unless I use one of the sample AGI scripts that come with *. My hanguptest.agi file is pretty simple: #!/usr/bin/perl use Asterisk::AGI; $|=1; $AGI = new Asterisk::AGI; %input = $AGI->ReadParse(); $AGI->answer(); $foo = $AGI->wait_for_digit(); print STDERR "Foo: $foo\n"; $AGI->say_digits('$foo'); $AGI->hangup; Am I missing something basic about AGI?
2004 May 07
1
meetme conf-background.agi
...re My extension exten => 21,1,meetme(21|pb) and my AGI **************************************************************************** #!/usr/bin/perl -w $aginame="conf-background.agi"; use File::Copy cp; use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); print STDERR "Dialing your number\n"; $srcfile="/tmp/mycall"; $dstfile="/var/spool/asterisk/outgoing/mycall"; open(MYCALL,">$srcfile") || die "Cant't open file :$srcfile $!\n"; print MYCALL "Channel:Zap/1/13\n"; pr...
2007 Nov 14
4
Problem with AGI Script
...AGIs many times in the past, I'm stumped on this one. It may just be a simple issue that I need another eyeset to look at. My AGI does the following: #!/usr/bin/perl #Load a few modules... use Asterisk::AGI; use DBI; $AGI = new Asterisk::AGI; #Grab input from Asterisk my %input = $AGI->ReadParse(); #Some Debugging $AGI->exec('SayDigits',$ARGV[0]); exit; -------- All seems fine. If I run the script from the command line it works as expected: [root at efax agi-bin]# ./GetEmailFromDID.agi 333 EXEC SayDigits "333" However, when actually running in practice I get: --...
2011 Apr 13
4
AGI and forking
...have any further contact with Asterisk -- it will initiate any necessary future communication via other channels). Is this the sort of thing I need? ########## begin code snippet ########## #!/usr/bin/perl -w use strict; use Asterisk::AGI; my $AGI = new Asterisk::AGI; my %params = $AGI->ReadParse(); $SIG{CHLD} = "IGNORE"; if (my $child_pid = fork) { # This is executed in the parent process exit; } elsif (defined $child_pid) { # This is executed in the child process close STDIN; close STDOUT; close STDERR; # Load some more modules and do some stuf...
2010 Jan 11
1
MeetMe Conferencing - Announce your own join/leave to yourself and other conference members
...meetme.c - line 1601 (the announce_thread function) app_meetme.c - line 1817 (the conf_run function) -- snip -- #!/usr/bin/perl -w use strict; use warnings; use lib '/var/lib/asterisk/agi-bin'; use DBI; use Asterisk::AGI; our ($AGI,%v,%ast); $AGI = new Asterisk::AGI; %ast = $AGI->ReadParse(); $v{chan} = $ast{channel}; $v{lang} = $AGI->get_variable('CHANNEL(language)'); $v{conf} = $AGI->get_variable('conference_call'); $v{dbh} = <sanitized> ($v{q},$v{r}) = undef; $v{q} = "SELECT members FROM <sanitized> WHERE confno = '".$v{conf}.&quo...
2008 Jul 23
3
Trouble Playing message file via Perl AGI
Hi all, I'm trying to build an IVR using the Perl AGI module at http://search.cpan.org/~jamesgol/asterisk-perl-0.10/lib/Asterisk/AGI.pm But, I'm having trouble getting my program to play a message and wait for a keystroke. I am able to use this code to play the file, so I know that the $msg variable points to a valid sound file: $result = $agi->exec("background $msg");
2006 Feb 08
1
Possible AGI Bug in Asterisk?
...CVR_User','****'); my $dbh1 = DBI ->connect('DBI:mysql:CCVR_ADMIN;192.168.6.56','CCVR_User','****'); my $dbh3 = DBI ->connect('DBI:mysql:CCVR;172.16.1.233','user1','****'); #Create AGI $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); # Capture the extension dialed my $extn = $input {'extension'}; #Answer the Call $AGI->answer(); #generate a file name based on the time and extension dialed $ti = time(); $dir = "/vol/recordings/"; $finame = $ti."_".$extn; $fname = $dir.$finame; $finame = $fin...
2010 Apr 28
6
Asterisk 1.4.30 is slow sending STDIN to AGI script
I have upgraded Asterisk from 1.4.22 to 1.4.30 and I have noticed I am getting a lot of errors like this on the console :- ERROR[23912]: utils.c:968 ast_carefulwrite: write() returned error: Broken pipe I have tracked it down to a perl AGI script which performs our own CDR recording. It is called before the start of the call, once answered and again when the call is hungup. It works fine when
2003 Aug 21
7
AGI Channel Status
I'm having some trouble getting the channel status with an AGI script. #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); $AGI->channel_status('Zap/1-1'); I am now stuck, and don't know how to get the return codes: -1 There is no channel that matches the given <channelname> 0 Channel is down and available 1 Channel is down, but reserved 2 Channel is off hook 3 Digits (or equivalent) h...
2003 Oct 07
0
RE: Asterisk-Users] IVR Questions?
...test CVS this morning, as well as the latest AGI perl module. Why won't the AGI->get_data() function work correctly? Joe Richard Lyman <pchammer@dynx.net> wrote the Oct 6, 2003 6:08 PM: > simply add... > > ...... > my $AGI = new Asterisk::AGI; > my %input = $AGI->ReadParse(); ## <---- this line > ...... > > Joe Dennick wrote: > > > > > > That makes a lot of sense, but...it still doesn't work. > > > > > > -----Original Message----- > > > From: asterisk-users-admin@lists.digium.com > > > [mailto:...
2003 Oct 29
1
AGI question or something
Sorry for asking this question again but before I blow 100 dollars on a X100P I need to know this info: So does "SET EXTENSION <new extension>" allow for you to set which extension the rest of the call will occur over? So if a call comes into the switch and I could make the AGI script check the DID or DNIS which is really in the variable agi_dnid? After that I can do a database
2004 Apr 18
0
AGI Module
...conf: Extensions.conf --------------- ; Test agi extension exten => 3102,1,Answer exten => 3102,2,AGI,agi-SQLTest.agi exten => 3102,3,Hangup Agi-SQLTest.agi --------------- #!/usr/bin/perl use Asterisk::AGI; use DBI; $AGI = new Asterisk::AGI; # Read * input info. my %input = $AGI->ReadParse(); # Set SQL server info. $uid = 'asterisk'; $pwd = 'pbx'; $srv = 'SMARTTCom'; # Print variables for debugging. $AGI->verbose("AGI Environment Dump:\n",3); foreach $i (sort keys %input) { $AGI->verbose(" -- $i = $input{$i}\n",3); } # Conn...