Displaying 20 results from an estimated 20000 matches similar to: "getting variable using agi"
2004 Sep 20
0
Can't Dial using perl.
I'm trying to dial using this script in perl:
(asterisk_dial.pl)
---
#!/usr/bin/perl
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
$pin = $AGI->get_data("beep", "10000", "3");
chomp($pin);
$AGI->exec('SetVar',"NUMERO=$pin");
exit(0);
---
This script sets 'NUMERO' with any value...
In my
2013 Apr 01
0
Getting DIALSTATUS via agi
Hi all,
Hopefully, I just need a second set of eyes on this one, but I just can't
figure out what I'm doing wrong. I'm using an agi script to dial a number,
check the dial result, and act accordingly.
The problem is that I'm not getting anything back from DIALSTATUS, or
HANGUPCAUSE.
Here is the relevant perl code:
===============================================================
2005 May 17
0
Problem with getting the value of variable DIALSTATUS in AGI script
Hello.
???? ????????? ?????? ?? ?????, ??????? ??????, ??? ????????, ?????? ?? ???????????? ?????, ? ????? ????????
+?????????? ? ??????? ??????.
I wrote a small perl script, that just calls to the specified number and then receives the information about
+the status of the call.
This script is below:
#!/usr/bin/perl
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input =
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
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 :
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();
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 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 .
2005 Oct 13
1
AGI Variable problem
Hello all,
I try to use a agi script to get a variable from * und put them into a
script which gives me another variablke and put this in *.
My problem is now it seems the var ID is empty coz i always jump into
the result 0 loop.
The $MSN should be in the SetCIDNum.
#!/usr/bin/php -q
<?php
include("/var/lib/asterisk/agi-bin/phpagi.php");
$agi = new AGI();
$ID =
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
1999 Apr 01
2
Swat password syncronization - HELP
Hi All
I've installed Samba 2.0.3 and coudn't put "unix passowrd sync" to
work.
I set:
passwd program = /usr/bin/passwd %u
passwd chat = *New*password:* %n\n *Re-enter*new*password:*
%n\n*changed.*
passwd chat debug = Yes
unix password sync = Yes
log level = 100
The password page says "The password for 'user' has been changed".
In fact it has been
2004 Dec 10
0
AGI Perl
Hello,
I'm writing a AGI Perl script and use the following lines to initiate a
call :
$res = $AGI->exec("DIAL $dialstr");
And then :
$answeredtime = $AGI->get_variable("ANSWEREDTIME");
The problem is that I need to know immediately when the call has begun.
I can have the call duration & establishment time at the end of the call
but not in real time when it
2020 Jan 24
0
Perl AGI: read variable with quotes
On Fri, 24 Jan 2020, Benoit Panizzon wrote:
> 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:
>
>
2005 Oct 05
2
Sipura SPA-3000 setup in Brazil
All-
I'm attempting to set up a Sipura SPA-3000 in Sao Paolo, Brazil. Not being a
portuguese speaker, I'm having a rough time of finding the relevant
information on how to make the thing pick up the PSTN line and make an
outbound call.
The sipura in question works fine on a bench connected to a POTS line in the
US, but is now plugged in in Sao Paolo. The immediate thing I notice is that
2001 Aug 14
2
oggenc and SMP
Greets,
I'm encoding my favorite Vivaldi Four Seasons CD (my tester files) on
my older dual PII-350 linux machines (it's kinda slow with '-b 160'
but that's alright) and started wondering - mind you, I'm sucky at C -
is it that hard to implement an encoder that uses all the processors
on a SMP computer?
Andre.
--
Arthur Dent: "What's so unpleasant about being
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 30
1
Asterisk::AGI and DIALEDTIME
Hi List,
In one of my AGIs (using DeadAGI) I grab the answered time using:
my $res = $agi->exec ("DIAL $dialstring");
my $answeredtime = $agi->get_variable ("ANSWEREDTIME");
However this information differs from what's written in the Master.csv
file (which happens to be the correct value!)
Any ideas why?
I'm using asterisk 1.2.7.1 and the
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 <<
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
2001 Mar 12
1
Access denied.
Dear users
I got this msg accessing s share:
server:~# smbclient '\\localhost\Adm1' -U gabriela
Added interface ip=192.168.0.254 bcast=192.168.0.255 nmask=255.255.255.0
Password:
Domain=[EQUATORIAL] OS=[Unix] Server=[Samba 2.0.5a]
smb: \> put lixo2
ERRDOS - ERRnoaccess (Access denied.) opening remote file \lixo2
The smb.conf says
[Adm1]
comment = Adm-Financeiro
path