AGI_asteriskManager use for create a file

I would like to create a file with AGI_asteriskManager if anyone know how i can do it

I have write this script
#!/usr/bin/php -q

<?php require_once('/var/lib/asterisk/agi-bin/phpagi-asmanager.php'); $number = 'XXXXXXXXXXXXXX'; $asm = new AGI_AsteriskManager(); if($asm->connect("localhost","laurent","123")) { $call = $asm->send_request('Originate', array('Channel'=>"SIP/$number@ovh-simple", 'Context'=>'default', 'Priority'=>1, 'Callerid'=>XXXXXXXXXXXX)); print_r($call); if($call==null){ exit(1); } $asm->disconnect(); }else{ exit(1); } exit(0); ?>

he is fonctionnal but i would like to take send into a file the properties of $call

thanx a lot

Hi ,

do you mean you want to create call file using the below code?

Regards
CJ

i have find the solution with popen i want to write a file
popen(“echo $call >> info.txt”,‘r’);

but i want to know the status of my line and with the return i have only the originate status anyone know how i can give the status of my call ?