similar to: Using AGI, how do you clear a variable?

Displaying 20 results from an estimated 200000 matches similar to: "Using AGI, how do you clear a variable?"

2009 Sep 02
0
problem with agi script not getting variable
I am learning agi scripting using php. I m using phpagi 2.x on asterisk 1.2. I hve written a simple script that reads out the callerid using flite. My problem is that I seems the script is not getting the callerID. Bellow is the script _________________ #!/usr/bin/php -q <?php /** * @package phpAGI_examples * @version 2.0 */ set_time_limit(30);
2004 Sep 17
1
AGI Python Clear or Channel Failure?
Hi All, When I call the stream_file function all goes well if the user doesn't clear the call. But if I do clear the call (on the handset for example), I get the following exception: -- Channel 0/31, span 1 got hangup RESULT_LINE: 200 result=-1 endpos=28000 == Spawn extension (default, 600006, 1) exited non-zero on 'Zap/31-1'
2007 Jun 15
2
combining AGI with dialplans
On 2007-05-15 Tony Mountifield wrote (wrt using AGI scripts to dial out): > Can't comment on this one, as I never use AGI to dial. > My AGIs just set the context, extension and priority, > and exit to the dialplan to do any dialling. (http://article.gmane.org/gmane.comp.telephony.pbx.asterisk.user/185537) I would like to do this, but I am having trouble figuring out how. I have
2007 Mar 01
2
How can I use the "GET VARIABLE variablename" in AGI
Hi,All, I wang to use AGI in asterisk1.4. AGI file / myperl.agi #!/usr/bin/perl use strict; ...... print STDERR "7. Testing GET VARIABLE..."; print "GET VARIABLE EXTEN \"\"\n"; my $result = <STDIN>; &checkresult($result); ...... when the agi execute; asterisk conosle show that : AGI Rx << GET VARIABLE EXTEN "" AGI Tx >>
2019 Dec 27
2
AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
Just trying out a node agi package (https://github.com/sergey12313/ts-agi/ , and it wasn't behaving as I expected, but when turning on agi debug, it looks like it might be Asterisk (using 17.1.0) This works as expected <Local/1000 at default-00000020;2>AGI Rx << SET VARIABLE myVar "Hello World!!!" <Local/1000 at default-00000020;2>AGI Tx >> 200 result=1
2003 Oct 13
1
AGI solution to Grandstream BT102 call waiting problem
I'm trying to fix a problem with the GrandStream Budgetone 102. I've been reading the source code, mailing lists and other resources. Here's the scenario and the approach I have been pursuing. I'm having some problems with the AGI calls and I hope someone can give me some clarification. PSTN <---> T1,PRI * <---> Grandstream BT 102 (12)
2019 Dec 27
1
AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
OK, that works - looks like a documentation bug? (Also very confusing!) Should I report it on the page at https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+AGICommand_get+full+variable or on the main tracker? Many thanks - couldn't figure out what was wrong! On Fri, 27 Dec 2019 at 19:36, Sean Bright <sean.bright at gmail.com> wrote: > On 12/27/2019 2:24 PM, Jonathan H wrote:
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: > >
2014 Oct 05
1
Setting channel musicclass from AGI
Hi, Since SetMusicOnHold() is being deprecated, how do we set the channel musicclass from an AGI script? Last time I checked you can't call dialplan functions from AGI. Thanks. -- James -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20141005/03df3f3b/attachment.html>
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 =
2010 Nov 20
0
AGI CDR Update (with set variable) problem.
hello, First of all i am using Asterisk 1.6.2.9-2 The following problem seem like a bug to me but im not sure. Any help or comment will be great.. We are trying to implement our own billing software with AGI - Php Scripts. When a hangup received, i am calling a script to calculate the bill and we are trying to write the results to cdr database. We added two fileds to cdr table as rate
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 Sep 10
1
Help with dialparties.agi
Hellos, I have asterisk 1.2 and freepbx 2.3. I have edited the agi script(dialparties.agi). Everytime I restart asterisk, the file gets overwritten. How do I make sure my changes are not overwritten? What generates dialparties.agi? Thanks -- Best Regards, James Mutuku Ndeti Agile Systems Limited +254722490994 www.agile.co.ke mutuku.wordpress.com Has your organization implemented a customer
2019 Dec 27
0
AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
On 12/27/2019 2:24 PM, Jonathan H wrote: > <Local/1000 at default-0000001f;2>AGI Rx << SET VARIABLE myVar "Hello > World!!!" > <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 > <Local/1000 at default-0000001f;2>AGI Rx << GET FULL VARIABLE myVar > <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 (myVar) >
2009 Apr 23
3
AGI PHP script
I have the below script that doesn't seem to be working. I don't know if I have something in the script wrong that I am just missing. Or if I don't have the php.ini set correctly for emailing This is the CLI output -- Executing [4099XXXXXX at port3_real:1] Goto("DAHDI/50-1", "newhire,s,1") in new stack -- Goto (newhire,s,1) -- Executing [s at
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 =
2020 May 13
0
Tip/Question about encoding temporary data for storage in Asterisk variable to use in AGI
I wanted to store a JSON object between agi requests for the duration of a call. Turns out asterisk does NOT like a stringified JSON object! AGI complains of "520-Invalid command syntax" So, I just base64 encode/decode it. Assuming I don't need to manipulate the JSON object within Asterisk itself, and I don't want to use a DB or memcache, is this the best/correct method?
2004 Jun 28
2
AGI->Exec Problem
Hello, I am having some trouble with the Asterisk::AGI perl library. It seems that the AGI->Exec() command is causing me a problem. Here's the line in my AGI code: $AGI->exec('Record',"$vmfile:wav, 30"); I'm trying to record voicemail to the file name stored in $vmfile with a silence timeout of 30. However, this is not being parse by AGI or Asterisk correctly,
2003 Dec 08
3
Strange variable chopping from AGI's
AGI's are resulting in unusual behaviors. Can someone please tell me if this is my inappropriate use of AGI's, inappropriate use of Time::HiRes, or a bug with *: I call this script twice: #!/usr/bin/perl use Time::HiRes qw( gettimeofday ); ($seconds, $microseconds) = gettimeofday; $hirestime = sprintf("%s","$seconds$microseconds"); print "SET VARIABLE
2005 Jun 27
2
Accessing SIP username from AGI script
Hi, I'm writing an AGI script to manage outgoing calls. We need to interrogate a database to work out which line a particular user is allowed to use for outgoing calls. However, I cannot find a way for my AGI script to access the SIP username. Does anyone know if this is possible (even if it is just passing a variable from extensions.conf to the script)? Thanks in advance, David