Hello Asterisk now Team,
I got an error while calling AGI script . Could you please help me to find
out the problem ?
Thanks in advance .
this is the main error
Failed to execute '/var/lib/asterisk/agi-bin/
ivrfile.php': No such file or directory" 1
<SIP/51101-0000004f>AGI Tx >> 510 Invalid or unknown command
[Jan 13 19:17:48] ERROR[7469]: utils.c:1128 ast_carefulwrite: write()
returned error: Broken pipe
<SIP/51101-0000004f>AGI Rx << --re <name> Show information about
extension <name>.
<SIP/51101-0000004f>AGI Tx >> 510 Invalid or unknown command
[Jan 13 19:17:48] ERROR[7469]: utils.c:1128 ast_carefulwrite: write()
returned error: Broken pipe
<SIP/51101-0000004f>AGI Rx <<
<SIP/51101-0000004f>AGI Tx >> 510 Invalid or unknown command
[Jan 13 19:17:48] ERROR[7469]: utils.c:1128 ast_carefulwrite: write()
returned error: Broken pipe
-- <SIP/51101-0000004f>AGI Script ivrfile.php completed, returning 0
-- Executing [555@DID_span_1:3] Hangup("SIP/51101-0000004f", "") in new
stack
== Spawn extension (DID_span_1, 555, 3) exited non-zero on
'SIP/51101-0000004f'
[Jan 13 19:17:48] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
[Jan 13 19:17:52] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
[Jan 13 19:17:56] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
[Jan 13 19:18:00] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
localhost*CLI>
Disconnected from Asterisk server
[root@localhost ~]# asterisk -r
Asterisk 1.6.2.11, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it
under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.11 currently running on localhost (pid = 2661)
Verbosity is at least 3
[Jan 13 19:19:20] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
== Using SIP RTP CoS mark 5
-- Executing [555@DID_span_1:1] Verbose("SIP/51101-00000051", "3,AGI")
in new stack
-- AGI
-- Executing [555@DID_span_1:2] AGI("SIP/51101-00000051",
"ivrfile.php,1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/ivrfile.php
<SIP/51101-00000051>AGI Tx >> agi_request: ivrfile.php
<SIP/51101-00000051>AGI Tx >> agi_channel: SIP/51101-00000051
<SIP/51101-00000051>AGI Tx >> agi_language: en
<SIP/51101-00000051>AGI Tx >> agi_type: SIP
<SIP/51101-00000051>AGI Tx >> agi_uniqueid: 1294926562.109
<SIP/51101-00000051>AGI Tx >> agi_version: 1.6.2.11
<SIP/51101-00000051>AGI Tx >> agi_callerid: 51101
<SIP/51101-00000051>AGI Tx >> agi_calleridname: Jane Smith
<SIP/51101-00000051>AGI Tx >> agi_callingpres: 0
<SIP/51101-00000051>AGI Tx >> agi_callingani2: 0
<SIP/51101-00000051>AGI Tx >> agi_callington: 0
<SIP/51101-00000051>AGI Tx >> agi_callingtns: 0
<SIP/51101-00000051>AGI Tx >> agi_dnid: 555
<SIP/51101-00000051>AGI Tx >> agi_rdnis: unknown
<SIP/51101-00000051>AGI Tx >> agi_context: DID_span_1
<SIP/51101-00000051>AGI Tx >> agi_extension: 555
<SIP/51101-00000051>AGI Tx >> agi_priority: 2
<SIP/51101-00000051>AGI Tx >> agi_enhanced: 0.0
<SIP/51101-00000051>AGI Tx >> agi_accountcode:
<SIP/51101-00000051>AGI Tx >> agi_threadid: -1222804592
<SIP/51101-00000051>AGI Tx >> agi_arg_1: 1
<SIP/51101-00000051>AGI Tx >>
<SIP/51101-00000051>AGI Rx << verbose "Failed to execute
'/var/lib/asterisk/agi-bin/ivrfile.php': No such file or directory" 1
ivrfile.php,1: Failed to execute '/var/lib/asterisk/agi-bin/ivrfile.php':
No such file or directory
<SIP/51101-00000051>AGI Tx >> 200 result=1
-- Executing [555@DID_span_1:3] Hangup("SIP/51101-00000051", "") in new
stack
== Spawn extension (DID_span_1, 555, 3) exited non-zero on
'SIP/51101-00000051'
[Jan 13 19:19:24] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
[Jan 13 19:19:28] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
[Jan 13 19:19:32] WARNING[2796]: chan_dahdi.c:4160 pri_find_dchan: No
D-channels available! Using Primary channel 16 as D-channel anyway!
== Using SIP RTP CoS mark 5
[Jan 13 19:19:34] NOTICE[2858]: c
[DID_span_1]
include => agi
[agi]
exten => 555,1,verbose(3,AGI)
exten => 555,2,AGI(ivrfile.php,1)
exten => 555,3,Hangup()
php script
#!/usr/bin/php
<?php
require 'phpagi.php';
$agi = new AGI();
$agi->answer();
$agi->stream_file('tt-monkeys.gsm');
?>
*Environment *
Asterisk now 1.6 is installed
[root@localhost agi-bin]# php -v
PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
[root@localhost agi-bin]#
[root@localhost agi-bin]# asterisk -v
Asterisk 1.6.2.11, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it
under
certain conditions. Type 'core show license' for details.
=========================================================================
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk
-r' to connect.
[root@localhost agi-bin]#
--
Warm Regards,
Arun Raj R <http://www.orisysindia.com/>
+ 91 9946014345
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisknow mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisknow