Displaying 20 results from an estimated 5000 matches similar to: "Two problems with the Perl AGI"
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
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
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
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
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 .
2007 Aug 28
1
deadagi and billsec or answeredtime
Hello,
I want to create php rate script and I'm using Deadagi. But I allways get
billsec 0 , or nothing. Can you help me to solve this problem...
My extension.conf:
exten => _123,1,DeadAgi(rate.php)
exten => _123,2,hangup
And my simple test php script rate.php
#!/usr/local/bin/php -q
<?php
include_once (dirname(__FILE__)."/phpagi.php");
$AGI = new AGI();
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
2010 Jul 08
1
AGI get full variable
Dear All,
I have "get full variable" AGI call to get the ANSWEREDTIME channel
variable. I have originated the call to one extension, once answered I have
called DeadAGI to control the call.
I have problem that after hangup the call AGI "GET FULL VARIABLE" returns
-1 for ANSWEREDTIME channel variable.
What is the problem? Where I made wrong. Please suggest me..
2009 Aug 25
1
How to detect if the call is being answered by Voice Mail?
Hi,
I am pretty new to Asterisk. I am trying to make sure some human being
answers the phone not the voice mail machine. How can I programmatically
identify that?
Here is my Sub:
sub DialPhysician {
my ($self, $con, $PhysicianPhone, $call_id, $conv_id) = (@_);
to_log($self, "Inside Dial Physician", 2);
my $DocPhone = "1".
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 =
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
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();
2006 Nov 12
0
Trixbox dialout problems
Hello All.
I am trying to use RAGI the ruby agi framework with trixbox. I am
having a problem
with the dialout part. The RAGI framework creates a file in the
/var/spool/asterisk/outgoing directory and routes the call to an
extension (I have listed the relevent portion of the file below). The
problem is that the initial dial command does not execute properly in
trixbox. I am hoping somebody who
2008 Aug 21
3
After Dial execution, using DIALEDTIME, ANSWEREDTIME
Hi,
I noticed that when dial terminates it does not return to the dialplan,
and therefore can not execute any entry after Dial().
Is there any trick to overcome this limitation ?
How I am supposed to handle the returned vales DIALEDTIME, ANSWEREDTIME if
I can not execute anything after Dial()?
I made a workaround with DeadAGI (below) but it is unreliable: if 2 calls
end
2009 Aug 17
0
Call back DIALSTATUS is empty
Hi,
Here is my problem. I am trying to get the Status of the call if the user
picked up the phone or not. It is coming as empty. Please help.
Here is my extensions_additional.conf file code:
[multi-dir-callback]
include => multi-dir-callback-custom
exten => _X.,1,Answer
exten => _X.,n,Playback(beep)
exten =>
2005 Aug 10
1
Help with calling Perl AGI interface
I have installed the Perl library from
http://asterisk.gnuinter.net/asterisk-perl and am wondering how I
reference agi-test.agi from extensions.conf
I have added
exten => s,1,AGI,agi-test.agi
but that doesn't seem to do it.
Is there a certain directory .agi files should be, is that the problem?
TYIA
Dan
2006 Jun 20
1
AGI: Dial and Recording my own CDR
Hi folks --
I have a FastAGI Perl script running, handling calls. It works great.
At one point I have a Dial() command. If the called party hangs up, Dial()
returns 0, and when I call my own recordCdr() function using the channel
variables ANSWEREDTIME, DIALEDTIME and DIALSTATUS, everything is fine.
However, if the called party picks up, and then the dialing party hangs up
Dial() returns -1,
2009 Jan 16
0
No subject
Dialing out
If the AGI application dials outward by executing Dial, control over
the call returns to the dialplan and the script loses contact with the
Asterisk server. The script continues to run in the background by
itself and is free to clean up and do post-dial processing.
If you want your application to initiate a call out without being
started through the dialplan:
* Asterisk auto-dial
2009 Jan 16
0
No subject
Dialing out
If the AGI application dials outward by executing Dial, control over
the call returns to the dialplan and the script loses contact with the
Asterisk server. The script continues to run in the background by
itself and is free to clean up and do post-dial processing.
If you want your application to initiate a call out without being
started through the dialplan:
* Asterisk auto-dial
2007 Dec 08
0
Asterisk CDR Variable
Hi all,
I was coding for Callback application in Perl. I have small question to get the variable name of duration.
I seen in CDR table of mysql there is two filed one is duration and second is billsec the billsec value variable is $AGI->get_variable('ANSWEREDTIME') But could you guys tell me the variable name of "duration" field.
In this way i want to capture when the first