get_filename() as $f){ if(!file_exists($amp_conf['ASTETCDIR'] . "/$f")) { touch($amp_conf['ASTETCDIR'] . "/$f"); }//if }//foreach switch($file) { case extensions_additional.conf: return $this->generate_extensions_conf($version); break; }//switch }//generateConf function generate_extensions_conf($ast_version) { global $ext //create a dialplan //www.freepbx.org/trac/wiki/ApiExtensions $id = 'app-HelloWorld'; $dial = '*42'; $ext->add($id, $dial, '', new ext_answer('')); $ext->add($id, $dial, '', new ext_playback('hello-world')); $ext->add($id, $dial, '', new ext_macro('hangupcall')); return $ext->generateConf(); }//generate_extensions_conf() }//class HelloWorld ?>