search for: get_variables

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

Did you mean: get_variable
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
2011 Mar 05
2
Help Asterisk / API / Perl
Hi i want use the API on my asterisk 1.6, but i have a small problems : In extension, i start it : exten => _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
2005 Oct 17
1
astcc missing to bill random calls?
Hello list, I just came into a strange problem wth astcc. the trouble is astcc.agi does not bill some calls. The calls are logged in the cdr-csv/Master.csv file, but with a duration of 0, billsec of 0, an empty dstchannel, and with a lastapp field of "hangup". I suppose that astcc.agi was not able to get the answeredime variable from the SIP channel... I have added a few functions to
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)");
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?
Looking at the code, it would appear that the 'callstart' column 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 =
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
2009 Apr 08
1
Perl AGI
Hi all, I have the below peace of my AGI script...the problem here is that I cannot fetch the extension value to inside the script and assign it to another variable...I highlighted it in red #!/usr/bin/perl #use DBD::mysql; use DBI; use DBD::mysql; use Asterisk::AGI; ############################ #To read asterisk variable values. $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse();
2009 May 12
1
enum agi interesting problem
Hi, I am having a strange problem with enum and AGI. Here is what happens: I have in my agi something like that: foreach my $resolver ("e164.arpa", "e164.info", "e164.org") { my @enums = get_enums($phone, $resolver); foreach my $enum (@enums) { $dialstring = $enum .
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
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_fit(bd,...
2003 Aug 13
3
h extension seems to wipe variables?
Hi. I'm trying to do some custom call logging, and I want to call an AGI script from a hangup handler to log call durations and things. Although 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)
2004 Dec 28
0
Two problems with the Perl AGI
Hi, I have a * 1.0.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 :
2010 Aug 07
0
Set outgoing number in filename of the recordings
Hi, Im not able to set the outgoing number in filename for asterisk 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") ;
2008 Mar 11
2
AGI - calling functions, CHANNEL STATUS broken?
Greetings, I am writing an AGI script that needs to check on the idle/busy status of a number of SIP peers (mostly SPA9xx phones, with a few Polycoms and Snoms thrown in for fun). Is it possible to call Asterisk functions (e.g. SIPPEER) from AGI scripts? Based on my Googling, I would guess in the negative. I have tried various permutations of Set() and Eval() without success. I have also
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.......
2010 Jan 11
1
MeetMe Conferencing - Announce your own join/leave to yourself and other conference members
Hi all, I'm trying to get the MeetMe system to take a caller and announce to them they've joined the conference in addition to the other members of the conference assuming previous members of the conference >= 1. I can see where the meetme.c app actually processes it using the ast_pthread_create_background(&conf->announcethread, NULL, announce_thread, conf); function. The
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
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?
For reasons best known to myself, I call a python agi (PYST2 - love it!) which streams a series of very short files in quick succession. Like this: escape_digits = str("0") agi.stream_file(promptFile,escape_digits) and this is what I see on the AGI debug: <Local/s at root-00000061;2>AGI Tx >> 200 result=0 endpos=6784 <Local/s at root-00000061;2>AGI Rx <<