<!--
 @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/>.



 This is a modified version of the original file "index.html".

 We list below the copyright notice of the ctxSip phone (https://github.com/collecttix/ctxSip)
 which also applies to the original "index.html" file, which was part of it:


   The MIT License (MIT)

   Copyright (c) 2014 Collecttix

   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   THE SOFTWARE.
-->

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <title>SIP Trip Phone</title>
    <link rel="icon" type="image/gif" href="img/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> 
    <link rel="stylesheet" type="text/css" href="css/font-awesome-4.7.0/css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="css/ctxSip.css" />

    <script type="text/javascript" src="scripts/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="scripts/bootstrap.min.js"></script>
    <script type="text/javascript" src="scripts/moment.min.js"></script>
    <script type="text/javascript" src="scripts/SIP.js/sip.min.js"></script>
    <script type="text/javascript" src="scripts/app.js"></script>

</head>
<body id="sipClient">
<div class="container-fluid">

    <div class="clearfix sipStatus">
        <div id="txtCallStatus" class="pull-right">&nbsp;</div>
        <div id="txtRegStatus"></div>
    </div>

    <div class="form-group" id="phoneUI">
        <div class="input-group">
            <div class="input-group-btn">
                <button id="dropDownButton" class="btn btn-sm btn-primary dropdown-toggle" data-toggle="dropdown" title="Show Keypad">
                    <i class="fa fa-th"></i>
                </button>
                <div id="sip-dialpad" class="dropdown-menu">
                    <button type="button" class="btn btn-default digit" data-digit="1">1<span>&nbsp;</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="2,A,B,C">2<span>ABC</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="3,D,E,F">3<span>DEF</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="4,G,H,I">4<span>GHI</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="5,J,K,L">5<span>JKL</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="6,M,N,O">6<span>MNO</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="7,P,Q,R,S">7<span>PQRS</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="8,T,U,V">8<span>TUV</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="9,W,X,Y,Z">9<span>WXYZ</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="*">*<span>&nbsp;</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="0,+">0<span>+</span></button>
                    <button type="button" class="btn btn-default digit" data-digit="#">#<span>&nbsp;</span></button>
                    <div class="clearfix">&nbsp;</div>
                    <button id="callButton" class="btn btn-success btn-block btnCall" title="Send">
                        <i class="fa fa-play"></i> Call
                    </button>
                </div>
            </div>
            <input type="text" name="number" id="numDisplay" class="form-control text-center input-sm" value="" placeholder="Enter number..." autocomplete="off" />
            <div class="input-group-btn input-group-btn-sm">
                <button class="btn btn-sm btn-primary dropdown-toggle" id="btnVol" data-toggle="dropdown" title="Volume">
                    <i class="fa fa-fw fa-volume-up"></i>
                </button>
                <div class="dropdown-menu dropdown-menu-right">
                    <input type="range" min="0" max="100" value="100" step="1" id="sldVolume" />
                </div>
            </div>
        </div>
    </div>

    <div class="well-sip">
        <div id="sip-splash" class="text-muted text-center panel panel-default">
            <div class="panel-body">
                <div class="page-header">
                  <span>
                        <img src="images/sip_trip_phone_logo_large.svg" style="display:block;margin:0px auto;width:80px;height:80px" />
                  </span>
                  <h3>SIP Trip Phone</h3>
                </div>
                <p class="lead">To make a call click on the button in the upper-left corner, enter a phone number, then  press 'Call'.
                   You can also use your keyboard to enter phone numbers and press 'Enter' to make calls.</p>
            </div>
        </div>

        <div id="sip-log" class="panel panel-default hide">
            <div class="panel-heading">
                <h4 class="text-muted panel-title">Recent Calls <span class="pull-right"><i class="fa fa-trash text-muted sipLogClear" title="Clear Log"></i></span></h4>
            </div>
            <div id="sip-logitems" class="list-group">
                <p class="text-muted text-center">No recent calls from this browser.</p>
            </div>
        </div>
    </div>

    <div class="modal fade" id="mdlError" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">Sip Error</h4>
                </div>
                <div class="modal-body text-center text-danger">
                    <h3><i class="fa fa-3x fa-ban"></i></h3>
                    <p class="lead">Sip registration failed. No calls can be handled.</p>
                </div>
            </div>
        </div>
    </div>

</div>

<audio id="ringtone" src="sounds/incoming.mp3" loop></audio>
<audio id="ringbacktone" src="sounds/outgoing.mp3" loop></audio>
<audio id="dtmfTone" src="sounds/dtmf.mp3"></audio>

<video id="audioRemote"></video>
<video id="audioLocal"></video>

</body>
</html>