From duncan@impede.net Tue May 13 11:55:10 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28392 invoked from network); 13 May 2003 11:55:09 -0000 Received: from amsfep14-int.chello.nl (213.46.243.22) by 3639243841.mi.dial.hexcom.net with SMTP; 13 May 2003 11:55:09 -0000 Received: from fraggle.impede.net ([80.56.102.35]) by amsfep14-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with ESMTP id <20030513115441.MLDU17933.amsfep14-int.chello.nl@fraggle.impede.net> for ; Tue, 13 May 2003 13:54:41 +0200 X-Void-Authorization: DO NOT LEAVE IT IS NOT REAL Message-Id: <5.1.1.6.2.20030513134030.03130f90@mail.vocalisinternet.com> X-Sender: duncan@mail.vocalisinternet.com X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Tue, 13 May 2003 13:50:40 +0200 To: asterisk-perl@lists.gnuinter.net From: duncan Subject: new AGI debugging Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed well it looks like the latest CVS has perl debugging information in it, which means unless you want lots of useless information in your console you should be writing all perl for use strict; and -w. duncan (quickly updating all his "production code" to reduce the vast amounts of non-strict code ive put into test agi files) From james@wwnet.net Tue May 13 14:45:05 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28796 invoked from network); 13 May 2003 14:45:04 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 13 May 2003 14:45:04 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h4DEj3ne025409 for ; Tue, 13 May 2003 10:45:03 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h4DEj2gJ025403 for ; Tue, 13 May 2003 10:45:03 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Tue, 13 May 2003 10:45:02 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: new AGI debugging In-Reply-To: <5.1.1.6.2.20030513134030.03130f90@mail.vocalisinternet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Duncan, I'm not sure what your talking about. The latest asterisk CVS has perl debugging information in it? James On Tue, 13 May 2003, duncan wrote: > well it looks like the latest CVS has perl debugging information in it, > which means unless you want lots of useless information in your console you > should be writing all perl for use strict; and -w. > > From duncan@impede.net Tue May 13 15:22:44 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28950 invoked from network); 13 May 2003 15:22:43 -0000 Received: from amsfep16-int.chello.nl (213.46.243.26) by 3639243841.mi.dial.hexcom.net with SMTP; 13 May 2003 15:22:43 -0000 Received: from fraggle.impede.net ([80.56.102.35]) by amsfep16-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with ESMTP id <20030513152216.CSAH6143.amsfep16-int.chello.nl@fraggle.impede.net> for ; Tue, 13 May 2003 17:22:16 +0200 X-Void-Authorization: DO NOT LEAVE IT IS NOT REAL Message-Id: <5.1.1.6.2.20030513171602.01d5eeb8@mail.vocalisinternet.com> X-Sender: duncan@mail.vocalisinternet.com X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Tue, 13 May 2003 17:18:13 +0200 To: asterisk-perl@lists.gnuinter.net From: duncan Subject: Re: new AGI debugging In-Reply-To: References: <5.1.1.6.2.20030513134030.03130f90@mail.vocalisinternet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed >I'm not sure what your talking about. The latest asterisk CVS has perl >debugging information in it? i was getting messages like this: coming up in the console as people were dialing into my server and launching AGI scripts i had written. making the AGI code "use strict;" compliant stopped them from appearing. -- Executing AGI("OSS/dsp", "ami.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/ami.agi -- Use of uninitialized value in concatenation (.) or string at line X duncan From duncan@impede.net Sun Jun 01 16:11:39 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 25306 invoked from network); 1 Jun 2003 16:11:38 -0000 Received: from gi.bitsyu.net (193.203.8.19) by 3639243841.mi.dial.hexcom.net with SMTP; 1 Jun 2003 16:11:38 -0000 Received: from fraggle.impede.net (ppp153.bitsyu.net [193.203.8.153]) by gi.bitsyu.net (8.12.9/8.12.9) with ESMTP id h51GBT7f125757 for ; Sun, 1 Jun 2003 18:11:32 +0200 (CEST) X-Void-Authorization: DO NOT LEAVE IT IS NOT REAL Message-Id: <5.1.1.6.2.20030601180931.01dcee70@mail.vocalisinternet.com> X-Sender: duncan@mail.vocalisinternet.com X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Sun, 01 Jun 2003 18:10:29 +0200 To: asterisk-perl@lists.gnuinter.net From: duncan Subject: mycallback Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new hey can anyone explain exactly how mycallback works? the agi-test.agi example doesnt really go into much detail. duncan From james@wwnet.net Mon Jun 02 03:44:48 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 26662 invoked from network); 2 Jun 2003 03:44:48 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 2 Jun 2003 03:44:48 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h523ilne022620 for ; Sun, 1 Jun 2003 23:44:47 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h523ik5l022617 for ; Sun, 1 Jun 2003 23:44:46 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Sun, 1 Jun 2003 23:44:46 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: mycallback In-Reply-To: <5.1.1.6.2.20030601180931.01dcee70@mail.vocalisinternet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Duncan, The callback gets executed when a command returns an error condition. It makes it easy to catch when the channel hangs up instead of manually checking the return value of every function (which is a good thing to do anyways). The callback will be called for any AGI command that has a specific return value that specifies an error condition. The only AGI command it does not apply to is EXEC, because EXEC will return whatever the application returns. Hopefully this sheds some light on the issue. James On Sun, 1 Jun 2003, duncan wrote: > hey can anyone explain exactly how mycallback works? the agi-test.agi > example doesnt really go into much detail. > > > > duncan > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From duncan@impede.net Mon Jun 02 12:41:35 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28143 invoked from network); 2 Jun 2003 12:41:35 -0000 Received: from ns1.ptt.yu (212.62.32.1) by 3639243841.mi.dial.hexcom.net with SMTP; 2 Jun 2003 12:41:35 -0000 Received: from fraggle.impede.net (ja-032.ptt.yu [213.137.115.32]) by ns1.ptt.yu (8.11.6/8.11.6) with ESMTP id h52BwYK30744 for ; Mon, 2 Jun 2003 13:58:34 +0200 X-Void-Authorization: DO NOT LEAVE IT IS NOT REAL Message-Id: <5.1.1.6.2.20030602121302.01ce4dc8@mail.vocalisinternet.com> X-Sender: duncan@mail.vocalisinternet.com X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Mon, 02 Jun 2003 12:19:34 +0200 To: asterisk-perl@lists.gnuinter.net From: duncan Subject: Re: mycallback In-Reply-To: References: <5.1.1.6.2.20030601180931.01dcee70@mail.vocalisinternet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed >The callback gets executed when a command returns an error condition. >It makes it easy to catch when the channel hangs up instead of manually >checking the return value of every function (which is a good thing to do >anyways). > >The callback will be called for any AGI command that has a specific return >value that specifies an error condition. The only AGI command it does not >apply to is EXEC, because EXEC will return whatever the application >returns. > >Hopefully this sheds some light on the issue. ok so realistically if i dont set an exit within the perl script then whenever a hangup is detected (from either end of the call) the mycallback subroutine should execute? meaning i can do post-call processing. duncan From james@wwnet.net Mon Jun 02 14:54:56 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28423 invoked from network); 2 Jun 2003 14:54:55 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 2 Jun 2003 14:54:55 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h52Essne027164 for ; Mon, 2 Jun 2003 10:54:54 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h52Esss0027161 for ; Mon, 2 Jun 2003 10:54:54 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Mon, 2 Jun 2003 10:54:54 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: mycallback In-Reply-To: <5.1.1.6.2.20030602121302.01ce4dc8@mail.vocalisinternet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 2 Jun 2003, duncan wrote: > ok so realistically if i dont set an exit within the perl script then > whenever a hangup is detected (from either end of the call) the mycallback > subroutine should execute? meaning i can do post-call processing. That is correct, at least assuming you are using something besides EXEC. When I was throwing together some simple scripts I was being lazy and didn't always check the return values of the AGI calls, so on occasion if the user hungup at a bad time my script would be stuck in a loop and never exit. So to make life easier (and the code shorter) I threw the callback in there James From mstreet@gracie.santarosa.edu Mon Jun 02 17:26:34 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28740 invoked from network); 2 Jun 2003 17:26:33 -0000 Received: from adsl-209-204-160-16.sonic.net (HELO streetchiro.com) (209.204.160.16) by 3639243841.mi.dial.hexcom.net with SMTP; 2 Jun 2003 17:26:33 -0000 Received: (qmail 18600 invoked from network); 2 Jun 2003 17:26:32 -0000 Received: from wdsl-209-204-182-19.sonic.net (HELO duel.streetchiro.com) (209.204.182.19) by strellen.streetchiro.com with SMTP; 2 Jun 2003 17:26:32 -0000 From: Mark Street Reply-To: mstreet@gracie.santarosa.edu To: asterisk-perl@lists.gnuinter.net Subject: SET VARIABLE syntax in agi script. Date: Mon, 2 Jun 2003 10:27:10 -0700 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306021027.10910.mstreet@gracie.santarosa.edu> Are my SET VARIABLE syntax correct?? Will the asterisk environment be able to use this variable in my dial plan? I plan to have the particular extension reset this variable each time the extension is chosen. if ( $cntr >= $#file ) { print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; $cntr = 1; } else { print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; $cntr++; } entire sourcecode below. ----------------------------------------------------------- #!/usr/bin/perl use strict; use warnings; open FHIN, "phonelist.txt" or die "No phone list!\n"; my $cntr; my $l = ; if ( $l =~ /Counter/i ) { (my $dmy, $cntr) = split( "=" , $l); } else { open FHOUT, ">phonelist.tmp" or die "Can't open temp file!\n"; print "Counter=1\n"; close FHOUT; exit; } my @file = ; if ( $cntr >= $#file ) { print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; $cntr = 1; } else { print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; $cntr++; } open FHOUT, ">phonelist.txt" or die "Can't open phonelist for writing!\n"; print FHOUT "Counter=$cntr\n"; foreach $l ( @file ) { print FHOUT $l; } close FHOUT; -- Mark Street, D.C. Red Hat Certified Engineer Cert# 807302251406074 -- Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0 GPG key http://www.streetchiro.com/pubkey.asc From james@wwnet.net Mon Jun 02 17:32:51 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28769 invoked from network); 2 Jun 2003 17:32:51 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 2 Jun 2003 17:32:51 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h52HWone029169 for ; Mon, 2 Jun 2003 13:32:50 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h52HWokR029166 for ; Mon, 2 Jun 2003 13:32:50 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Mon, 2 Jun 2003 13:32:50 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: SET VARIABLE syntax in agi script. In-Reply-To: <200306021027.10910.mstreet@gracie.santarosa.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII A bit off topic here, since this list is to discuss the asterisk-perl modules, and not just general asterisk perl interaction. >From the asterisk cli you can get information about available agi commands. CLI> show agi set variable Usage: SET VARIABLE So in your case (assuming $file[$cntr - 1] contains valid data) that would be the correct syntax. If you want to be sure, you could do a GET VARIABLE on the same name and compare it with what you were trying to set. That being said, and since this is my asterisk-perl mailing list, maybe you should check out Asterisk::AGI (http://asterisk.gnuinter.net) which would make your script writing much easier. Your SET VARIABLE command would be: $AGI->set_variable('PHONE_NUM', $file[$cntr - 1]); James On Mon, 2 Jun 2003, Mark Street wrote: > Are my SET VARIABLE syntax correct?? Will the asterisk environment be able to > use this variable in my dial plan? I plan to have the particular extension > reset this variable each time the extension is chosen. > > if ( $cntr >= $#file ) { > print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; > $cntr = 1; > } > else { > print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; > $cntr++; > } > > entire sourcecode below. > ----------------------------------------------------------- > #!/usr/bin/perl > > use strict; > use warnings; > > open FHIN, "phonelist.txt" or die "No phone list!\n"; > my $cntr; > my $l = ; > if ( $l =~ /Counter/i ) { > (my $dmy, $cntr) = split( "=" , $l); > } > else { > open FHOUT, ">phonelist.tmp" or die "Can't open temp file!\n"; > print "Counter=1\n"; > close FHOUT; > exit; > } > > my @file = ; > > if ( $cntr >= $#file ) { > print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; > $cntr = 1; > } > else { > print "SET VARIABLE PHONE_NUM $file[$cntr - 1]"; > $cntr++; > } > open FHOUT, ">phonelist.txt" or die "Can't open phonelist for writing!\n"; > print FHOUT "Counter=$cntr\n"; > foreach $l ( @file ) { > print FHOUT $l; > > } > close FHOUT; > > > -- > Mark Street, D.C. > Red Hat Certified Engineer > Cert# 807302251406074 > -- > Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0 > GPG key http://www.streetchiro.com/pubkey.asc > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From jet@sonic.net Thu Jun 12 19:17:49 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28844 invoked from network); 12 Jun 2003 19:17:49 -0000 Received: from b.smtp-out.sonic.net (208.201.224.39) by 3639243841.mi.dial.hexcom.net with SMTP; 12 Jun 2003 19:17:49 -0000 Received: (qmail 16768 invoked from network); 12 Jun 2003 19:17:40 -0000 Received: from sub.sonic.net (208.201.224.8) by b.smtp-out.sonic.net with SMTP; 12 Jun 2003 19:17:40 -0000 Received: from duel.streetchiro.com (adsl-209-204-160-16.sonic.net [209.204.160.16]) by sub.sonic.net (8.11.6p2/8.8.5) with ESMTP id h5CJHYY25416 for ; Thu, 12 Jun 2003 12:17:34 -0700 X-envelope-info: From: Mark Street To: asterisk-perl@lists.gnuinter.net Subject: Almost there.... Asterisk::AGI Date: Thu, 12 Jun 2003 12:18:15 -0700 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306121218.15084.jet@sonic.net> Hi, I am so close I can taste it.... If I set the variable $number as a scalar Asterisk executes and says the digits without a problem. When I set $number by calling my function Asterisk returns 0 without executing say_digits.... TIA #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; #my %input = $AGI->ReadParse(); #$number = '43211868'; #$number = get_phone_number($phone); $AGI->say_digits($number); $AGI->set_variable(PHONENUM, $number); #$AGI->exec('Dial', 'Zap/2/' . $number); sub get_phone_number { open FHIN, "phonelist.txt" or die "No phone list!\n"; my $cntr; my $l = ; my $phone = ''; if ( $l =~ /Counter/i ) { (my $dmy, $cntr) = split( "=" , $l); } else { open FHOUT, ">phonelist.tmp" or die "Can't open temp file!\n"; print "Counter=1\n"; close FHOUT; exit; } my @file = ; if ( $cntr >= $#file ) { $phone = $file[$cntr - 1]; $cntr = 1; } else { $phone = $file[$cntr - 1]; $cntr++; } open FHOUT, ">phonelist.txt" or die "Can't open phonelist for writing!\n"; print FHOUT "Counter=$cntr\n"; foreach $l ( @file ) { print FHOUT $l; } close FHOUT; return $phone; } -- Mark Street, D.C. Red Hat Certified Engineer Cert# 807302251406074 -- Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0 GPG key http://www.streetchiro.com/pubkey.asc From mstreet@gracie.santarosa.edu Thu Jun 12 19:18:07 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28873 invoked from network); 12 Jun 2003 19:18:07 -0000 Received: from adsl-209-204-160-16.sonic.net (HELO Strellen.streetchiro.com) (209.204.160.16) by 3639243841.mi.dial.hexcom.net with SMTP; 12 Jun 2003 19:18:07 -0000 Received: from duel.streetchiro.com (unknown [192.168.1.3]) by Strellen.streetchiro.com (Postfix) with ESMTP id 3C6DF1441EF for ; Thu, 12 Jun 2003 12:18:06 -0700 (PDT) From: Mark Street To: asterisk-perl@lists.gnuinter.net Subject: Almost there.... Asterisk::AGI Date: Thu, 12 Jun 2003 12:18:46 -0700 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Disposition: inline Reply-To: mstreet@gracie.santarosa.edu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200306121218.46942.mstreet@gracie.santarosa.edu> Hi, I am so close I can taste it.... If I set the variable $number as a scalar Asterisk executes and says the digits without a problem. When I set $number by calling my function Asterisk returns 0 without executing say_digits.... TIA #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; #my %input = $AGI->ReadParse(); #$number = '43211868'; #$number = get_phone_number($phone); $AGI->say_digits($number); $AGI->set_variable(PHONENUM, $number); #$AGI->exec('Dial', 'Zap/2/' . $number); sub get_phone_number { open FHIN, "phonelist.txt" or die "No phone list!\n"; my $cntr; my $l = ; my $phone = ''; if ( $l =~ /Counter/i ) { (my $dmy, $cntr) = split( "=" , $l); } else { open FHOUT, ">phonelist.tmp" or die "Can't open temp file!\n"; print "Counter=1\n"; close FHOUT; exit; } my @file = ; if ( $cntr >= $#file ) { $phone = $file[$cntr - 1]; $cntr = 1; } else { $phone = $file[$cntr - 1]; $cntr++; } open FHOUT, ">phonelist.txt" or die "Can't open phonelist for writing!\n"; print FHOUT "Counter=$cntr\n"; foreach $l ( @file ) { print FHOUT $l; } close FHOUT; return $phone; } -- Mark Street, D.C. Red Hat Certified Engineer Cert# 807302251406074 -- Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0 GPG key http://www.streetchiro.com/pubkey.asc From martinp@digium.com Thu Jun 12 19:21:34 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28907 invoked from network); 12 Jun 2003 19:21:34 -0000 Received: from hoochie.digium.com (216.207.245.2) by 3639243841.mi.dial.hexcom.net with SMTP; 12 Jun 2003 19:21:34 -0000 Received: from hoochie.digium.com (localhost [127.0.0.1]) by hoochie.digium.com (8.12.1/8.12.1/Debian -5) with ESMTP id h5CJLWs6000557; Thu, 12 Jun 2003 14:21:32 -0500 Received: from localhost (martinp@localhost) by hoochie.digium.com (8.12.1/8.12.1/Debian -5) with ESMTP id h5CJLWl2000553; Thu, 12 Jun 2003 14:21:32 -0500 X-Authentication-Warning: hoochie.digium.com: martinp owned process doing -bs Date: Thu, 12 Jun 2003 14:21:32 -0500 (CDT) From: Martin Pycko X-X-Sender: To: Mark Street cc: Subject: Re: Almost there.... Asterisk::AGI In-Reply-To: <200306121218.15084.jet@sonic.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In the example that you attached you don't have the $number defined at all. It's all commented out. Martin On Thu, 12 Jun 2003, Mark Street wrote: > Hi, > I am so close I can taste it.... If I set the variable $number as a scalar > Asterisk executes and says the digits without a problem. When I set $number > by calling my function Asterisk returns 0 without executing say_digits.... > TIA > > #!/usr/bin/perl > > use Asterisk::AGI; > $AGI = new Asterisk::AGI; > > #my %input = $AGI->ReadParse(); > #$number = '43211868'; > #$number = get_phone_number($phone); > > $AGI->say_digits($number); > $AGI->set_variable(PHONENUM, $number); > #$AGI->exec('Dial', 'Zap/2/' . $number); > > sub get_phone_number { > > open FHIN, "phonelist.txt" or die "No phone list!\n"; > my $cntr; > my $l = ; > my $phone = ''; > > if ( $l =~ /Counter/i ) { > (my $dmy, $cntr) = split( "=" , $l); > } > else { > open FHOUT, ">phonelist.tmp" or die "Can't open temp file!\n"; > print "Counter=1\n"; > close FHOUT; > exit; > } > > my @file = ; > > if ( $cntr >= $#file ) { > > $phone = $file[$cntr - 1]; > $cntr = 1; > } > else { > $phone = $file[$cntr - 1]; > $cntr++; > } > open FHOUT, ">phonelist.txt" or die "Can't open phonelist for writing!\n"; > print FHOUT "Counter=$cntr\n"; > foreach $l ( @file ) { > print FHOUT $l; > } > close FHOUT; > return $phone; > } > > -- > Mark Street, D.C. > Red Hat Certified Engineer > Cert# 807302251406074 > -- > Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0 > GPG key http://www.streetchiro.com/pubkey.asc > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From mstreet@gracie.santarosa.edu Thu Jun 12 19:39:17 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28959 invoked from network); 12 Jun 2003 19:39:16 -0000 Received: from adsl-209-204-160-16.sonic.net (HELO Strellen.streetchiro.com) (209.204.160.16) by 3639243841.mi.dial.hexcom.net with SMTP; 12 Jun 2003 19:39:16 -0000 Received: from duel.streetchiro.com (unknown [192.168.1.3]) by Strellen.streetchiro.com (Postfix) with ESMTP id 130731441EF for ; Thu, 12 Jun 2003 12:39:16 -0700 (PDT) From: Mark Street Reply-To: mstreet@gracie.santarosa.edu To: Subject: Re: Almost there.... Asterisk::AGI Date: Thu, 12 Jun 2003 12:39:56 -0700 User-Agent: KMail/1.5.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306121239.56363.mstreet@gracie.santarosa.edu> On Thursday 12 June 2003 12:21, Martin Pycko wrote: > In the example that you attached you don't have the $number defined at > all. It's all commented out. Right on, the first one works.... the second one does not. I got a hint from chat... $#number = get_phone_number($phone); but that does not work. > On Thu, 12 Jun 2003, Mark Street wrote: > > Hi, > > I am so close I can taste it.... If I set the variable $number as a > > scalar Asterisk executes and says the digits without a problem. When I > > set $number by calling my function Asterisk returns 0 without executing > > say_digits.... TIA > > > > #!/usr/bin/perl > > > > use Asterisk::AGI; > > $AGI = new Asterisk::AGI; > > > > #my %input = $AGI->ReadParse(); > > #$number = '43211868'; > > #$number = get_phone_number($phone); > > > > $AGI->say_digits($number); > > $AGI->set_variable(PHONENUM, $number); > > #$AGI->exec('Dial', 'Zap/2/' . $number); > > > > sub get_phone_number { > > > > open FHIN, "phonelist.txt" or die "No phone list!\n"; > > my $cntr; > > my $l = ; > > my $phone = ''; > > > > if ( $l =~ /Counter/i ) { > > (my $dmy, $cntr) = split( "=" , $l); > > } > > else { > > open FHOUT, ">phonelist.tmp" or die "Can't open temp file!\n"; > > print "Counter=1\n"; > > close FHOUT; > > exit; > > } > > > > my @file = ; > > > > if ( $cntr >= $#file ) { > > > > $phone = $file[$cntr - 1]; > > $cntr = 1; > > } > > else { > > $phone = $file[$cntr - 1]; > > $cntr++; > > } > > open FHOUT, ">phonelist.txt" or die "Can't open phonelist for > > writing!\n"; print FHOUT "Counter=$cntr\n"; > > foreach $l ( @file ) { > > print FHOUT $l; > > } > > close FHOUT; > > return $phone; > > } > > > > -- > > Mark Street, D.C. > > Red Hat Certified Engineer > > Cert# 807302251406074 > > -- > > Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0 > > GPG key http://www.streetchiro.com/pubkey.asc > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net -- Mark Street, D.C. Red Hat Certified Engineer Cert# 807302251406074 -- Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0 GPG key http://www.streetchiro.com/pubkey.asc From carlosdelmayor@yahoo.es Thu Jun 19 09:00:08 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 17769 invoked from network); 19 Jun 2003 09:00:08 -0000 Received: from web13309.mail.yahoo.com (216.136.175.192) by 3639243841.mi.dial.hexcom.net with SMTP; 19 Jun 2003 09:00:08 -0000 Message-ID: <20030619090007.71682.qmail@web13309.mail.yahoo.com> Received: from [80.58.41.44] by web13309.mail.yahoo.com via HTTP; Thu, 19 Jun 2003 11:00:07 CEST Date: Thu, 19 Jun 2003 11:00:07 +0200 (CEST) From: =?iso-8859-1?q?carlos=20del=20mayor?= Subject: i'm new To: asterisk-perl@lists.gnuinter.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-353930826-1056013207=:70128" Content-Transfer-Encoding: 8bit --0-353930826-1056013207=:70128 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit hi I'm a new user of perl, but I have worked for a while with asterisk. I'm interested in starting with AGI (perl). If someone could say me where can I find documentation and examples I'll be very gratefull. I've visited http://home.cogeco.ca/~camstuff/agi.html but there's nothing about perl. I've visited too http://asterisk.gnuinter.net/ and there I've find this mailing list, but little documentation. Please, any help will be apreciated. Thank you very much. Carlos --------------------------------- Yahoo! Sorteos Juega a la Loterķa Primitiva sin salir de casa --0-353930826-1056013207=:70128 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
hi
I'm a new user of perl, but I have worked for a while with asterisk. I'm interested in starting with AGI (perl). If someone could say me where can I find documentation and examples I'll be very gratefull. I've visited  http://home.cogeco.ca/~camstuff/agi.html but there's nothing about perl. I've visited too http://asterisk.gnuinter.net/ and there I've find this mailing list, but little documentation. Please, any help will be apreciated.
Thank you very much.
Carlos


Yahoo! Sorteos
Juega a la Loterķa Primitiva sin salir de casa
--0-353930826-1056013207=:70128-- From duncan@impede.net Thu Jun 19 13:21:57 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 18570 invoked from network); 19 Jun 2003 13:21:56 -0000 Received: from gi.bitsyu.net (193.203.8.19) by 3639243841.mi.dial.hexcom.net with SMTP; 19 Jun 2003 13:21:56 -0000 Received: from fraggle.impede.net (ppp223.bitsyu.net [193.203.8.223]) by gi.bitsyu.net (8.12.9/8.12.9) with ESMTP id h5JDLc3u396815 for ; Thu, 19 Jun 2003 15:21:47 +0200 (CEST) X-Void-Authorization: DO NOT LEAVE IT IS NOT REAL Message-Id: <5.1.1.6.2.20030619151613.01cd1c00@mail.vocalisinternet.com> X-Sender: duncan@mail.vocalisinternet.com X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Thu, 19 Jun 2003 15:17:39 +0200 To: asterisk-perl@lists.gnuinter.net From: duncan Subject: Re: i'm new In-Reply-To: <20030619090007.71682.qmail@web13309.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new >I'm a new user of perl, but I have worked for a while with asterisk. I'm >interested in starting with AGI (perl). If someone could say me where can >I find documentation and examples I'll be very gratefull. I've >visited >http://home.cogeco.ca/~camstuff/agi.html >but there's nothing about perl. I've visited too >http://asterisk.gnuinter.net/ and there >I've find this mailing list, but little documentation. Please, any help >will be apreciated. >Thank you very much. >Carlos in the tar.gz files for agi-perl there are some examples. its a bit light on proper documentation but the examples and code speak for themselves really. duncan From eric@fnords.org Fri Jun 27 13:45:58 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 11933 invoked from network); 27 Jun 2003 13:45:57 -0000 Received: from dsl092-207-122.sea1.dsl.speakeasy.net (HELO fs-1.fnords.org) (66.92.207.122) by 3639243841.mi.dial.hexcom.net with SMTP; 27 Jun 2003 13:45:57 -0000 Received: from [172.16.17.33] (unknown [172.16.17.33]) by fs-1.fnords.org (Postfix) with ESMTP id B2A8D1AE61 for ; Fri, 27 Jun 2003 08:50:42 -0500 (CDT) Subject: perl-asterisk problems From: Eric Wieling To: asterisk-perl@lists.gnuinter.net Content-Type: text/plain Organization: Message-Id: <1056721547.32473.92.camel@vulcan.fnords.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 27 Jun 2003 08:45:47 -0500 Content-Transfer-Encoding: 7bit I'm having problems with get_variable I can get_variable("MACRO_EXTEN") but I can't seem to access many of the other variables. Am I doing something wrong, is there a bug in asterisk-perl, or a bug in Asterisk? And help would be appreciated. I'm using the following script as a test: #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); my $gvcallerid = $AGI->get_variable("CALLERID"); $AGI->verbose("get_variable \"CALLERID\" = $gvcallerid", 1); my $gvcalleridnum = $AGI->get_variable("CALLERIDNUM"); $AGI->verbose("get_variable \"CALLERIDNUM\" = $gvcalleridnum", 1); my $gvcalleridname = $AGI->get_variable("CALLERIDNAME"); $AGI->verbose("get_variable \"CALLERIDNAME\" = $gvcalleridname", 1); my $incallerid = $input{callerid}; $AGI->verbose("\$input\{callerid\} = $incallerid", 1); my $incalleridnum = $input{calleridnum}; $AGI->verbose("\$input\{calleridnum\}= $incalleridnum", 1); my $incalleridname = $input{calleridname}; $AGI->verbose("\$input\{calleridname\} = $incalleridname", 1); And I get the following output: /etc/asterisk/agi/test.agi: get_variable CALLERID = /etc/asterisk/agi/test.agi: get_variable CALLERIDNUM = /etc/asterisk/agi/test.agi: get_variable CALLERIDNAME = /etc/asterisk/agi/test.agi: $input{callerid} = God <2010> /etc/asterisk/agi/test.agi: $input{calleridnum}= /etc/asterisk/agi/test.agi: $input{calleridname} = -- BTEL Consulting 850-484-4535 x2111 (Office) 504-595-3916 x2111 (Experimental) 877-552-0838 (Backup Phone) From james@wwnet.net Fri Jun 27 15:18:27 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 12123 invoked from network); 27 Jun 2003 15:18:27 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 27 Jun 2003 15:18:27 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h5RFIQne003029 for ; Fri, 27 Jun 2003 11:18:26 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h5RFIPGR003026 for ; Fri, 27 Jun 2003 11:18:26 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Fri, 27 Jun 2003 11:18:25 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: perl-asterisk problems In-Reply-To: <1056721547.32473.92.camel@vulcan.fnords.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII The special variables listed in README.variables from the asterisk source dir are not real channel variables. They are just substituted by the extensions.conf parser so they won't be available to anything else. Almost everything that is available there is also available via the agi pseudo-environment variables. James On 27 Jun 2003, Eric Wieling wrote: > I'm having problems with get_variable I can get_variable("MACRO_EXTEN") > but I can't seem to access many of the other variables. Am I doing > something wrong, is there a bug in asterisk-perl, or a bug in Asterisk? > > And help would be appreciated. > > I'm using the following script as a test: > > #!/usr/bin/perl > use Asterisk::AGI; > $AGI = new Asterisk::AGI; > > my %input = $AGI->ReadParse(); > > my $gvcallerid = $AGI->get_variable("CALLERID"); > $AGI->verbose("get_variable \"CALLERID\" = $gvcallerid", 1); > > my $gvcalleridnum = $AGI->get_variable("CALLERIDNUM"); > $AGI->verbose("get_variable \"CALLERIDNUM\" = $gvcalleridnum", 1); > > my $gvcalleridname = $AGI->get_variable("CALLERIDNAME"); > $AGI->verbose("get_variable \"CALLERIDNAME\" = $gvcalleridname", 1); > > my $incallerid = $input{callerid}; > $AGI->verbose("\$input\{callerid\} = $incallerid", 1); > > my $incalleridnum = $input{calleridnum}; > $AGI->verbose("\$input\{calleridnum\}= $incalleridnum", 1); > > my $incalleridname = $input{calleridname}; > $AGI->verbose("\$input\{calleridname\} = $incalleridname", 1); > > > And I get the following output: > > /etc/asterisk/agi/test.agi: get_variable CALLERID = > /etc/asterisk/agi/test.agi: get_variable CALLERIDNUM = > /etc/asterisk/agi/test.agi: get_variable CALLERIDNAME = > /etc/asterisk/agi/test.agi: $input{callerid} = God <2010> > /etc/asterisk/agi/test.agi: $input{calleridnum}= > /etc/asterisk/agi/test.agi: $input{calleridname} = > > -- > BTEL Consulting > 850-484-4535 x2111 (Office) > 504-595-3916 x2111 (Experimental) > 877-552-0838 (Backup Phone) > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From danfernandez00@hotmail.com Fri Jul 25 23:25:35 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 4783 invoked from network); 25 Jul 2003 23:25:34 -0000 Received: from law11-oe16.law11.hotmail.com (HELO hotmail.com) (64.4.16.120) by 3639243841.mi.dial.hexcom.net with SMTP; 25 Jul 2003 23:25:34 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 25 Jul 2003 16:25:00 -0700 Received: from 200.40.223.180 by law11-oe16.law11.hotmail.com with DAV; Fri, 25 Jul 2003 23:24:59 +0000 X-Originating-IP: [200.40.223.180] X-Originating-Email: [danfernandez00@hotmail.com] From: "Dan Fernandez" To: Subject: problem with simple script Date: Fri, 25 Jul 2003 20:24:54 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0092_01C352EA.CEB96FB0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 25 Jul 2003 23:25:00.0261 (UTC) FILETIME=[F7B90150:01C35303] ------=_NextPart_000_0092_01C352EA.CEB96FB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I wrote a very simple perl script who is responding differently = depending where it is being triggered from. If I call the script from any extension it works fine. However, if I = call it from extension h (it gets executed after hangup) simple stuff = like verbose or get_variable don=B4t work anymore. Any ideas? Rgds Dan ------=_NextPart_000_0092_01C352EA.CEB96FB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I wrote a very simple perl script who = is responding=20 differently depending where it is being triggered from.
 
If I call the script from any extension = it works=20 fine. However, if I call it from extension h (it gets executed after = hangup)=20 simple stuff like verbose or get_variable don=B4t work = anymore.
 
Any ideas?
 
Rgds
Dan
------=_NextPart_000_0092_01C352EA.CEB96FB0-- From james@wwnet.net Sat Jul 26 03:38:31 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 5265 invoked from network); 26 Jul 2003 03:38:31 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 26 Jul 2003 03:38:31 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h6Q3cUne015795 for ; Fri, 25 Jul 2003 23:38:30 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h6Q3cUif015792 for ; Fri, 25 Jul 2003 23:38:30 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Fri, 25 Jul 2003 23:38:30 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: problem with simple script In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE It's not an Asterisk::AGI problem, its an AGI problem. When app_agi.c is running it does an ast_read and if it returns a NULL frame then then the channel has been hungup. I've modified the code a bit so it works the way you would expect. I'm going to do a bit more testing and ship the patch over to Mark. James On Fri, 25 Jul 2003, Dan Fernandez wrote: > I wrote a very simple perl script who is responding differently depending= where it is being triggered from. >=20 > If I call the script from any extension it works fine. However, if I call= it from extension h (it gets executed after hangup) simple stuff like verb= ose or get_variable don=B4t work anymore. >=20 > Any ideas? >=20 > Rgds > Dan >=20 From kilburna@iservnetworks.com Wed Aug 06 04:44:54 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 8332 invoked from network); 6 Aug 2003 04:44:53 -0000 Received: from unknown (HELO int-server.iserv.net.au) (203.221.180.162) by 3639243841.mi.dial.hexcom.net with SMTP; 6 Aug 2003 04:44:53 -0000 Received: from w2kserver ([202.59.100.210]) by int-server.iserv.net.au (Merak 5.9.4) with SMTP id AAD73788 for ; Wed, 06 Aug 2003 14:44:24 +1000 From: "Kilburn Abrahams" To: Subject: * is not read in get_data Date: Wed, 6 Aug 2003 14:44:24 +1000 Message-ID: <009b01c35bd5$696fc480$0400a8c0@w2kserver> MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal Hi If I use get_data command and I type 8956214*23#, the result string is 8956214 and not 8956214*23. I would like to capture the * as well. Am I doing something wrong? Thanks Kilburn From james@wwnet.net Wed Aug 06 16:52:54 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 10080 invoked from network); 6 Aug 2003 16:52:54 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 6 Aug 2003 16:52:54 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h76Gqrne027460 for ; Wed, 6 Aug 2003 12:52:53 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h76Gqrjg027457 for ; Wed, 6 Aug 2003 12:52:53 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Wed, 6 Aug 2003 12:52:53 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: * is not read in get_data In-Reply-To: <009b01c35bd5$696fc480$0400a8c0@w2kserver> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I haven't tested this to see if I can duplicate it, but if there is a problem it wouldn't be in Asterisk::AGI it would be in asterisk itself. When I get a chance I'll attempt to duplicate the problem and see if I can come up with a patch to make it work as expected. James On Wed, 6 Aug 2003, Kilburn Abrahams wrote: > Hi > > If I use get_data command and I type 8956214*23#, the result string is > 8956214 and not 8956214*23. I would like to capture the * as well. Am I > doing something wrong? > > Thanks > > Kilburn > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From kilburna@iservnetworks.com Wed Aug 06 22:20:29 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 10851 invoked from network); 6 Aug 2003 22:20:29 -0000 Received: from unknown (HELO int-server.iserv.net.au) (203.221.180.162) by 3639243841.mi.dial.hexcom.net with SMTP; 6 Aug 2003 22:20:29 -0000 Received: from w2kserver ([202.59.100.210]) by int-server.iserv.net.au (Merak 5.9.4) with SMTP id AAD73788; Thu, 07 Aug 2003 08:19:49 +1000 From: "Kilburn Abrahams" To: "'James Golovich'" , Subject: RE: * is not read in get_data Date: Thu, 7 Aug 2003 08:19:50 +1000 Message-ID: <00dc01c35c68$daa311a0$0400a8c0@w2kserver> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: Importance: Normal The * key is detected when you use the vanilla version of Perl that comes with asterisk, but not with Asterisk::AGI. -----Original Message----- From: James Golovich [mailto:james@wwnet.net] Sent: Thursday, 7 August 2003 2:53 AM To: asterisk-perl@lists.gnuinter.net Subject: Re: * is not read in get_data I haven't tested this to see if I can duplicate it, but if there is a problem it wouldn't be in Asterisk::AGI it would be in asterisk itself. When I get a chance I'll attempt to duplicate the problem and see if I can come up with a patch to make it work as expected. James On Wed, 6 Aug 2003, Kilburn Abrahams wrote: > Hi > > If I use get_data command and I type 8956214*23#, the result string is > 8956214 and not 8956214*23. I would like to capture the * as well. Am > I doing something wrong? > > Thanks > > Kilburn > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > --------------------------------------------------------------------- To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net From james@wwnet.net Thu Aug 07 18:17:22 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 13552 invoked from network); 7 Aug 2003 18:17:21 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 7 Aug 2003 18:17:21 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h77IHDne013886 for ; Thu, 7 Aug 2003 14:17:13 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h77IHCMs013883 for ; Thu, 7 Aug 2003 14:17:13 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Thu, 7 Aug 2003 14:17:12 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: RE: * is not read in get_data In-Reply-To: <00dc01c35c68$daa311a0$0400a8c0@w2kserver> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Your absolutely right. I've got it fixed, and I'll roll a new release today which fixes this and one other bug. James On Thu, 7 Aug 2003, Kilburn Abrahams wrote: > The * key is detected when you use the vanilla version of Perl that > comes with asterisk, but not with Asterisk::AGI. > > -----Original Message----- > From: James Golovich [mailto:james@wwnet.net] > Sent: Thursday, 7 August 2003 2:53 AM > To: asterisk-perl@lists.gnuinter.net > Subject: Re: * is not read in get_data > > > I haven't tested this to see if I can duplicate it, but if there is a > problem it wouldn't be in Asterisk::AGI it would be in asterisk itself. > When I get a chance I'll attempt to duplicate the problem and see if I > can come up with a patch to make it work as expected. > > James > > On Wed, 6 Aug 2003, Kilburn Abrahams wrote: > > > Hi > > > > If I use get_data command and I type 8956214*23#, the result string is > > > 8956214 and not 8956214*23. I would like to capture the * as well. Am > > I doing something wrong? > > > > Thanks > > > > Kilburn > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From james@wwnet.net Thu Aug 07 18:28:45 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 13638 invoked from network); 7 Aug 2003 18:28:45 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 7 Aug 2003 18:28:45 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id h77ISine014010 for ; Thu, 7 Aug 2003 14:28:44 -0400 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id h77ISiEe014007 for ; Thu, 7 Aug 2003 14:28:44 -0400 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Thu, 7 Aug 2003 14:28:44 -0400 (EDT) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: asterisk-perl 0.08 released Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII A new version of asterisk-perl has been released to fix some small issues. It can be found at the usual spot (http://asterisk.gnuinter.net) Here is the recent CHANGES info: 0.08 Fixed Asterisk::AGI check_result regex so get_data works with '*' Added passing channel as arg to AGI command CHANNEL STATUS 0.07 Added new AGI command set_music Bug fix from John Halleck Added MD5 Challenge auth to Asterisk::Manager If anyone runs across any other issues, send them to me or to the asterisk-perl mailing list. Thanks James Golovich From eric@fnords.org Sun Sep 14 07:08:07 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 9159 invoked from network); 14 Sep 2003 07:08:06 -0000 Received: from lakemtao01.cox.net (68.1.17.244) by 3639243841.mi.dial.hexcom.net with SMTP; 14 Sep 2003 07:08:06 -0000 Received: from fs-1.fnords.org ([68.109.105.237]) by lakemtao01.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20030914070739.VIRZ29208.lakemtao01.cox.net@fs-1.fnords.org> for ; Sun, 14 Sep 2003 03:07:39 -0400 Received: from vulcan.fnords.org (unknown [172.16.17.33]) by fs-1.fnords.org (Postfix) with ESMTP id E2F7E1AE77 for ; Sun, 14 Sep 2003 02:09:01 -0500 (CDT) Subject: Patch: Support SAY TIME AGI Command From: Eric Wieling To: asterisk-perl@lists.gnuinter.net Content-Type: multipart/mixed; boundary="=-XDbow4xIYqWFkGb7T9Ro" Message-Id: <1063523258.6773.30.camel@vulcan.fnords.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Sun, 14 Sep 2003 02:07:38 -0500 --=-XDbow4xIYqWFkGb7T9Ro Content-Type: text/plain Content-Transfer-Encoding: 7bit I submitted a patch to app_agi.c to expose the ast_say_time function to the AGI. Bug ID is http://bugs.digium.com/bug_view_page.php?bug_id=0000269 Attached is a patch to asterisk-perl to support this new feature. Don't apply until the patch to app_agi.c is put into CVS. Patch is attached. -- BTEL Consulting +1-850-484-4535 x2111 (Pensacola) +1-504-595-3916 x2111 (New Orleans) +1-877-677-9643 x2111 (Toll Free) --=-XDbow4xIYqWFkGb7T9Ro Content-Disposition: attachment; filename=say-time.diff Content-Type: text/x-patch; name=say-time.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit *** lib/Asterisk/AGI.pm-orig 2003-09-14 02:07:16.000000000 -0500 --- lib/Asterisk/AGI.pm 2003-09-14 02:07:26.000000000 -0500 *************** *** 270,275 **** --- 270,305 ---- return $ret; } + =item $AGI->say_time($number, $digits) + + Executes AGI Command "SAY TIME $number $digits" + + Says the given $number, returning early if any of the $digits are received. + + Example: $AGI->say_time('98765'); + + Returns: -1 on error or hangup, + 0 if playback completes without a digit being pressed, + or the ASCII numerical value of the digit of one was pressed. + + =cut + + sub say_time { + my ($self, $number, $digits) = @_; + + my $ret = 0; + + $digits = '""' if (!defined($digits)); + + return -1 if (!defined($number)); + $number =~ s/\D//g; + $ret = $self->execute("SAY TIME $number $digits"); + + $self->callback($ret) if ($ret == -1); + + return $ret; + } + =item $AGI->say_digits($number, $digits) Executes AGI Command "SAY DIGITS $number $digits" --=-XDbow4xIYqWFkGb7T9Ro-- From wilane@omnicron.us Tue Oct 14 12:24:40 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 11339 invoked from network); 14 Oct 2003 12:24:40 -0000 Received: from unknown (HELO salam.omnicron.us) (213.154.93.183) by 3639243841.mi.dial.hexcom.net with SMTP; 14 Oct 2003 12:24:40 -0000 Received: by salam.omnicron.us (Postfix, from userid 500) id 24F8BB4039; Tue, 14 Oct 2003 12:16:38 +0000 (GMT) From: Ousmane Wilane MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16267.59686.101703.228876@SALAM.ARC.SN> Date: Tue, 14 Oct 2003 12:16:38 +0000 To: asterisk-perl@lists.gnuinter.net Subject: Perl and fork X-Mailer: VM 7.13 under Emacs 21.2.1 Reply-To: wilane@omnicron.us X-url: http://purl.org/net/wilane/ X-Attribution: OW X-GPGKeyFP: 5E63 D4F9 D16C 59FA 70CE E154 BC15 6DA1 8C9F 6F9F X-OS: What I can Hack! X-Accepted-Format: text/plain (iso-8859-15); pdf Hi, I'm sure I'm doing something wrong and misunderstanding some Asterisk/Perl/Unix internals but I don't know what. Hopefully someone on this list will sched some lights on me. The following code doesn't work as expected (I :) and I don't know why: $pid = fork; if ($pid == 0) { $AGI->stream_file("callingcard/pls-wait-connect-call"); $ret = $AGI->exec('Dial', "$pattern|60|H"); print LOGFILE "\nGoing to exit child process\n"; exit; } print LOGFILE "\nCould not fork\n" unless defined $pid; # This is not executed till the chan hangup $AGI->stream_file("callingcard/carried-away-by-monkeys"); } Any help would be greatly appreciated. Using Asterisk CVS-09/12/03-09:23:49 and asterisk-perl 0.08 Kind regards -- Ousmane Wilane From duncan@impede.net Fri Oct 24 11:41:55 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 17771 invoked from network); 24 Oct 2003 11:41:55 -0000 Received: from unknown (HELO bart0.capitalcity.vocalisinternet.local) (62.223.245.46) by 3639243841.mi.dial.hexcom.net with SMTP; 24 Oct 2003 11:41:55 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by bart0.capitalcity.vocalisinternet.local (Postfix) with ESMTP id 3750F17EDCD for ; Fri, 24 Oct 2003 13:41:12 +0200 (CEST) Received: from bart0.capitalcity.vocalisinternet.local ([127.0.0.1]) by localhost (bart0.capitalcity.vocalisinternet.local [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 13226-06 for ; Fri, 24 Oct 2003 13:41:11 +0200 (CEST) Received: from fraggle.impede.net (unknown [213.240.59.220]) (using SSLv3 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bart0.capitalcity.vocalisinternet.local (Postfix) with ESMTP id 72D0A17ED6D for ; Fri, 24 Oct 2003 13:41:07 +0200 (CEST) X-Void-Authorization: DO NOT LEAVE IT IS NOT REAL Message-Id: <5.1.1.6.2.20031024133433.01dc6228@mail.vocalisinternet.com> X-Sender: duncan.bates@mail.vocalisinternet.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Fri, 24 Oct 2003 13:38:20 +0200 To: asterisk-perl@lists.gnuinter.net From: duncan Subject: record_file Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at capitalcity.vocalisinternet.local show agi record file Usage: RECORD FILE [offset samples] [BEEP] [s=silence] Record to a file until a given dtmf digit in the sequence is received Returns -1 on hangup or error. The format will specify what kind of file will be recorded. The timeout is the maximum record time in milliseconds, or -1 for no timeout. Offset samples is optional, and if provided will seek to the offset without exceeding the end of the file. "silence" is the number of seconds of silence allowed before the function returns despite the lack of dtmf digits or reaching timeout. Silence value must be preceeded by "s=" and is optional. ok im trying to record files using AGI and am experiencing problems. what i needed to do is write a file to: /var/lib/asterisk/sounds/account/$timedatestamp and escape the recording of the file when 1 is pressed. so my code is: (the usual asterisk stuff) my $filename = "/var/lib/asterisk/sounds/account/$timedatestamp"; $AGI->record_file('$filename','gsm',1,50000); it doesnt seem to be working, ive checked the directory permissions and the usual things, but just cant seem to a) record it into the correct place and b) end the recording by pressing 1. anything im doing wrong? duncan From duncan@impede.net Sat Oct 25 19:39:43 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 22748 invoked from network); 25 Oct 2003 19:39:43 -0000 Received: from unknown (HELO bart0.capitalcity.vocalisinternet.local) (62.223.245.46) by 3639243841.mi.dial.hexcom.net with SMTP; 25 Oct 2003 19:39:43 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by bart0.capitalcity.vocalisinternet.local (Postfix) with ESMTP id 8B56A17ED95 for ; Sat, 25 Oct 2003 21:39:00 +0200 (CEST) Received: from bart0.capitalcity.vocalisinternet.local ([127.0.0.1]) by localhost (bart0.capitalcity.vocalisinternet.local [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 05320-10 for ; Sat, 25 Oct 2003 21:39:00 +0200 (CEST) Received: from fraggle.impede.net (unknown [213.240.59.220]) (using SSLv3 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bart0.capitalcity.vocalisinternet.local (Postfix) with ESMTP id 977CB17ED8D for ; Sat, 25 Oct 2003 21:38:57 +0200 (CEST) X-Void-Authorization: DO NOT LEAVE IT IS NOT REAL Message-Id: <5.1.1.6.2.20031025213448.0303e368@mail.vocalisinternet.com> X-Sender: duncan.bates@mail.vocalisinternet.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Sat, 25 Oct 2003 21:36:03 +0200 To: asterisk-perl@lists.gnuinter.net From: duncan Subject: Re: record_file In-Reply-To: <5.1.1.6.2.20031024133433.01dc6228@mail.vocalisinternet.com > Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at capitalcity.vocalisinternet.local >ok im trying to record files using AGI and am experiencing problems. what >i needed to do is write a file to: > >/var/lib/asterisk/sounds/account/$timedatestamp > >and escape the recording of the file when 1 is pressed. so my code is: > >(the usual asterisk stuff) > >my $filename = "/var/lib/asterisk/sounds/account/$timedatestamp"; > >$AGI->record_file('$filename','gsm',1,50000); just to archive the solution in case someone has the same problem in future, the correct code is: $AGI->record_file($filename,'gsm',1,-1); and its working like a charm (and i changed the timeout) duncan From mataluis@xtremenetworks.biz Mon Nov 10 19:53:08 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 19408 invoked from network); 10 Nov 2003 19:53:08 -0000 Received: from unknown (HELO localhost.localdomain) (63.150.78.213) by 3639243841.mi.dial.hexcom.net with SMTP; 10 Nov 2003 19:53:08 -0000 Received: from xtremewks1 ([192.168.254.240]) by localhost.localdomain (8.11.6/8.11.6) with SMTP id hAAJqtX16866 for ; Mon, 10 Nov 2003 14:52:55 -0500 From: "Luis Mata" To: Subject: Callback in Asterisk::AGI Date: Mon, 10 Nov 2003 14:53:10 -0500 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01C3A79A.5BC0A5A0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 ------=_NextPart_000_0006_01C3A79A.5BC0A5A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Does any one knows how to make the callback command in AGI works. I have the following syntax, and when a user Hangup I want to return control to my AGI scripts, but in this case Asterisk ends the scripts..Here is how am declaring the callback.. my %input = $AGI->ReadParse(); $AGI->setcallback(\&mycallback); And of course I have a sub routine define as sub mycallbak Luis B. Mata Director of Information and Technology Xtreme Networks, Inc. www.XremeNetworks.biz mataluis@xtremenetworks.biz phone: 1-305-621-0066 Fax : 1-305-614-7037 ------=_NextPart_000_0006_01C3A79A.5BC0A5A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Does any one knows how to make the callback command in AGI works. = I have the following syntax, and when a user Hangup I want to return control to = my AGI scripts, but in this case Asterisk ends the scripts..Here is how am = declaring the callback..

 

my %input =3D = $AGI->ReadParse();

 

$AGI->setcallback(\&mycallback);

 

And of course I have a sub routine define as sub = mycallbak

 

 

 

 

Luis B. = Mata<= /p>

Director of Information and = Technology<= /p>

Xtreme Networks, = Inc.<= /p>

www.XremeNetworks.biz<= /p>

mataluis@xtremenetworks.biz= <= /p>

phone: = 1-305-621-0066<= /p>

Fax    : 1-305-614-7037<= /p>

 <= /p>

------=_NextPart_000_0006_01C3A79A.5BC0A5A0-- From kausik77@hotmail.com Mon Nov 17 21:20:12 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 13918 invoked from network); 17 Nov 2003 21:20:11 -0000 Received: from law12-f89.law12.hotmail.com (HELO hotmail.com) (64.4.19.89) by 3639243841.mi.dial.hexcom.net with SMTP; 17 Nov 2003 21:20:11 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 17 Nov 2003 13:19:45 -0800 Received: from 203.193.130.116 by lw12fd.law12.hotmail.msn.com with HTTP; Mon, 17 Nov 2003 21:19:45 GMT X-Originating-IP: [203.193.130.116] X-Originating-Email: [kausik77@hotmail.com] From: "Kausik Chatterjee" To: asterisk-perl@lists.gnuinter.net Bcc: Subject: Asterisk Cdr Date: Tue, 18 Nov 2003 02:49:45 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 17 Nov 2003 21:19:45.0198 (UTC) FILETIME=[85E6A4E0:01C3AD50] Hi All, I am a new user of Asterisk. I have compiled and instaled asterisk-0.5.0. I have also added a set of new dial plans along with some new users in my extension.conf file.I have also edited sip.conf file.My intention was,to run asterisk as a IVR and billing server.I am also using VOCAL software and Mediatrix 1204 switches in my network setup.VOCAL server is redirecting the call to the respective switches, and switches are transfering the call to PSTN. My network setup is as follow: pstn-->switch-->Asterisk-->VOCAL server-->switch-->pstn I have got sucess to receive the IVR from asterisk, user agent verification through asterisk is going perfectly allright. I have also created a Mysql database according to asterisk instruction,and got success to view the data regarding each call which I have made from Mysql database. But I am facing some problem with Client Id fields in Mysql database. The Client Id is still fillup by the default port no of the switch, by which call is entering to the asterisk system. I want to create a seperate Client Id database and also want to fill Client Id field to Cdr Mysql database from that Client Id database during User authentication. Please give me suggessions to acheive this goal. regards, Kaushik _________________________________________________________________ Express your Digital Self. Win fabulous prizes. http://www.msn.co.in/DigitalSelf/ Enter this cool contest. From james@wwnet.net Mon Nov 17 22:32:37 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 14142 invoked from network); 17 Nov 2003 22:32:37 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 17 Nov 2003 22:32:37 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id hAHMWamM030894 for ; Mon, 17 Nov 2003 17:32:36 -0500 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id hAHMWZAp030891 for ; Mon, 17 Nov 2003 17:32:35 -0500 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Mon, 17 Nov 2003 17:32:35 -0500 (EST) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: Asterisk Cdr In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I saw this same message posted to the asterisk-dev list. It's pretty OT for that list, and definitely for this list. The asterisk-users list would be more appropriate for this message James On Tue, 18 Nov 2003, Kausik Chatterjee wrote: > Hi All, > > I am a new user of Asterisk. I have compiled and instaled asterisk-0.5.0. > I have also added a set of new dial plans along with some new users in my > extension.conf file.I have also edited sip.conf file.My intention was,to > run asterisk as a IVR and billing server.I am also using VOCAL software > and Mediatrix 1204 switches in my network setup.VOCAL server is redirecting > the call to the respective switches, and switches are transfering the call > to PSTN. > My network setup is as follow: > pstn-->switch-->Asterisk-->VOCAL server-->switch-->pstn > > I have got sucess to receive the IVR from asterisk, user agent verification > through asterisk is going perfectly allright. > > I have also created a Mysql database according to asterisk instruction,and > got success to view the data regarding each call which I have made from > Mysql database. > But I am facing some problem with Client Id fields in Mysql database. > The Client Id is still fillup by the default port no of the switch, > by which call is entering to the asterisk system. > > I want to create a seperate Client Id database and also want to fill > Client Id field to Cdr Mysql database from that Client Id database during > User authentication. > > Please give me suggessions to acheive this goal. > > regards, > > Kaushik > > _________________________________________________________________ > Express your Digital Self. Win fabulous prizes. > http://www.msn.co.in/DigitalSelf/ Enter this cool contest. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From russ@botech.net Tue Nov 18 13:04:13 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 16690 invoked from network); 18 Nov 2003 13:04:13 -0000 Received: from mail.botech.net (66.84.224.20) by 3639243841.mi.dial.hexcom.net with SMTP; 18 Nov 2003 13:04:13 -0000 Received: from botech.net [69.39.68.66] by mail.botech.net with ESMTP (SMTPD32-8.04) id A8C1CD2005E; Tue, 18 Nov 2003 08:04:01 -0500 Message-ID: <3FBA18C0.4060503@botech.net> Date: Tue, 18 Nov 2003 08:04:00 -0500 From: "Russ Beaupre, P.E." User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: asterisk-perl@lists.gnuinter.net Subject: Callerid Name Problem Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-RBL-Warning: REVDNS: This E-mail was sent from a mail server 69.39.68.66 with no reverse DNS entry. X-Note: This E-mail was scanned by BoTech Communications Corp for spam. Hi, I installed the 0.08 version of asterisk-perl and tried the calleridnamelookup.agi script. It runs and i do get callerid, but the name doesn't seem to update properly. Any pointers on debuging this? I'm using gentoo, if that helps. Thanks, -rb From dbarber@calltrex.com Tue Dec 16 23:34:14 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 28027 invoked from network); 16 Dec 2003 23:34:14 -0000 Received: from unknown (HELO calltrex.com) (69.28.206.62) by 3639243841.mi.dial.hexcom.net with SMTP; 16 Dec 2003 23:34:14 -0000 Received: from lhosts ([204.244.71.34]) by calltrex.com (8.12.8/8.12.8) with ESMTP id hBGNV79v009751 for ; Tue, 16 Dec 2003 15:31:07 -0800 Subject: QueueStatus command From: Derek Barber To: asterisk-perl@lists.gnuinter.net Content-Type: text/plain Message-Id: <1071618096.864.116.camel@infinity> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 16 Dec 2003 15:41:36 -0800 Content-Transfer-Encoding: 7bit Hi, I've been working with the Manager.pm module and it is working great except when I try to run the QueueStatus command. I am using the following code to call the QueueStatus command: print STDERR $astman->sendcommand( Action => 'QueueStatus'); And I get the following error message: ResponseSuccessMessageQueue status will followOdd number of elements in hash assignment at ../lib/Asterisk/Manager.pm line 330, line 20. Odd number of elements in hash assignment at ../lib/Asterisk/Manager.pm line 330, line 40. Odd number of elements in hash assignment at ../lib/Asterisk/Manager.pm line 330, line 53. Any help would be greatly appreciated! Thanks, Derek From mattf@vicimarketing.com Wed Dec 17 13:20:10 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 30402 invoked from network); 17 Dec 2003 13:20:10 -0000 Received: from rrcs-se-24-173-158-34.biz.rr.com (HELO vicimail.vicimarketinggroup.com) (24.173.158.34) by 3639243841.mi.dial.hexcom.net with SMTP; 17 Dec 2003 13:20:10 -0000 Received: by vicimail.vicimarketinggroup.com with Internet Mail Service (5.5.2656.59) id ; Wed, 17 Dec 2003 08:20:31 -0500 Message-ID: From: mattf To: 'Derek Barber' , asterisk-perl@lists.gnuinter.net Subject: RE: QueueStatus command Date: Wed, 17 Dec 2003 08:20:30 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" Hello, I would suggest ditching the Manager.pm and just using Net::Telnet. I have had several problems with the way Manager.pm connected to Asterisk, and since I switched to Net::Telnet I have had no problems for over a month with crashes, dropped connections, corrupted data or zombie processes in my perl scripts. Here is a sample of connecting to the Asterisk Manager through Net::Telnet: use Net::Telnet; $t = new Net::Telnet (Port => 5038, Prompt => '/.*[\$%#>] $/', Output_record_separator => '',); #$fh = $t->dump_log("./telnet_log.txt"); uncomment if you want a telnet dumplog $t->open("$server_ip"); $t->waitfor('/0\n$/'); # waitfor login $t->print("Action: Login\nUsername: $ASTmgrUSERNAME\nSecret: $ASTmgrSECRET\n\n"); $t->waitfor('/Authentication accepted/'); # waitfor auth accepted $originate_command = ''; $originate_command .= "Action: Originate\n"; $originate_command .= "Channel: $SIP_user\n"; $originate_command .= "Context: default\n"; $originate_command .= "Exten: $number_to_dial\n"; $originate_command .= "Priority: 1\n"; $originate_command .= "CallerID: Asterisk Client dial\n"; $originate_command .= "\n"; @outside_dial = $t->cmd(String => "$originate_command", Prompt => '/Response: Success.*/'); $t->print("Action: Logoff\n\n"); $ok = $t->close; Let me know if that helps, MATT--- -----Original Message----- From: Derek Barber [mailto:dbarber@calltrex.com] Sent: Tuesday, December 16, 2003 6:42 PM To: asterisk-perl@lists.gnuinter.net Subject: QueueStatus command Hi, I've been working with the Manager.pm module and it is working great except when I try to run the QueueStatus command. I am using the following code to call the QueueStatus command: print STDERR $astman->sendcommand( Action => 'QueueStatus'); And I get the following error message: ResponseSuccessMessageQueue status will followOdd number of elements in hash assignment at ../lib/Asterisk/Manager.pm line 330, line 20. Odd number of elements in hash assignment at ../lib/Asterisk/Manager.pm line 330, line 40. Odd number of elements in hash assignment at ../lib/Asterisk/Manager.pm line 330, line 53. Any help would be greatly appreciated! Thanks, Derek --------------------------------------------------------------------- To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net From muhammad@telappliant.com Tue Dec 23 09:17:21 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 19843 invoked from network); 23 Dec 2003 09:17:21 -0000 Received: from unknown (HELO tel01.dyndns.org) (62.3.220.66) by 3639243841.mi.dial.hexcom.net with SMTP; 23 Dec 2003 09:17:21 -0000 Received: from telmon (telmon [192.168.254.192]) by tel01.dyndns.org (8.12.8/8.12.8) with SMTP id hBN9GuLo006413 for ; Tue, 23 Dec 2003 09:16:56 GMT Message-ID: <048901c3c935$cf9d5470$c0fea8c0@telmon> From: "Muhammad Nasim" To: Subject: database_get method Date: Tue, 23 Dec 2003 09:19:04 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0486_01C3C935.CF5F6110" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 ------=_NextPart_000_0486_01C3C935.CF5F6110 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Does anyone know of any problems with the=20 database_get method. It returns nothing, even when the same request at the CLI = works fine as does the same request from the Manager interface. Does = anyone know if its still supported? ------=_NextPart_000_0486_01C3C935.CF5F6110 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
 
 
Does anyone know of any problems with the=20
 
database_get
 
 method. It returns nothing, even when the same = request at=20 the  CLI works fine as does the same request from the Manager = interface.=20 Does anyone know if its still=20 supported?
<= /HTML> ------=_NextPart_000_0486_01C3C935.CF5F6110-- From james@wwnet.net Tue Dec 23 19:28:08 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 21589 invoked from network); 23 Dec 2003 19:28:07 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 23 Dec 2003 19:28:07 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id hBNJS6mM004523; Tue, 23 Dec 2003 14:28:07 -0500 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id hBNJS6ID004520; Tue, 23 Dec 2003 14:28:06 -0500 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Tue, 23 Dec 2003 14:28:06 -0500 (EST) From: James Golovich To: Muhammad Nasim cc: asterisk-perl@lists.gnuinter.net Subject: Re: database_get method In-Reply-To: <048901c3c935$cf9d5470$c0fea8c0@telmon> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII If you include the code that you are trying to use, I'll see if I can reproduce the problem. database_get has always worked for me in the past when I've used it. It's always possible that something in asterisk has changed. James On Tue, 23 Dec 2003, Muhammad Nasim wrote: > > > > Does anyone know of any problems with the > > database_get > > method. It returns nothing, even when the same request at the CLI works fine as does the same request from the Manager interface. Does anyone know if its still supported? From muhammad@telappliant.com Tue Dec 23 19:37:18 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 21689 invoked from network); 23 Dec 2003 19:37:18 -0000 Received: from unknown (HELO tel01.dyndns.org) (62.3.220.66) by 3639243841.mi.dial.hexcom.net with SMTP; 23 Dec 2003 19:37:18 -0000 Received: from telmon (telmon [192.168.254.192]) by tel01.dyndns.org (8.12.8/8.12.8) with SMTP id hBNJarLo012255; Tue, 23 Dec 2003 19:36:53 GMT Message-ID: <059101c3c98c$6bc2aa70$c0fea8c0@telmon> From: "Muhammad Nasim" To: "James Golovich" Cc: References: Subject: Re: database_get method Date: Tue, 23 Dec 2003 19:39:03 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Thanks Here is the code #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; $simcalls = $AGI->database_get('testfamily', 'testvar'); print "VERBOSE \"The value of simcalls is $simcalls \" \n"; . . . . . exit; The verbose line prints $simcalls as empty. Thanks ----- Original Message ----- From: "James Golovich" To: "Muhammad Nasim" Cc: Sent: Tuesday, December 23, 2003 7:28 PM Subject: Re: database_get method > If you include the code that you are trying to use, I'll see if I can > reproduce the problem. database_get has always worked for me in the past > when I've used it. It's always possible that something in asterisk has > changed. > > James > > On Tue, 23 Dec 2003, Muhammad Nasim wrote: > > > > > > > > > Does anyone know of any problems with the > > > > database_get > > > > method. It returns nothing, even when the same request at the CLI works fine as does the same request from the Manager interface. Does anyone know if its still supported? > From james@wwnet.net Tue Dec 23 19:41:32 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 21785 invoked from network); 23 Dec 2003 19:41:31 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 23 Dec 2003 19:41:31 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id hBNJfUmM004725 for ; Tue, 23 Dec 2003 14:41:31 -0500 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id hBNJfUQR004722 for ; Tue, 23 Dec 2003 14:41:30 -0500 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Tue, 23 Dec 2003 14:41:30 -0500 (EST) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: database_get method In-Reply-To: <059101c3c98c$6bc2aa70$c0fea8c0@telmon> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I suspect your running into a common problem, that I intend to modify Asterisk::AGI to overcome at some point. If you don't do $AGI->ReadParse(); when the AGI starts up then the AGI won't work as expected James On Tue, 23 Dec 2003, Muhammad Nasim wrote: > Thanks > > Here is the code > > #!/usr/bin/perl > > use Asterisk::AGI; > $AGI = new Asterisk::AGI; > > $simcalls = $AGI->database_get('testfamily', 'testvar'); > > print "VERBOSE \"The value of simcalls is $simcalls \" \n"; > > > . > . > . > . > . > exit; > > > The verbose line prints $simcalls as empty. > > Thanks > > > > > > ----- Original Message ----- > From: "James Golovich" > To: "Muhammad Nasim" > Cc: > Sent: Tuesday, December 23, 2003 7:28 PM > Subject: Re: database_get method > > > > If you include the code that you are trying to use, I'll see if I can > > reproduce the problem. database_get has always worked for me in the past > > when I've used it. It's always possible that something in asterisk has > > changed. > > > > James > > > > On Tue, 23 Dec 2003, Muhammad Nasim wrote: > > > > > > > > > > > > > > Does anyone know of any problems with the > > > > > > database_get > > > > > > method. It returns nothing, even when the same request at the CLI > works fine as does the same request from the Manager interface. Does anyone > know if its still supported? > > > From muhammad@telappliant.com Tue Dec 23 19:41:36 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 21854 invoked from network); 23 Dec 2003 19:41:35 -0000 Received: from unknown (HELO tel01.dyndns.org) (62.3.220.66) by 3639243841.mi.dial.hexcom.net with SMTP; 23 Dec 2003 19:41:35 -0000 Received: from telmon (telmon [192.168.254.192]) by tel01.dyndns.org (8.12.8/8.12.8) with SMTP id hBNJfBLo012291; Tue, 23 Dec 2003 19:41:11 GMT Message-ID: <05a001c3c98d$055d05e0$c0fea8c0@telmon> From: "Muhammad Nasim" To: "James Golovich" Cc: Subject: Fw: database_get method Date: Tue, 23 Dec 2003 19:43:21 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 I wonder if its a redhat specific problem as i have noticed that the only thing that works in agi-test.agi is the SAY NUMBER command. ----- Original Message ----- From: "Muhammad Nasim" To: "James Golovich" Cc: Sent: Tuesday, December 23, 2003 7:39 PM Subject: Re: database_get method > Thanks > > Here is the code > > #!/usr/bin/perl > > use Asterisk::AGI; > $AGI = new Asterisk::AGI; > > $simcalls = $AGI->database_get('testfamily', 'testvar'); > > print "VERBOSE \"The value of simcalls is $simcalls \" \n"; > > > . > . > . > . > . > exit; > > > The verbose line prints $simcalls as empty. > > Thanks > > > > > > ----- Original Message ----- > From: "James Golovich" > To: "Muhammad Nasim" > Cc: > Sent: Tuesday, December 23, 2003 7:28 PM > Subject: Re: database_get method > > > > If you include the code that you are trying to use, I'll see if I can > > reproduce the problem. database_get has always worked for me in the past > > when I've used it. It's always possible that something in asterisk has > > changed. > > > > James > > > > On Tue, 23 Dec 2003, Muhammad Nasim wrote: > > > > > > > > > > > > > > Does anyone know of any problems with the > > > > > > database_get > > > > > > method. It returns nothing, even when the same request at the CLI > works fine as does the same request from the Manager interface. Does anyone > know if its still supported? > > > From james@wwnet.net Tue Dec 23 20:39:03 2003 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 22072 invoked from network); 23 Dec 2003 20:39:02 -0000 Received: from water.wwnet.net (root@209.142.196.43) by 3639243841.mi.dial.hexcom.net with SMTP; 23 Dec 2003 20:39:02 -0000 Received: from water.wwnet.net (james@localhost [127.0.0.1]) by water.wwnet.net (8.12.9/8.12.8) with ESMTP id hBNKd1mM005725 for ; Tue, 23 Dec 2003 15:39:02 -0500 Received: from localhost (james@localhost) by water.wwnet.net (8.12.9/8.12.8/Submit) with ESMTP id hBNKd1Wi005722 for ; Tue, 23 Dec 2003 15:39:01 -0500 X-Authentication-Warning: water.wwnet.net: james owned process doing -bs Date: Tue, 23 Dec 2003 15:39:01 -0500 (EST) From: James Golovich To: asterisk-perl@lists.gnuinter.net Subject: Re: Fw: database_get method In-Reply-To: <05a001c3c98d$055d05e0$c0fea8c0@telmon> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII There are numerous people using AGI, Asterisk::AGI, and asterisk on redhat. I do recall seeing a notice about some problems with redhat 9.1 that required some environment variable to be set before starting asterisk. James On Tue, 23 Dec 2003, Muhammad Nasim wrote: > I wonder if its a redhat specific problem as i have noticed that the only > thing that works in agi-test.agi is the SAY NUMBER command. > > > ----- Original Message ----- > From: "Muhammad Nasim" > To: "James Golovich" > Cc: > Sent: Tuesday, December 23, 2003 7:39 PM > Subject: Re: database_get method > > > > Thanks > > > > Here is the code > > > > #!/usr/bin/perl > > > > use Asterisk::AGI; > > $AGI = new Asterisk::AGI; > > > > $simcalls = $AGI->database_get('testfamily', 'testvar'); > > > > print "VERBOSE \"The value of simcalls is $simcalls \" \n"; > > > > > > . > > . > > . > > . > > . > > exit; > > > > > > The verbose line prints $simcalls as empty. > > > > Thanks > > > > > > > > > > > > ----- Original Message ----- > > From: "James Golovich" > > To: "Muhammad Nasim" > > Cc: > > Sent: Tuesday, December 23, 2003 7:28 PM > > Subject: Re: database_get method > > > > > > > If you include the code that you are trying to use, I'll see if I can > > > reproduce the problem. database_get has always worked for me in the > past > > > when I've used it. It's always possible that something in asterisk has > > > changed. > > > > > > James > > > > > > On Tue, 23 Dec 2003, Muhammad Nasim wrote: > > > > > > > > > > > > > > > > > > > Does anyone know of any problems with the > > > > > > > > database_get > > > > > > > > method. It returns nothing, even when the same request at the CLI > > works fine as does the same request from the Manager interface. Does > anyone > > know if its still supported? > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From tad@media.mit.edu Mon Jan 05 16:25:47 2004 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 6141 invoked from network); 5 Jan 2004 16:25:47 -0000 Received: from aleve.media.mit.edu (18.85.2.171) by 3639243841.mi.dial.hexcom.net with SMTP; 5 Jan 2004 16:25:47 -0000 Received: from ml.media.mit.edu (ml.media.mit.edu [18.85.13.107]) by aleve.media.mit.edu (8.9.3p3/8.9.3/+ALEVE) with ESMTP id LAA02095 for ; Mon, 5 Jan 2004 11:25:46 -0500 (EST) Date: Mon, 5 Jan 2004 11:25:46 -0500 (EST) From: tad To: asterisk-perl@lists.gnuinter.net Subject: asterisk::manager event handling documentation? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII hi there. i'm just starting out with asterisk-perl, and am trying to get a sense of the capabilities. my immediate problem is with callfiles - i'm using perl scripts to place outgoing calls by generating callfiles, and need a way to know if a spooled outgoing call fails. as far as i can tell, the best way to do this will be by parsing lines from the console (to the best of my knowledge, this is the only feedback that asterisk gives when an outgoing call is not answered). i've looked at the source for the asterisk::manager module, and it appears that there is a mechanism for event handling. however, i'm unclear on how this works. am i right in thinking that asterisk::manager provides a means for reading from the console? if so, can someone provide a pointer to appropriate documentation (google didn't yield anything useful)? if i'm on the wrong track, well, it would be nice to know that too ;) thanks, tad From muhammad@telappliant.com Fri Jan 09 10:32:13 2004 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 20250 invoked from network); 9 Jan 2004 10:32:12 -0000 Received: from unknown (HELO tel01.dyndns.org) (62.3.220.66) by 3639243841.mi.dial.hexcom.net with SMTP; 9 Jan 2004 10:32:12 -0000 Received: from telmon (telmon [192.168.254.192]) by tel01.dyndns.org (8.12.8/8.12.8) with SMTP id i09AVQLo026159; Fri, 9 Jan 2004 10:31:26 GMT Message-ID: <017b01c3d69c$31f3cf50$c0fea8c0@telmon> From: "Muhammad Nasim" To: "James Golovich" , References: Subject: Re: database_get method Date: Fri, 9 Jan 2004 10:34:43 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Thanks for this James. It works fine now with the ReadParse(). I'm also using the Manager.pm to do some database getting. FYI I get the following back from when I do a database_get, though this doesn't stop me from picking up the required variable: Odd number of elements in hash assignment at /usr/lib/perl5/site_perl/5.8.0/Asterisk/Manager.pm line 267, line 7. Use of unitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.0/Asterisk/Manager.pm line242, line 7. Use of unitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.0/Asterisk/Manager.pm line242, line 7. Use of unitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.0/Asterisk/Manager.pm line242, line 7. ----- Original Message ----- From: "James Golovich" To: Sent: Tuesday, December 23, 2003 7:41 PM Subject: Re: database_get method > I suspect your running into a common problem, that I intend to modify > Asterisk::AGI to overcome at some point. > > If you don't do $AGI->ReadParse(); when the AGI starts up then the AGI > won't work as expected > > James > > On Tue, 23 Dec 2003, Muhammad Nasim wrote: > > > Thanks > > > > Here is the code > > > > #!/usr/bin/perl > > > > use Asterisk::AGI; > > $AGI = new Asterisk::AGI; > > > > $simcalls = $AGI->database_get('testfamily', 'testvar'); > > > > print "VERBOSE \"The value of simcalls is $simcalls \" \n"; > > > > > > . > > . > > . > > . > > . > > exit; > > > > > > The verbose line prints $simcalls as empty. > > > > Thanks > > > > > > > > > > > > ----- Original Message ----- > > From: "James Golovich" > > To: "Muhammad Nasim" > > Cc: > > Sent: Tuesday, December 23, 2003 7:28 PM > > Subject: Re: database_get method > > > > > > > If you include the code that you are trying to use, I'll see if I can > > > reproduce the problem. database_get has always worked for me in the past > > > when I've used it. It's always possible that something in asterisk has > > > changed. > > > > > > James > > > > > > On Tue, 23 Dec 2003, Muhammad Nasim wrote: > > > > > > > > > > > > > > > > > > > Does anyone know of any problems with the > > > > > > > > database_get > > > > > > > > method. It returns nothing, even when the same request at the CLI > > works fine as does the same request from the Manager interface. Does anyone > > know if its still supported? > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: asterisk-perl-unsubscribe@lists.gnuinter.net > For additional commands, e-mail: asterisk-perl-help@lists.gnuinter.net > From muhammad@telappliant.com Mon Jan 12 18:29:28 2004 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 676 invoked from network); 12 Jan 2004 18:29:27 -0000 Received: from unknown (HELO tel01.dyndns.org) (62.3.220.66) by 3639243841.mi.dial.hexcom.net with SMTP; 12 Jan 2004 18:29:27 -0000 Received: from telmon (telmon [192.168.254.192]) by tel01.dyndns.org (8.12.8/8.12.8) with SMTP id i0CISbLo007772 for ; Mon, 12 Jan 2004 18:28:38 GMT Message-ID: <075701c3d93a$61f93b40$c0fea8c0@telmon> From: "Muhammad Nasim" To: References: Subject: AGI->get_variable Date: Mon, 12 Jan 2004 18:32:06 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 What am I doing wrong down here? The $stat variable isn't being populated for some reason. use Asterisk::AGI; $AGI = new Asterisk::AGI; $AGI->ReadParse; $AGI->set_variable("STATUS","authorized"); $stat = $AGI->get_variable("STATUS"); $AGI->verbose("The stat is $stat \n"); From dmynatt@mortgagemfsi.com Tue Jan 13 00:53:45 2004 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 1686 invoked from network); 13 Jan 2004 00:53:45 -0000 Received: from 66-243-30-161.focaldata.net (HELO mail.integrityintegration.net) (66.243.30.161) by 3639243841.mi.dial.hexcom.net with SMTP; 13 Jan 2004 00:53:45 -0000 Received: from Laptop ([66.69.216.179]) by mail.integrityintegration.net (Merak 6.2.1) with ASMTP id GNA74373; Mon, 12 Jan 2004 18:53:45 -0600 From: "David Mynatt" To: "'James Golovich'" , Subject: Home Setup Date: Mon, 12 Jan 2004 18:53:40 -0600 Message-ID: <002401c3d96f$afe714a0$b3d84542@Laptop> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01C3D93D.654CA4A0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <017b01c3d69c$31f3cf50$c0fea8c0@telmon> ------=_NextPart_000_0025_01C3D93D.654CA4A0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Howdy- I'm a hobbyist, just doing this for myself, really, and I'm interested in installing Asterisk on my home Linux box. I see how it could be sorta neat for a home -I know its way too big given its potential, but it's neat stuff- and I just wanna be sure I'm doing things right before inadvertently blow my box up. I know these are simple and basic questions, and maybe, to keep from answering my kind of questions, you could put a special page up, called 'Asterisk for Dummies'! Anyway, _____ I'm confused about how I would get a phone number that people would use to call me from the local community and not using the Internet. Is that my commercial line that I have now, and Asterisk is device/software that allows that call to be routed over the 'net to another number in another community far away? In other words, is this a replacement for long distance charges by using IP, and also doubles as a local office PBX? What number does an Internet person use to connect to me? Does this system allow me to build a NetMeeting (?) or look-a-like server for chat, video, and whiteboard? What device would I need to tie my commercial phone line into the system? Would I need a separate device for my 3 house phones? Can Asterisk use my Time Warner Road Runner Internet access? Do I need a special driver, or just the regular NIC? _____ I know these are dumb, and I've read the FAQs and been looking in on the mailing list, but I appreciate your help. I also understand you're probably very busy; I just hate to look tooooo stoopid on the MailList. Thanks, Dave Austin, Texas, USA ------=_NextPart_000_0025_01C3D93D.654CA4A0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message

Howdy-

I'm a hobbyist, just doing this for = myself,=20 really, and I'm interested in installing Asterisk on my home Linux = box.  I=20 see how it could be sorta neat for a home -I know its way too big given = its=20 potential, but it's neat stuff- and I just wanna be sure I'm doing = things right=20 before inadvertently blow my box up.

I know these are simple and = basic=20 questions, and maybe, to keep from answering my kind of questions, you = could put=20 a special page up, called 'Asterisk for Dummies'!  = Anyway,


I'm confused about how I would get a phone number that people would = use to=20 call me from the local community and not using the Internet.  Is = that my=20 commercial line that I have now, and Asterisk is device/software that = allows=20 that call to be routed over the 'net to another number in another = community far=20 away?  In other words, is this a replacement for long distance = charges by=20 using IP, and also doubles as a local office PBX?

What number = does an=20 Internet person use to connect to me? 

Does this system allow me to build a NetMeeting (?) or look-a-like = server for=20 chat, video, and whiteboard? 

What device would I need to = tie my=20 commercial phone line into the system?  Would I need a separate = device for=20 my 3 house phones?

Can Asterisk use my Time Warner Road Runner = Internet=20 access?  Do I need a special driver, or just the regular NIC?



I know these = are dumb, and=20 I've read the FAQs and been looking in on the mailing list, but I =20 appreciate your help.  I also understand you're probably very = busy; I=20 just hate to look tooooo stoopid on the=20 MailList.

Thanks,

Dave
Austin, Texas, USA
=20

------=_NextPart_000_0025_01C3D93D.654CA4A0-- From chris@base2technology.com Tue Jan 13 17:03:00 2004 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 4469 invoked from network); 13 Jan 2004 17:03:00 -0000 Received: from unknown (HELO bean.base2technology.com) (216.88.131.43) by 3639243841.mi.dial.hexcom.net with SMTP; 13 Jan 2004 17:03:00 -0000 Received: from base2technology.com (ender.base2technology.com [192.168.2.69]) (authenticated bits=0) by bean.base2technology.com (8.12.8/8.12.8) with ESMTP id i0DI1eeX027789 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 13 Jan 2004 11:01:41 -0700 Message-ID: <400423BB.4050003@base2technology.com> Date: Tue, 13 Jan 2004 09:58:35 -0700 From: Chris Hirsch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210 MultiZilla/1.5.0.3o X-Accept-Language: en-us, en MIME-Version: 1.0 To: asterisk-perl@lists.gnuinter.net Subject: Re: Home Setup References: <002401c3d96f$afe714a0$b3d84542@Laptop> In-Reply-To: <002401c3d96f$afe714a0$b3d84542@Laptop> Content-Type: multipart/alternative; boundary="------------040205020701030301090203" --------------040205020701030301090203 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David Mynatt wrote: > Howdy- > > I'm a hobbyist, just doing this for myself, really, and I'm interested > in installing Asterisk on my home Linux box. I see how it could be > sorta neat for a home -I know its way too big given its potential, but > it's neat stuff- and I just wanna be sure I'm doing things right > before inadvertently blow my box up. > Are you kidding? Asterisk is perfect for the home..just like Linux..it scales from small to very large...be sure to check out http://misterhouse.net for some very interesting ways of using Asterisk to do home automation and be sure to see what Jason Sharpee has done. There is a web interface to display CID and announce calls coming from Asterisk via Misterhouse. I'm actually only a few steps ahead of you so feel free to ask me any questions and I can see if I can help you out and offload the task from more experienced people Chris -- Actual label instruction on Boot's Children's Cough Medicine: Do not drive car or operate machinery. http://ccicolorado.org Exceptional Dogs for Exceptional People - Help Out Today! --------------040205020701030301090203 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit David Mynatt wrote:
Message

Howdy-

I'm a hobbyist, just doing this for myself, really, and I'm interested in installing Asterisk on my home Linux box.  I see how it could be sorta neat for a home -I know its way too big given its potential, but it's neat stuff- and I just wanna be sure I'm doing things right before inadvertently blow my box up.

Are you kidding? Asterisk is perfect for the home..just like Linux..it scales from small to very large...be sure to check out http://misterhouse.net for some very interesting ways of using Asterisk to do home automation and be sure to see what Jason Sharpee has done. There is a web interface to display CID and announce calls coming from Asterisk via Misterhouse.


I'm actually only a few steps ahead of you so feel free to ask me any questions and I can see if I can help you out and offload the task from more experienced people

Chris

-- 
Actual label instruction on Boot's Children's Cough Medicine: Do not drive 
car or operate machinery.


http://ccicolorado.org
Exceptional Dogs for Exceptional People - Help Out Today!

--------------040205020701030301090203-- From dmynatt@mortgagemfsi.com Tue Jan 13 19:56:31 2004 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 4941 invoked from network); 13 Jan 2004 19:56:31 -0000 Received: from 66-243-30-161.focaldata.net (HELO mail.integrityintegration.net) (66.243.30.161) by 3639243841.mi.dial.hexcom.net with SMTP; 13 Jan 2004 19:56:31 -0000 Received: from Laptop ([24.153.224.246]) by mail.integrityintegration.net (Merak 6.2.1) with ASMTP id GNA74373; Tue, 13 Jan 2004 13:56:30 -0600 From: "David Mynatt" To: "'Chris Hirsch'" , Subject: RE: Home Setup Date: Tue, 13 Jan 2004 13:56:16 -0600 Message-ID: <000001c3da0f$4e621040$aa02a8c0@Laptop> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C3D9DD.03C926E0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal In-Reply-To: <400423BB.4050003@base2technology.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 ------=_NextPart_000_0001_01C3D9DD.03C926E0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Chris- Thanks for allowing me to feel not so dumb. With all the high level stuff on this list, it seems like a bad pl;ace to ask basic questions. I went to look at misterhouse and will try download. I'm looking forward to this. BTW, do you use cable access the net? I use Road Runner; any problems? What would you suggest as a black box so that I can use my existing phones in my house? Can I port a POTS line to * ? Dave ===== -----Original Message----- From: Chris Hirsch [mailto:chris@base2technology.com] Sent: Tuesday, January 13, 2004 10:59 AM To: asterisk-perl@lists.gnuinter.net Subject: Re: Home Setup David Mynatt wrote: Howdy- I'm a hobbyist, just doing this for myself, really, and I'm interested in installing Asterisk on my home Linux box. I see how it could be sorta neat for a home -I know its way too big given its potential, but it's neat stuff- and I just wanna be sure I'm doing things right before inadvertently blow my box up. Are you kidding? Asterisk is perfect for the home..just like Linux..it scales from small to very large...be sure to check out http://misterhouse.net for some very interesting ways of using Asterisk to do home automation and be sure to see what Jason Sharpee has done. There is a web interface to display CID and announce calls coming from Asterisk via Misterhouse. I'm actually only a few steps ahead of you so feel free to ask me any questions and I can see if I can help you out and offload the task from more experienced people Chris -- Actual label instruction on Boot's Children's Cough Medicine: Do not drive car or operate machinery. http://ccicolorado.org Exceptional Dogs for Exceptional People - Help Out Today! ------=_NextPart_000_0001_01C3D9DD.03C926E0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
Chris-
Thanks for allowing me to feel not so dumb.  With all the = high level=20 stuff on this list, it seems like a bad pl;ace to ask basic questions. I = went to=20 look at misterhouse and will try download.  I'm looking forward to=20 this.  BTW, do you use cable access the net?  I use Road = Runner; any=20 problems?  What would you suggest as a black box so that I can use = my=20 existing phones in my house?  Can I port a POTS line to *=20 ?
 
Dave
=3D=3D=3D=3D=3D
 
-----Original Message-----
From: Chris Hirsch=20 [mailto:chris@base2technology.com]
Sent: Tuesday, January 13, = 2004=20 10:59 AM
To: = asterisk-perl@lists.gnuinter.net
Subject: Re:=20 Home Setup

David Mynatt wrote:=20

Howdy-

I'm a hobbyist, just doing this for = myself,=20 really, and I'm interested in installing Asterisk on my home Linux = box. =20 I see how it could be sorta neat for a home -I know its way too big = given its=20 potential, but it's neat stuff- and I just wanna be sure I'm doing = things=20 right before inadvertently blow my box = up.

Are you=20 kidding? Asterisk is perfect for the home..just like Linux..it scales = from small=20 to very large...be sure to check out http://misterhouse.net for some very = interesting ways of using Asterisk to do home automation and be sure to = see what=20 Jason Sharpee has done. There is a web interface to display CID and = announce=20 calls coming from Asterisk via Misterhouse.


I'm actually=20 only a few steps ahead of you so feel free to ask me any questions and I = can see=20 if I can help you out and offload the task from more experienced=20 people

Chris

--=20
Actual label instruction on Boot's Children's Cough Medicine: Do not =
drive=20
car or operate machinery.


http://ccicolorado.org
Exceptional Dogs for Exceptional People - Help Out Today!

------=_NextPart_000_0001_01C3D9DD.03C926E0-- From chris@base2technology.com Tue Jan 13 20:41:28 2004 Return-Path: Mailing-List: contact asterisk-perl-help@lists.gnuinter.net; run by ezmlm Delivered-To: mailing list asterisk-perl@lists.gnuinter.net Received: (qmail 5128 invoked from network); 13 Jan 2004 20:41:28 -0000 Received: from unknown (HELO bean.base2technology.com) (216.88.131.43) by 3639243841.mi.dial.hexcom.net with SMTP; 13 Jan 2004 20:41:28 -0000 Received: from base2technology.com (ender.base2technology.com [192.168.2.69]) (authenticated bits=0) by bean.base2technology.com (8.12.8/8.12.8) with ESMTP id i0DLeMeX028874 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 13 Jan 2004 14:40:23 -0700 Message-ID: <40045533.6040200@base2technology.com> Date: Tue, 13 Jan 2004 13:29:39 -0700 From: Chris Hirsch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210 MultiZilla/1.5.0.3o X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Mynatt CC: asterisk-perl@lists.gnuinter.net Subject: Re: Home Setup References: <000001c3da0f$4e621040$aa02a8c0@Laptop> In-Reply-To: <000001c3da0f$4e621040$aa02a8c0@Laptop> Content-Type: multipart/alternative; boundary="------------010901080302050001000406" --------------010901080302050001000406 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David Mynatt wrote: > Chris- > Thanks for allowing me to feel not so dumb. With all the high level > stuff on this list, it seems like a bad pl;ace to ask basic questions. > I went to look at misterhouse and will try download. I'm looking > forward to this. BTW, do you use cable access the net? I use Road > Runner; any problems? What would you suggest as a black box so that I > can use my existing phones in my house? Can I port a POTS line to * ? My net acess is actually a 640/348 wireless connection but cable shouldn't be any different. The only problem with almost all cable providers is their Terms of Service (TOS) and what you can actually do with your net connection and that almost always means that you can't "host any services" so inbound voip connections may be hard to accomplish but there are always ways around it. If you want to use Asterisk and your existing analog phone lines you need to get an FXS card that is available at Digium (the company who sponsors Asterisk). If you want to plug your computer into your POTS line you need an FXO card. Assuming you want to do both the best deal is for you to pick up the developers kit at http://digium.com/index.php?menu=developerskit_tdm that will let you plug into the POTS line and you can plug in your analog phones (assuming you re-wire so they all go into the FXS port). Since this is off topic of the Asterisk-perl mail me off list if you want any further info. There is also a good document on how to setup an asterisk server at the Digium web site. Chris -- The weather is here, I wish you were beautiful. http://ccicolorado.org Exceptional Dogs for Exceptional People - Help Out To