search for: get_vari

Displaying 20 results from an estimated 58 matches for "get_vari".

Did you mean: get_var
2006 Mar 20
4
simple perl-agi - where's the error?
Hello! I'm trying to setup a perl-deadagi, but my perl skills lack. can someone tell me why the following code doesn't work: #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; $dialstring = $AGI->get_variable("DIALSTRING"); $res = $AGI->exec("DIAL $dialstring"); the asterisk output says: AGI Rx << GET VARIABLE DIALSTRING AGI Tx >> 200 result=1 (089324154332) AGI Rx << EXEC DIAL "" -- AGI Script Executing Application: (DIAL) Options: () Mar 2...
2011 Mar 05
2
Help Asterisk / API / Perl
...; _X.,3,AGI(My-Script.agi) The perl agi file are started without problems but i want get into this script a lot of variable: Type (SIP or IAX) src (from cdr) but that's don't work: use Asterisk::AGI; use lib "/var/lib/asterisk/agi-bin"; $AGI = new Asterisk::AGI; $typ = $AGI->get_variable('agi_type'); $typ don't have SIP or IAX, same test without succes: $typ = $AGI->get_variable('type'); anyone know this problems ? thanks Olivier
2005 Oct 17
1
astcc missing to bill random calls?
...gories of users (functions to get the user type, get the routes and trunks tables for the user category before trytrunk), as well as some 'print SDTERR' statements, in order to trace any problems during execution. Could this be the problem, I noticed that there were reports on the list that get_variable has issues with extensive $agi->verbose callings. I had a problem with get_variable not catching answeredtime once before, and solved these by adding an additional agi->get_variable statement just underneath the first one. Here's how the calls is logged in the csv file: "",...
2012 Feb 11
1
Asterisk perl AGI confusing variables
Hello all, I'm struck with a very strange problem today. I've an AGI with some code subroutine snippet as follows: sub enable_sbc($) { my $carrier = shift; my $tmp = substr($carrier,1); my $jkh = $tmp; $server_port = $ast_agi->get_variable("SIPPEER($jkh,port)"); $ser_ip = $ast_agi->get_variable("SIPPEER($tmp,ip)"); $ast_agi->exec("SIPAddHeader","P-PORT: $server_port"); $ast_agi->exec("SIPAddHeader","P-IPADDRESS: $ser_ip"); return...
2006 May 23
3
AGI ?
Hi All, I have been attempting to get an AGI LCRdialout script to work. Basically what I need to have happen is when someone dials out a number the script check to see if it is local if so, go out the ZAP channel. If the ZAP channel is busy, go out the IAX channels, if IAX is all busy, go out the SIP channels. Here is a sample of what I have in my script. #!/usr/bin/perl use strict; use
2005 May 30
0
perl agi : get_variable problem
Hi, I'm developping some AGI in perl (5.8.6) on i386 using Asterisk 1.0.5. I want to get some variables such as DIALSTATUS and ANSWEREDTIME after a $AGI->exec("Dial", "dial_string"); but here is what i get actually: DIALSTATUS= DIALEDTIME=ANSWER ANSWEREDTIME=18 I searched the archives and saw that $AGI->verbose could mess the access to variables, but I don't use
2005 Oct 07
1
ASTCC -- semantic note of 'callstart' in cdrs?
...n of the cdrs table should really be called 'callend': $dialstr = "IAX2/$res->{path}/$phone|30|HL(" . ($maxtime * 60 * 1000) . ":60000:30000)"; $res = $AGI->exec("DIAL $dialstr"); $answeredtime = $AGI->get_variable("ANSWEREDTIME"); $dialstatus = $AGI->get_variable("DIALSTATUS"); $callstart = localtime(); return $dialstatus; No? Eric.
2007 Sep 17
1
Problem with asterisk-perl-0.08 and Asterisk >= 1.2.20
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I've been using for a long time asterisk-perl-0.08 for prepaid card applications, and I've identified a problem with the last releases of asterisk-1.2, installed with Trixbox. The command get_variable() raises a signal SIGPIPE when it is called (whatever the variable to get). I made tests with Asterisk 1.2.20, 1.2.21 and 1.2.22, and I noticed the same issue. But I've never noticed that with Asterisk 1.2.14 that I've installed on many customers' servers, and I've got also anot...
2009 Apr 08
1
Perl AGI
...GI Environment Dump:", 3); my $micho = $input{9}; $AGI->verbose("my dialed no is :$micho"); foreach my $i (sort keys %input) { $AGI->verbose(" -- $i = $input{$i}", 3); } ################## #To get the asterisk dial no whihc is 112 in our case my $no=$AGI->get_variable ('extnum'); *my $dest=$AGI->get_variable ('extension');* $AGI->verbose("my dialed no is :$no"); $AGI->verbose("my dialed no is :$dest"); When the script run I got: dial.pl: my dialed no is : Can you please help me to fix this issue? Regards ------...
2009 May 12
1
enum agi interesting problem
...enum (@enums) { $dialstring = $enum . "|90|HL(" . ($maxtime * 60 * 1000) . ":60000:30000)"; $res = $AGI->exec("DIAL $dialstring"); $answeredtime = $AGI->get_variable("ANSWEREDTIME"); $dialstatus = $AGI->get_variable("DIALSTATUS"); print LOGFILE "Dialstring: $dialstr DIALSTATUS: $dialstatus\n";...
2020 Jan 24
4
Perl AGI: read variable with quotes
Hi Gang I have stumbled of this problem. I need the P-Asserted-Identity header in an AGI scrip. In the Dial-Plan I do: same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)}) In the AGI I do: my $pai = $AGI->get_variable(PAI); This works fine, unless the PAI contains quotes: P-Asserted-Identity: <sip:1000 at 1.2.3.4:5060;user=phone> I get "<sip:1000 at 1.2.3.4:5060;user=phone>" in the variable $pai. P-Asserted-Identity: "John Doe" <sip:2000 at 1.2.3.4:5060;user=phone>...
2009 Sep 26
1
mboost_1.1-3 blackboost_fit (PR#13972)
Full_Name: Ivan the Terrible Version: 2.9.2 OS: Windows XP SP3 Submission from: (NULL) (89.110.13.151) When using the method blackboost_fit of the package mboost appear following error : Error in party:::get_variables(obj at responses) : trying to get slot "responses" from an object (class "boost_data") that is not an S4 object Simple test case that produce bug: dt=expand.grid(y=c(2,3,4), x1=c(1,2), x2=c(1,2)) library(mboost) bd=boost_dpp(y ~ .,data=dt, weights = NULL) blackboost_fi...
2003 Aug 13
3
h extension seems to wipe variables?
...hough the script executes, it isn't retrieving variables from the AGI interface. Looking closer, I realised the variables are actually getting unset before the h extension is reached. [foo] s,1,SetVar,foo=bar s,2,Play(audio/a-long-prompt) h,1,AGI(log-call-duration.pl) When I do an $agi->get_variable("foo") from the perl, I get the string "noresponse" returned. This all works fine if I don't call the AGI from the hangup extension, but from a normal one instead. Does anyone have any idea how I might fix or work around this? It's important for us to log call d...
2004 Dec 28
0
Two problems with the Perl AGI
....3 running on a Gentoo box and I installed Perl AGi from http://asterisk.gnuinter.net/files/asterisk-perl-0.08.tar.gz. When I write this : >#!/usr/bin/perl >use Asterisk::AGI; >my $AGI = new Asterisk::AGI; >$AGI->exec ('Dial SIP/kphone1|30|tTr'); >my $duration = $AGI->get_variable('ANSWEREDTIME'); >print STDERR "\n duration : $duration\n"; >exit (0); I obtain, on the CLI > *CLI> > duration : before the callee takes the call. I tried this (sorry, it's ugly) : >#!/usr/bin/perl >use Asterisk::AGI; >my $AGI = new Asterisk:...
2010 Aug 07
0
Set outgoing number in filename of the recordings
...terisk recordings Following is what I have done in /var/lib/asterisk/agi-bin/recordingcheck file . . . include("phpagi.php"); /**********************************************************************************************************************/ $agi = new AGI(); $temp = $agi->get_variable("agi_dnid") ; // I have also tried with get_variable("DIAL_NUMBER") if($temp['result'] == 1 ) { $dnid = $temp['data'] ; } else { $dnid = "NUMBER" ; } $timestamp = $argv[1]; $uniqueid = $argv[2]; $type = $agi->get_variable("ARG2");...
2008 Mar 11
2
AGI - calling functions, CHANNEL STATUS broken?
...doesn't seem to work, as indicated by these results: exten => 610,1,NoOp() exten => 610,n,Set(CC_200=${SIPPEER(200:curcalls)}) exten => 610,n,Set(CC_221=${SIPPEER(221:curcalls)}) exten => 610,n,Set(CC_231=${SIPPEER(231:curcalls)}) exten => 610,n,AGI(test.agi) $cc[0] = $AGI->get_variable('CC_200'); $cc[1] = $AGI->get_variable('CC_221'); $cc[2] = $AGI->get_variable('CC_231'); $AGI->verbose("Test using Set(): $cc[0] $cc[1] $cc[2]"); $AGI->verbose("Status of 200: " . $AGI->channel_status('SIP/200')); $AGI->verbo...
2011 Dec 23
1
execute command just after Dial()
Hello, I'm using AGI scripting with asterisk and need to execute certain commands just after Dial(). But once dial command is executed, further commands/instructions are ignored. $agi->exec("Dial","SIP/100"); $dialstatus = $agi -> get_variable("DIALSTATUS"); if($dialstatus[data]=="ANSWER") { do something....... } thanks, Kamlesh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachm...
2010 Jan 11
1
MeetMe Conferencing - Announce your own join/leave to yourself and other conference members
...me.c - line 1817 (the conf_run function) -- snip -- #!/usr/bin/perl -w use strict; use warnings; use lib '/var/lib/asterisk/agi-bin'; use DBI; use Asterisk::AGI; our ($AGI,%v,%ast); $AGI = new Asterisk::AGI; %ast = $AGI->ReadParse(); $v{chan} = $ast{channel}; $v{lang} = $AGI->get_variable('CHANNEL(language)'); $v{conf} = $AGI->get_variable('conference_call'); $v{dbh} = <sanitized> ($v{q},$v{r}) = undef; $v{q} = "SELECT members FROM <sanitized> WHERE confno = '".$v{conf}."'"; $AGI->verbose($v{q}); $v{q} = $v{dbh}-&gt...
2010 Jul 27
2
Urgent help = RUBY & AGI
Here's something that should be easy for RUBY pro's. Here is a script: 1.times do r = $agi.exec('DIAL', SIP/voipuser&Zap/32&Zap/33&Zap/34&Zap/35) r = $agi.get_variable('DIALSTATUS') # $agi.set_variable(' WHOANSWERED ',...) retry if r.message.include?('BUSY') end when it's executed it shows this in the console: AGI Rx &l...
2016 Oct 10
2
AGI: How to break out of AGI when stream_file escape_digits are detected in middle of long sequence of files?
...result=0, the LAST line is a file that was interrupted, and receives result=48 from asterisk. Yes, zero stops the file playing, but it just goes onto the next file. So, how do I get that variable? It doesn't become available in python, and trying to get it via either agi.env[result'] agi.get_variable('result') just makes python choke and the AGI quits. That would be fine if it was a result of result being 48! I feel like I'm going slightly bonkers here because it's something so obvious, and yet I've googled so hard over this! Thanks.