Portions created by the Initial Developer are Copyright (C) 2008-2012 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ include "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; if (permission_exists('sip_profiles_view')) { //access granted } else { echo "access denied"; exit; } if ($_GET['a'] == "default" && permission_exists('sip_profiles_edit')) { //get the contents of the sip profile $sip_profile = file_get_contents($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/conf/sip_profiles/'.$_GET['f']); //write the default config fget $fd = fopen($_SESSION['switch']['conf']['dir']."/sip_profiles/".$_GET['f'], "w"); fwrite($fd, $sip_profile); fclose($fd); $save_msg = "Restored ".$_GET['f']; } if ($_POST['a'] == "save" && permission_exists('sip_profiles_edit')) { $v_content = $_POST['code']; $fd = fopen($_SESSION['switch']['conf']['dir']."/sip_profiles/".$_POST['f'], "w"); fwrite($fd, $v_content); fclose($fd); $save_msg = "Saved ".$_POST['f']; } if ($_GET['a'] == "del" && permission_exists('sip_profiles_edit')) { if ($_GET['type'] == 'profile') { unlink($_SESSION['switch']['conf']['dir']."/sip_profiles/".$_GET['f']); header("Location: v_profiles.php"); exit; } } require_once "resources/header.php"; $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; if (strlen($save_msg) > 0) { echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
Message
\n"; echo " $save_msg\n"; echo "
\n"; echo "
\n"; } ?>

Profiles
Use this to configure your SIP profiles.


$file){ if (substr($file, -4) == ".xml") { echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } $i++; } } ?>
Name Description
\n"; echo $file; echo " \n"; echo " \n"; switch ($file) { case "internal.xml": echo "The Internal profile by default requires registration which is most often used for extensions. "; echo "By default the Internal profile binds to the WAN IP which is accessible to the internal network. "; echo "A rule can be set from PFSense -> Firewall -> Rules -> WAN to the the WAN IP for port 5060 which "; echo "enables phones register from outside the network."; echo ""; echo " "; break; case "internal-ipv6.xml": echo "The Internal IPV6 profile binds to the IP version 6 address and is similar to the Internal profile.\n"; echo " "; break; case "external.xml": echo "The External profile handles outbound registrations to a SIP provider or other SIP Server. The SIP provider sends calls to you, and you "; echo "send calls to your provider, through the external profile. The external profile allows anonymous calling, which is "; echo "required as your provider will never authenticate with you to send you a call. Calls can be sent using a SIP URL \"my.domain.com:5080\" "; echo " "; break; case "lan.xml": echo "The LAN profile is the same as the Internal profile except that it is bound to the LAN IP.\n"; echo " "; break; default: //echo "default "; } echo " \n"; echo " \n"; echo " \n"; if (permission_exists('sip_profiles_edit')) { echo " \n"; } if (permission_exists('sip_profile_delete')) { echo " \n"; } echo " \n"; echo "
$v_link_label_edit$v_link_label_delete
\n"; echo "
\n"; echo $_SESSION['switch']['conf']['dir']."/sip_profiles\n"; } ?>