Now I am getting Permission denied.

    -- Executing [4000@phones:1] NoOp("SIP/7001-0000003a", "Starting TBS Dailer 
App") in new stack
    -- Executing [4000@phones:2] NoOp("SIP/7001-0000003a", "4000") in new stack
    -- Executing [4000@phones:3] Gosub("SIP/7001-0000003a", 
"tbs-utils,s,1,(4000)") in new stack
    -- Executing [s@tbs-utils:1] NoOp("SIP/7001-0000003a", "Entering tbs-utils 
for 4000") in new stack
    -- Executing [s@tbs-utils:2] Set("SIP/7001-0000003a", "DIALGROUP1=") in new 
stack
    -- Executing [s@tbs-utils:3] Set("SIP/7001-0000003a", "DIALGROUP2=") in new 
stack
    -- Executing [s@tbs-utils:4] Set("SIP/7001-0000003a", "VM=") in new stack
    -- Executing [s@tbs-utils:5] Set("SIP/7001-0000003a", "TIMER=") in new stack
    -- Executing [s@tbs-utils:6] Set("SIP/7001-0000003a", "BRANCH=") in new 
stack
    -- Executing [s@tbs-utils:7] AGI("SIP/7001-0000003a", "tbsdial.agi") in new 
stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/tbsdial.agi
tbsdial.agi: Failed to execute '/var/lib/asterisk/agi-bin/tbsdial.agi': 
Permission denied

Thanks,
Scott Haley
5-2244

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Asghar Mohammad
Sent: Monday, April 28, 2014 12:42 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Trunk issue

if that is the case then check again Perl Asterisk AGI.

On Mon, Apr 28, 2014 at 7:33 PM, Haley,Scott A 
<scott.ha...@edwardjones.com<mailto:scott.ha...@edwardjones.com>> wrote:
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-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 
[mailto:asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@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@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-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 
[mailto:asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@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-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 
[mailto:asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@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 
messa...@edwardjones.com<mailto:messa...@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<http://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-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 
[mailto:asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@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-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 
[mailto:asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@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@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
--
_____________________________________________________________________
-- 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

Reply via email to