Displaying 20 results from an estimated 9000 matches similar to: "Passing call duration to an AGI Script"
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
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
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..
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,
2007 Aug 13
1
AGI answering the channel even though I never asked it to
I am working on a call-back solution where the initiating call should
never be answered.
I was doing this simply through the dial plan, sending a progress
tone, and then dumping the channel, and firing off a DeadAGI which
created a call file to make the callback.
Now I've tried extending this so that an AGI is fired first to check
for things - like no inbound ANI - and play a
2008 Jan 08
4
Bugs??
Good Day All,
I am facing a serious problem since I started to use asterisk. I don?t know if it is a bug or some one already solved this.
Currently I am running 120 VoIP SIP channels on my asterisk server but each day 2, 3 calls got hanged in asterisk, and on asterisk CLI ?show channels? showing us as call UP but in real there is no call.
When asterisk restarted the hanged calls removed from
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 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
2005 Jul 23
2
ASTCC gives me only the time, but no cost
I try to track down an error that causes that Astcc just reports the time, but not the costs.
I could narrow the problem down into this sub routine:
sub calccost() {
my ($adjconn, $adjcost, $answeredtime, $increment) = @_;
eval { my $adjtime = int(($answeredtime + $increment - 1) / $increment) * $increment };
my $cost;
print STDERR "Adjusted time is $adjtime, cost is $adjcost with
2005 Jun 06
2
Variables and status problems in AGI application
I am running a prepaid application with Asterisk. When authentication has to be
done by DTMF everything works fine. However when the user is authenticated
directly from the sip phone, the channel variables seems to disappear.
Trying to retrieve the channel status always returns -1 instead of the 6 that
happens normally. It also seems to affected the DIALSTATUS and ANSWEREDTIME
variables.
The
2007 Feb 20
2
Help! How to get ANSWEREDTIME after DIAL a ZAP channel?
Dear all,
I tried to make a call with extensions.conf.
exten=> _00[1-9].,1,Dial(zap/g1/${EXTEN})
exten=> _00[1-9].,2,NoOP(ANSWEREDTIME=${ANSWEREDTIME})
exten=> _00[1-9].,102,Hangup
But the 2 and 102 will not be executed.
So I can get the correct answered time via 2.
Is any idea about it?
Is it the problem of my ZAP channel's configuration?
My zapata.conf is as below:
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();
2012 Mar 08
1
Using the h and DeadAGI
Hi All;
Really I need to know why when using the "h" in the exten =>, then we use DeaAGI with it?
I am using vicidial and I see this line alot, so I need to know how it work (when it will be executed):
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
The question is:
When
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 =
2017 Dec 26
4
Answered time on channel
Hi,
I have a dial plan where I need to notify an external system when a call
was answered and when the call hung up. In both requests the start time
needs to be the same. My Dialplan looks something like this:
[outbound]
Exten => _X.,1,Dial(SIP/${EXTEN}@1.1.1.1,,U(call-answer-from-carrier))
Exten => h,1,NoOp(ANSWERED_TIME: ${ANSWEREDTIME} >>> DIAL_TIME:
${DIALEDTIME}
2009 Mar 09
3
problem with an agi in PHP
Hello,
I need to execute an agi in php.
I have that:
== Using SIP RTP CoS mark 5
-- Executing [0170725000 at mnupprx1:1] Answer("SIP/33179977999-b6c18478",
"") in new stack
-- Executing [0170725000 at mnupprx1:2] GotoIf("SIP/33179977999-b6c18478",
"0?6:3)") in new stack
-- Goto (mnupprx1,0170725000,3)
-- Executing
2006 Feb 27
8
AGI Scripts Terminate too Soon
Ok, here's a weird one.
I have an AGI script where one user calls another. The call is answered. Everything is peachy. If the call is terminated by the CALLEE hanging up the call, then Asterisk returns control back to where the Dial() command left off, and I can check the return code of Dial(), ${DIALSTATUS} etc. That's all great.
HOWEVER, if the CALLER hangs up the call, it seems as if
2007 May 14
3
Proper AGI use with MySQL
Hi,
We have a "simple" AGI script that provides some IVR functionality. It connects to a MySQL database in order to create a call record and capture IVR data.
During the IVR process, we need to store the time the call started, so basically we INSERT a new MySQL row with callstart = NOW(), uniqueid = AGI(agi_uniqueid). As the user selects different options, we update the row to reflect
2007 Sep 15
2
AGI/PHP: missing arguments
hi folks,
I've built a simple PHP-script utilizing the AGI-interface. in
extensions.conf I trigger the script and pass a single value as first
argument:
exten => h,1,DeadAGI(process.php|${Enter})
On the Asterisk-console, I can actually see that the script is called
correctly (something like "DeadAGI(process.php|1234)"). However, when I read
stdin in the PHP script, I receive
2011 Apr 09
1
Is it the normal behaviore for AGI and DeadAGI to terminate AFTER the "h" extension?
Hi Everyone,
Trying to run a php script after DeadAGI for A2Billing does it's magic. This
is the dialplan:
[a2billing]
exten => _X.,1,System(php pre-call.php ${CALLERID(num)} ${EXTEN}
${UNIQUEID})
exten => _X.,n,AGI(a2billing.php,1)
exten => _X.,n,Hangup()
*exten => h,1,Wait(5)*
*exten => h,n,System(php post-call.php ${CALLERID(num)} ${UNIQUEID})*
As you can see above, I even