templates/settings.php
65165a7c
 <?php
 /**
  * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
  *
  * @author Double Bastion LLC
  *
  * @license GNU AGPL version 3 or any later version
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  * License as published by the Free Software Foundation; either
  * version 3 of the License, or any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  *
  * You should have received a copy of the GNU Affero General Public
  * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
 declare(strict_types=1);
 
 style('sip_trip_phone', 'style');
 script('sip_trip_phone', 'settings');
 
 ?>
 
 <div id="sip_trip_phone_adm">
 	<div class="section">
            <h2><?php p($l->t('SIP Trip Phone'));?></h2>
 	   <p id="settings-dscr"><h3><?php p($l->t('Enter your credentials in the fields from below:')); ?></h3></p><br>
 
            <div class="stp_followupsection">
 
                 <form id="asterisk_credentials" action="#" >
 
                    <p><label for="pdisplayname"><b><?php p($l->t('Display Name: *'));?></b></label></p>
                    <input type="text" class="sip_trip_box" id="pdisplayname" name="pdisplayname" autocomplete="false"
                           placeholder="<?php p($l->t('E.g.: Ben Dove')); ?>" /><br>
 
                    <p><label for="sipusername"><b><?php p($l->t('SIP User: *'));?></b></label></p>
                    <input type="text" class="sip_trip_box" id="sipusername" name="sipusername" autocomplete="false"
                           placeholder="<?php p($l->t('E.g.: 1610  or john_doe')); ?>" /><br>
 
                    <p><label for="sipuserpassword"><b><?php p($l->t('SIP User Password: *'));?></b></label></p>
                    <input type="password" class="sip_trip_box" id="sipuserpassword" name="sipuserpassword" autocomplete="false"
                           placeholder="<?php p($l->t('E.g.: r?2V!s5w9Q&d7W?8')); ?>" /><br>
 
                    <p><label for="stphwssurl"><b><?php p($l->t('WSS URL: *'));?></b></label></p>
                    <input type="text" class="sip_trip_box" id="stphwssurl" name="stphwssurl" autocomplete="false"
                           placeholder="<?php p($l->t('E.g.: wss://cloud.example.com:8089/ws')); ?>" /><br>
 
                    <p id="labelSipRealm"><label for="siprealm"><b><?php p($l->t('SIP Realm  (the IPv4 address of your Asterisk server or the domain of the WSS URL offered by the SIP provider): *'));?></b></label></p>
                    <input type="text" class="sip_trip_box" id="siprealm" name="siprealm" autocomplete="false"
                           placeholder="<?php p($l->t('E.g.: 123.123.123.123 or sip.example.com')); ?>" /><br>
 
                    <p><label for="stunserver"><b><?php p($l->t('STUN Server domain or IPv4 address, followed by port number:'));?></b></label></p>
                    <input type="text" class="sip_trip_box" id="stunserver" name="stunserver" autocomplete="false"
                           placeholder="<?php p($l->t('E.g.: 123.123.123.123:8443')); ?>" />
 
                    <input type="hidden" id="user_id" name="user_id" />
 
                    <br>* Required field.<br><br>
 
                    <input id="save_sipph_settings" type="submit" value="<?php p($l->t('Save')) ?>" />
 
                    <span id="sip_trip_phone_save_msg"></span>
 
                </form>
            </div>
         </div>
 </div>