Beispiel #1
0
function PrincipalFileGrandstream($DisplayName, $id_device, $secret, $arrParameters, $ipAdressServer, $model)
{
    if ($model == "GXV3140") {
        $content = "\n        # Firmware Server Path\n        P192 = {$ipAdressServer}\n        \n        # Config Server Path\n        P237 = {$ipAdressServer}\n        \n        # Firmware Upgrade. 0 - TFTP Upgrade,  1 - HTTP Upgrade.\n        P212 = 0\n        \n        # Account Name\n        P417 = {$DisplayName}\n        \n        # SIP Server\n        P402 = {$ipAdressServer}\n        \n        # Outbound Proxy\n        P403 = {$ipAdressServer}\n        \n        # SIP User ID\n        P404 = {$id_device}\n        \n        # Authenticate ID\n        P405 = {$id_device}\n        \n        # Authenticate password\n        P406 = {$secret}\n        \n        # Display Name (John Doe)\n        P407 = {$DisplayName}";
    } elseif ($model == "GXP2120" || $model == "GXP2100" || $model == "GXP1405" || $model == "GXV3175") {
        $content = getFileConfigGrandstream($DisplayName, $id_device, $secret, $arrParameters, $ipAdressServer, $model);
    } else {
        $content = getFileConfigGrandstream($DisplayName, $id_device, $secret, $arrParameters, $ipAdressServer, $model);
    }
    return $content;
}
function PrincipalFileGrandstream($DisplayName, $id_device, $secret, $arrParameters, $ipAdressServer, $model)
{
    //Usado por modelos como GXP2120,GXP2100,GXP1405,GXV3175,GXV3140,GXP2200
    $content = getFileConfigGrandstream($DisplayName, $id_device, $secret, $arrParameters, $ipAdressServer, $model);
    return $content;
}