[asterisk-users] Trunk issue

Haley,Scott A scott.haley at edwardjones.com
Mon Apr 28 12:33:53 CDT 2014


One more thing. I have this exact same script working on an Asterisk 1.8 box. This is a new Asterisk 11.7 box.

Thanks,
Scott Haley
5-2244


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Haley,Scott A
Sent: Monday, April 28, 2014 12:32 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Trunk issue

Here is the directory listing:

[root at nxdasterisk-3 agi-bin]# ls -al
total 12
drwxr-xr-x.  2 asterisk asterisk 4096 Apr 28 12:11 .
drwxr-xr-x. 12 asterisk asterisk 4096 Apr 28 12:26 ..
-rwxrwxr-x.  1 asterisk asterisk  590 Apr 28 11:55 tbsdial.agi

Thanks,
Scott Haley
5-2244


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Eric Wieling
Sent: Monday, April 28, 2014 12:25 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Trunk issue


Odd.  AGI scripts should hang waiting for input when run from the CLI.  They should not output anything.  If the script is not set as executable you'd get an error.

If you were not running it as the same user as asterisk runs as you should still get a different error.


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Haley,Scott A
Sent: Monday, April 28, 2014 1:13 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Trunk issue

It runs but hangs with the output of:
perl tbsdial.agi 81101
GET VARIABLE astexten


Right now, it is a simple perl script. Here is the entire script.

#!/usr/bin/perl


use Asterisk::AGI;

my $agi = new Asterisk::AGI;

my $dialgroup1 = "DIALGROUP1";
my $dialgroup2 = "DIALGROUP2";
my $vmvariable = "VM";
my $timer = "TIMER";
my $branch = "BRANCH";
my $input;
my $dg1value;
my $dg2value;
my $vmvalue;
my $branchvalue;



$input = $agi->get_variable("astexten");

#$agi->answer();
#$agi->stream_file("welcome");






$agi->set_variable($dialgroup1, "$dg1value"); $agi->set_variable($dialgroup2, "$dg2value"); $agi->set_variable($vmvariable, "$vmvalue"); $agi->set_variable($timer, "$timervalue"); $agi->set_variable($branch, "$branchvalue");

Thanks,
Scott Haley
5-2244





If you are not the intended recipient of this message (including attachments), or if you have received this message in error, immediately notify us and delete it and any attachments.

If you do not wish to receive any email messages from us, excluding administrative communications, please email this request to messages at edwardjones.com along with the email address you wish to unsubscribe.

For important additional information related to this email, visit www.edwardjones.com/US_email_disclosure. Edward D. Jones & Co., L.P. d/b/a Edward Jones, 12555 Manchester Road, St. Louis, MO 63131 © Edward Jones. All rights reserved.




-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Eric Wieling
Sent: Monday, April 28, 2014 12:07 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Trunk issue

Does the script generate an error when run outside of Asterisk?   An AGI should simply wait for input when run outside of Asterisk.


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Haley,Scott A
Sent: Monday, April 28, 2014 1:04 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Trunk issue

I am trying to run an agi script and asterisk is not finding it. The output of the cli is as follows:

-- Executing [s at tbs-utils:7] AGI("SIP/7002-0000001a", "tbsdial.agi") in new stack [Apr 28 12:00:05] WARNING[21812][C-0000000f]: res_agi.c:1681 launch_script: Failed to execute '/var/lib/asterisk/agi-bin/tbsdial.agi': File does not exist.

The file is in that directory and is owned by the user "asterisk". Why does it say the file does not exist?
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


More information about the asterisk-users mailing list