Quantcast
Channel: General Help - FreePBX Community Forums
Viewing all articles
Browse latest Browse all 12628

FreeBBX 12 Asterisk 11 PHPAGI.php Script Executes but Does Nothing

$
0
0

@jerryriggin wrote:

I wrote a very simple AGI script:

#!/usr/bin/php -q
<?php
require('phpagi.php');
$agi = new AGI();
$agi->set_variable('CALLERID(num)','230144808');
$agi->verbose("mwi.php: callerid set to 230144808");
$agi->exec_dial("SIP", "335298@10.44.1.11");
$agi->hangup();
?>
It runs when called, but does nothing.undefined> -- Executing [777770@mwi-custom:1] AGI("Local/777770@mwi-custom-00000006;2", "mwi.php,0") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/mwi.php
AGI Tx >> agi_request: mwi.php
AGI Tx >> agi_channel: Local/777770@mwi-custom-00000006;2
AGI Tx >> agi_language: en
AGI Tx >> agi_type: Local
AGI Tx >> agi_uniqueid: 1445130347.71
AGI Tx >> agi_version: 11.18.0
AGI Tx >> agi_callerid: unknown
AGI Tx >> agi_calleridname: unknown
AGI Tx >> agi_callingpres: 67
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: mwi-custom
AGI Tx >> agi_extension: 777770
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> agi_threadid: 140030139971328
AGI Tx >> agi_arg_1: 0
AGI Tx >>

[INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('CHAN_START',{ts '2015-10-17 21:05:47.190058'},'','','','','','777770','mwi-custom','Local/777770@mwi-custom-00000006;2','','',3,'','1445130347.71','1445130347.70','','','')]
-- AGI Script mwi.php completed, returning 0

I know I must be doing something wierd, but I don't know what it is.

(Also I can't figure out how to add a relevant tag :frowning: )

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 12628

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>