Zphone import altnum.php
Aus metasec wiki
#!/usr/bin/php4-cgi -q <?php include_once("../etc/config.inc.php"); include_once($CCBOX["INC"]."func_sql.inc.php"); include_once($CCBOX["INC"]."ccbox.inc.php"); include_once($CCBOX["INC"]."func_manager.inc.php"); include_once($CCBOX["INC"]."func_callback.inc.php"); include_once($CCBOX["INC"]."func_voip.inc.php"); include_once($CCBOX["INC"]."func_voip_system.inc.php"); include_once($CCBOX["INC"]."func_dialplan.inc.php"); include_once($CCBOX["INC"]."func_webtapi_mgr.inc.php"); set_time_limit(0); ob_implicit_flush(); $USER = voip_ext_get_from_db("ae_ext"); $VOIP = array(); foreach ( file($argv[1]) as $line ) { $line = trim($line); $_tmp = explode(";", $line); $ae_ext = trim($_tmp[0]); $ae_ext = $argv[3].$ae_ext; $ae_id = $USER[$ae_ext]["ae_id"]; $VOIP[0]["aun_prio"] = $argv[2]; $VOIP[0]["aun_num"] = trim($_tmp[1]); print( $ae_id." ".$ae_ext." ".$VOIP["aun_prio"]." ".$VOIP["aun_num"]."\n"); voip_user_alt_num_save($ae_id, $VOIP); } ?>