├── .gitattributes ├── LICENSE ├── README.md └── src ├── css ├── default.css ├── micro.css ├── micro2.css ├── mini.css └── thin.css ├── debug ├── .htaccess └── viciphone_access.log ├── favicon.ico ├── images ├── reg_status_blink.gif ├── wp_dial.gif ├── wp_hangup.gif ├── wp_logo.gif ├── wp_logo.png ├── wp_mic_off.gif ├── wp_mic_on.gif ├── wp_register_active.gif ├── wp_register_inactive.gif ├── wp_speaker_down.gif ├── wp_speaker_up.gif ├── wp_unregister_active.gif └── wp_unregister_inactive.gif ├── index.html ├── js ├── sip.js └── vici_phone.js ├── sounds ├── 0.wav ├── 1.wav ├── 2.wav ├── 3.wav ├── 4.wav ├── 5.wav ├── 6.wav ├── 7.wav ├── 8.wav ├── 9.wav ├── hash.wav ├── progress-eu.mp3 ├── progress-na.mp3 ├── progress-uk.mp3 ├── ringing.mp3 └── star.wav ├── viciphone.appcache ├── viciphone.php ├── vp_int_example.php ├── vp_interpreter.php └── vp_template.php /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Viciphone Version 3.0 2 | 3 | With this release comes the following improvements: 4 | * A complete rewrite of the core Viciphone code to support SIP.js v0.20.1 5 | - This does require 'rtcp_mux=yes' be set in the template you are using for your webphone 6 | * Support for passing a settings container from Vicidial to Viciphone to allow additional settings to be added in the future without Vicidial changes 7 | - To take advantage of this feature an upgrade to Vicidial is required. 8 | - Viciphone will still work without the Vicidial upgrade, but some features will not be accessible. 9 | * Added the ability to enable/disable various browser audio processing like Echo Cancellation and Automatic Gain Control 10 | - Does require the Viciphone settings container support in Vicidial 11 | * Auto call agent conference on successful registration. This is similar to a feature that was added to some forks of Viciphone but it will work even if Viciphone and Vicidial are hosted on different domains. 12 | - Does require the Viciphone settings container support in Vicidial 13 | * Dynamic translation support. This is a frequent request that has been implemented in several of the forks of Viciphone. 14 | - Does require the Viciphone settings container support in Vicidial 15 | - If you create a new translation, please share the values from your settings container 16 | * Play progress audio instead of ringing when placing a call 17 | - The audio file can be changed in the Viciphone Settings Container by adjusting the region setting. 18 | - Currently supported regions include North America, Europe, and the UK. 19 | 20 | 21 | ## Note: 22 | If you already have Viciphone working on your cluster, make sure that: 23 | ``` 24 | rtcp_mux=yes 25 | ``` 26 | is set in the template you are using for your webphones before switching to this version. 27 | -------------------------------------------------------------------------------- /src/css/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | * 4 | * CSS File for the Vicidial WebRTC Phone 5 | * 6 | * Copyright (C) 2016 Michael Cargile 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | ****************************************************************************** 22 | */ 23 | 24 | 25 | 26 | #container { 27 | width: 424px; 28 | height: 230px; 29 | } 30 | 31 | #main { 32 | width: 408px; 33 | height: 228px; 34 | position: relative; 35 | top: 2px; 36 | left: 2px; 37 | background-color: #282828; 38 | -webkit-border-radius: 4px; 39 | -moz-border-radius: 4px; 40 | border-radius: 4px; 41 | } 42 | 43 | #logo { 44 | width: 250px; 45 | height: 59px; 46 | background-color: #808080; 47 | position: absolute; 48 | top: 6px; 49 | left: 6px; 50 | -webkit-border-radius: 4px; 51 | -moz-border-radius: 4px; 52 | border-radius: 4px; 53 | border: 1px solid #041830; 54 | } 55 | 56 | #logo_img { 57 | width: 232px; 58 | height: 42px; 59 | position: absolute; 60 | left: 8px; 61 | top: 8px; 62 | background-color: #E0E0E0; 63 | -webkit-border-radius: 4px; 64 | -moz-border-radius: 4px; 65 | border-radius: 4px; 66 | border: 1px solid #041830; 67 | } 68 | 69 | #controls { 70 | width: 249px; 71 | height: 147px; 72 | background-color: #808080; 73 | position: absolute; 74 | top: 73px; 75 | left: 6px; 76 | -webkit-border-radius: 4px; 77 | -moz-border-radius: 4px; 78 | border-radius: 4px; 79 | border: 1px solid #041830; 80 | } 81 | 82 | #registration_control { 83 | width: 232px; 84 | height: 39px; 85 | position: absolute; 86 | left: 8px; 87 | top: 8px; 88 | background-color: #4A698E; 89 | -webkit-border-radius: 4px; 90 | -moz-border-radius: 4px; 91 | border-radius: 4px; 92 | border: 1px solid #041830; 93 | } 94 | 95 | #reg_status { 96 | margin: 4px 4px 4px 4px; 97 | width: 134px; 98 | height: 20px; 99 | text-align: center; 100 | position: absolute; 101 | top: 2px; 102 | left: 0px; 103 | border: 1px solid #2a4a6f; 104 | background: #7691b1; 105 | -webkit-border-radius: 7px; 106 | -moz-border-radius: 7px; 107 | border-radius: 7px; 108 | color: #e0e0e0; 109 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 110 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 111 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 112 | } 113 | 114 | #register { 115 | position: absolute; 116 | left: 148px; 117 | top: 0px; 118 | 119 | } 120 | 121 | #unregister { 122 | position: absolute; 123 | left: 190px; 124 | top: 0px; 125 | 126 | } 127 | 128 | #dial_control { 129 | width: 232px; 130 | height: 39px; 131 | position: absolute; 132 | left: 8px; 133 | top: 53px; 134 | background-color: #4A698E; 135 | -webkit-border-radius: 4px; 136 | -moz-border-radius: 4px; 137 | border-radius: 4px; 138 | border: 1px solid #041830; 139 | } 140 | 141 | #digits { 142 | margin: 4px 4px 4px 4px; 143 | width: 176px; 144 | height: 25px; 145 | text-align: center; 146 | border: 1px solid #2a4a6f; 147 | background: #f0f0f0; 148 | -webkit-border-radius: 7px; 149 | -moz-border-radius: 7px; 150 | border-radius: 7px; 151 | color: #2a4a6f; 152 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 153 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 154 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 155 | } 156 | 157 | #dial { 158 | position: absolute; 159 | left: 190px; 160 | top: 0px; 161 | } 162 | 163 | #audio_control { 164 | width: 232px; 165 | height: 39px; 166 | position: absolute; 167 | left: 8px; 168 | top: 99px; 169 | background-color: #4A698E; 170 | -webkit-border-radius: 4px; 171 | -moz-border-radius: 4px; 172 | border-radius: 4px; 173 | border: 1px solid #041830; 174 | } 175 | 176 | #mic_mute { 177 | position: absolute; 178 | left: 3px; 179 | top: 0px; 180 | } 181 | 182 | #vol_up { 183 | position: absolute; 184 | left: 45px; 185 | top: 0px; 186 | } 187 | 188 | #vol_down { 189 | position: absolute; 190 | left: 87px; 191 | top: 0px; 192 | } 193 | 194 | 195 | #dialpad { 196 | width: 137px; 197 | height: 214px; 198 | background-color: #808080; 199 | position: absolute; 200 | top: 6px; 201 | left: 264px; 202 | border: 1px solid #041830; 203 | -webkit-border-radius: 4px; 204 | -moz-border-radius: 4px; 205 | border-radius: 4px; 206 | } 207 | 208 | .button { 209 | margin-top: 4px; 210 | margin-left: 1px; 211 | margin-right: 0px; 212 | min-width: 30px; 213 | height: 30px; 214 | border: 1px solid #041830; 215 | background: #2a4a6f; 216 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 217 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 218 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 219 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 220 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 221 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 222 | -webkit-border-radius: 6px; 223 | -moz-border-radius: 6px; 224 | border-radius: 6px; 225 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 226 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 227 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 228 | text-shadow: #122e4f 0 1px 0; 229 | color: #e0e0e0; 230 | font-size: 14px; 231 | font-family: helvetica, serif; 232 | text-decoration: none; 233 | vertical-align: middle; 234 | } 235 | .button:hover { 236 | border: 1px solid #041830; 237 | text-shadow: #122e4f 0 1px 0; 238 | background: #2a4b84; 239 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 240 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 241 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 242 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 243 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 244 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 245 | color: #fff; 246 | } 247 | .button:active { 248 | text-shadow: #122e4f 0 1px 0; 249 | border: 1px solid #041830; 250 | background: #243f5e; 251 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 252 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 253 | background: -moz-linear-gradient(top, #687f99, #243f5e); 254 | background: -ms-linear-gradient(top, #687f99, #243f5e); 255 | background: -o-linear-gradient(top, #687f99, #243f5e); 256 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 257 | color: #fff; 258 | } 259 | 260 | .dialpad_button { 261 | min-width: 38px; 262 | height: 38px; 263 | border: 1px solid #041830; 264 | background: #2a4a6f; 265 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 266 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 267 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 268 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 269 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 270 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 271 | -webkit-border-radius: 6px; 272 | -moz-border-radius: 6px; 273 | border-radius: 6px; 274 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 275 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 276 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 277 | text-shadow: #122e4f 0 1px 0; 278 | color: #e0e0e0; 279 | font-size: 14px; 280 | font-family: helvetica, serif; 281 | text-decoration: none; 282 | vertical-align: middle; 283 | } 284 | .dialpad_button:hover { 285 | border: 1px solid #041830; 286 | text-shadow: #122e4f 0 1px 0; 287 | background: #2a4b84; 288 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 289 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 290 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 291 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 292 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 293 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 294 | color: #fff; 295 | } 296 | .dialpad_button:active { 297 | text-shadow: #122e4f 0 1px 0; 298 | border: 1px solid #041830; 299 | background: #243f5e; 300 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 301 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 302 | background: -moz-linear-gradient(top, #687f99, #243f5e); 303 | background: -ms-linear-gradient(top, #687f99, #243f5e); 304 | background: -o-linear-gradient(top, #687f99, #243f5e); 305 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 306 | color: #fff; 307 | } 308 | 309 | #dial_row1 { 310 | position: absolute; 311 | top: 7px; 312 | left: 7px; 313 | width: 122px; 314 | } 315 | 316 | #one { 317 | position: absolute; 318 | top: 0px; 319 | left: 0px; 320 | } 321 | 322 | #two { 323 | position: absolute; 324 | top: 0px; 325 | left: 42px; 326 | } 327 | 328 | #three { 329 | position: absolute; 330 | top: 0px; 331 | left: 84px; 332 | } 333 | 334 | #dial_row2 { 335 | position: absolute; 336 | top: 49px; 337 | left: 7px; 338 | width: 122px; 339 | } 340 | 341 | #four { 342 | position: absolute; 343 | top: 0px; 344 | left: 0px; 345 | } 346 | 347 | #five { 348 | position: absolute; 349 | top: 0px; 350 | left: 42px; 351 | } 352 | 353 | #six { 354 | position: absolute; 355 | top: 0px; 356 | left: 84px; 357 | } 358 | 359 | #dial_row3 { 360 | position: absolute; 361 | top: 91px; 362 | left: 7px; 363 | width: 122px; 364 | } 365 | 366 | #seven { 367 | position: absolute; 368 | top: 0px; 369 | left: 0px; 370 | } 371 | 372 | #eight { 373 | position: absolute; 374 | top: 0px; 375 | left: 42px; 376 | } 377 | 378 | #nine { 379 | position: absolute; 380 | top: 0px; 381 | left: 84px; 382 | } 383 | 384 | #dial_row4 { 385 | position: absolute; 386 | top: 133px; 387 | left: 7px; 388 | width: 122px; 389 | } 390 | 391 | #star { 392 | position: absolute; 393 | top: 0px; 394 | left: 0px; 395 | } 396 | 397 | #zero { 398 | position: absolute; 399 | top: 0px; 400 | left: 42px; 401 | } 402 | 403 | #pound { 404 | position: absolute; 405 | top: 0px; 406 | left: 84px; 407 | } 408 | 409 | #dial_dtmf { 410 | position: absolute; 411 | top: 178px; 412 | left: 7px; 413 | } 414 | 415 | #dtmf_digits { 416 | position: absolute; 417 | top: 0px; 418 | left: 0px; 419 | width: 64px; 420 | height: 25px; 421 | text-align: center; 422 | border: 1px solid #2a4a6f; 423 | background: #f0f0f0; 424 | -webkit-border-radius: 7px; 425 | -moz-border-radius: 7px; 426 | border-radius: 7px; 427 | color: #2a4a6f; 428 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 429 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 430 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 431 | } 432 | 433 | #send_dtmf { 434 | position: absolute; 435 | top: -4px; 436 | right: -123px; 437 | } 438 | -------------------------------------------------------------------------------- /src/css/micro.css: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | * 4 | * CSS File for the Vicidial WebRTC Phone 5 | * 6 | * Copyright (C) 2016 Michael Cargile 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | ****************************************************************************** 22 | */ 23 | 24 | 25 | 26 | #container { 27 | width: 409px; 28 | height: 36px; 29 | } 30 | 31 | #main { 32 | width: 409px; 33 | height: 36px; 34 | position: relative; 35 | top: 2px; 36 | left: 2px; 37 | background-color: #808080; 38 | -webkit-border-radius: 4px; 39 | -moz-border-radius: 4px; 40 | border-radius: 4px; 41 | } 42 | 43 | #logo { 44 | display:none; 45 | } 46 | 47 | #logo_img { 48 | display:none; 49 | } 50 | 51 | #controls { 52 | width: 168px; 53 | height: 34px; 54 | background-color: #808080; 55 | position: absolute; 56 | top: 1px; 57 | left: 0px; 58 | -webkit-border-radius: 4px; 59 | -moz-border-radius: 4px; 60 | border-radius: 4px; 61 | border: 0px solid #041830; 62 | } 63 | 64 | #registration_control { 65 | width: 86px; 66 | height: 32px; 67 | position: absolute; 68 | left: 2px; 69 | top: 0px; 70 | background-color: #4A698E; 71 | -webkit-border-radius: 4px; 72 | -moz-border-radius: 4px; 73 | border-radius: 4px; 74 | border: 1px solid #041830; 75 | } 76 | 77 | #reg_status { 78 | margin: 4px 4px 4px 4px; 79 | width: 40px; 80 | height: 20px; 81 | font-size: 8px; 82 | text-align: center; 83 | position: absolute; 84 | top: 0px; 85 | left: 0px; 86 | border: 1px solid #2a4a6f; 87 | background: #7691b1; 88 | -webkit-border-radius: 7px; 89 | -moz-border-radius: 7px; 90 | border-radius: 7px; 91 | color: #e0e0e0; 92 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 93 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 94 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 95 | } 96 | 97 | #register { 98 | position: absolute; 99 | left: 46px; 100 | top: 0px; 101 | height: 24px; 102 | } 103 | 104 | #unregister { 105 | display:none; 106 | } 107 | 108 | #dial_control { 109 | display:none; 110 | } 111 | 112 | #digits { 113 | display:none; 114 | } 115 | 116 | #dial { 117 | display:none; 118 | } 119 | 120 | #audio_control { 121 | display:none; 122 | } 123 | 124 | #mic_mute { 125 | display:none; 126 | } 127 | 128 | #vol_up { 129 | display:none; 130 | } 131 | 132 | #vol_down { 133 | display:none; 134 | } 135 | 136 | 137 | #dialpad { 138 | width: 316px; 139 | height: 34px; 140 | background-color: #4A698E; 141 | position: absolute; 142 | top: 0px; 143 | left: 90px; 144 | border: 1px solid #041830; 145 | -webkit-border-radius: 4px; 146 | -moz-border-radius: 4px; 147 | border-radius: 4px; 148 | } 149 | 150 | .button { 151 | margin-top: 4px; 152 | margin-left: 1px; 153 | margin-right: 0px; 154 | min-width: 30px; 155 | height: 30px; 156 | border: 1px solid #041830; 157 | background: #2a4a6f; 158 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 159 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 160 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 161 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 162 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 163 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 164 | -webkit-border-radius: 6px; 165 | -moz-border-radius: 6px; 166 | border-radius: 6px; 167 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 168 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 169 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 170 | text-shadow: #122e4f 0 1px 0; 171 | color: #e0e0e0; 172 | font-size: 14px; 173 | font-family: helvetica, serif; 174 | text-decoration: none; 175 | vertical-align: middle; 176 | } 177 | .button:hover { 178 | border: 1px solid #041830; 179 | text-shadow: #122e4f 0 1px 0; 180 | background: #2a4b84; 181 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 182 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 183 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 184 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 185 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 186 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 187 | color: #fff; 188 | } 189 | .button:active { 190 | text-shadow: #122e4f 0 1px 0; 191 | border: 1px solid #041830; 192 | background: #243f5e; 193 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 194 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 195 | background: -moz-linear-gradient(top, #687f99, #243f5e); 196 | background: -ms-linear-gradient(top, #687f99, #243f5e); 197 | background: -o-linear-gradient(top, #687f99, #243f5e); 198 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 199 | color: #fff; 200 | } 201 | 202 | .dialpad_button { 203 | min-width: 26px; 204 | height: 26px; 205 | border: 1px solid #041830; 206 | background: #2a4a6f; 207 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 208 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 209 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 210 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 211 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 212 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 213 | -webkit-border-radius: 6px; 214 | -moz-border-radius: 6px; 215 | border-radius: 6px; 216 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 217 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 218 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 219 | text-shadow: #122e4f 0 1px 0; 220 | color: #e0e0e0; 221 | font-size: 14px; 222 | font-family: helvetica, serif; 223 | text-decoration: none; 224 | vertical-align: middle; 225 | } 226 | .dialpad_button:hover { 227 | border: 1px solid #041830; 228 | text-shadow: #122e4f 0 1px 0; 229 | background: #2a4b84; 230 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 231 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 232 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 233 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 234 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 235 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 236 | color: #fff; 237 | } 238 | .dialpad_button:active { 239 | text-shadow: #122e4f 0 1px 0; 240 | border: 1px solid #041830; 241 | background: #243f5e; 242 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 243 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 244 | background: -moz-linear-gradient(top, #687f99, #243f5e); 245 | background: -ms-linear-gradient(top, #687f99, #243f5e); 246 | background: -o-linear-gradient(top, #687f99, #243f5e); 247 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 248 | color: #fff; 249 | } 250 | 251 | #dial_row1 { 252 | position: absolute; 253 | top: 4px; 254 | left: 1px; 255 | width: 78px; 256 | } 257 | 258 | #one { 259 | position: absolute; 260 | top: 0px; 261 | left: 0px; 262 | } 263 | 264 | #two { 265 | position: absolute; 266 | top: 0px; 267 | left: 26px; 268 | } 269 | 270 | #three { 271 | position: absolute; 272 | top: 0px; 273 | left: 52px; 274 | } 275 | 276 | #dial_row2 { 277 | position: absolute; 278 | top: 4px; 279 | left: 79px; 280 | width: 78px; 281 | } 282 | 283 | #four { 284 | position: absolute; 285 | top: 0px; 286 | left: 0px; 287 | } 288 | 289 | #five { 290 | position: absolute; 291 | top: 0px; 292 | left: 26px; 293 | } 294 | 295 | #six { 296 | position: absolute; 297 | top: 0px; 298 | left: 52px; 299 | } 300 | 301 | #dial_row3 { 302 | position: absolute; 303 | top: 4px; 304 | left: 157px; 305 | width: 78px; 306 | } 307 | 308 | #seven { 309 | position: absolute; 310 | top: 0px; 311 | left: 0px; 312 | } 313 | 314 | #eight { 315 | position: absolute; 316 | top: 0px; 317 | left: 26px; 318 | } 319 | 320 | #nine { 321 | position: absolute; 322 | top: 0px; 323 | left: 52px; 324 | } 325 | 326 | #dial_row4 { 327 | position: absolute; 328 | top: 4px; 329 | left: 235px; 330 | width: 78px; 331 | } 332 | 333 | #star { 334 | position: absolute; 335 | top: 0px; 336 | left: 26px; 337 | } 338 | 339 | #zero { 340 | position: absolute; 341 | top: 0px; 342 | left: 0px; 343 | } 344 | 345 | #pound { 346 | position: absolute; 347 | top: 0px; 348 | left: 52px; 349 | } 350 | 351 | #dial_dtmf { 352 | display:none; 353 | } 354 | 355 | #dtmf_digits { 356 | display:none; 357 | } 358 | 359 | #send_dtmf { 360 | display:none; 361 | } 362 | -------------------------------------------------------------------------------- /src/css/micro2.css: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | * 4 | * CSS File for the Vicidial WebRTC Phone 5 | * 6 | * Copyright (C) 2016 Michael Cargile 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | ****************************************************************************** 22 | */ 23 | 24 | 25 | 26 | #container { 27 | width: 451px; 28 | height: 36px; 29 | } 30 | 31 | #main { 32 | width: 451px; 33 | height: 36px; 34 | position: relative; 35 | top: 2px; 36 | left: 2px; 37 | background-color: #808080; 38 | -webkit-border-radius: 4px; 39 | -moz-border-radius: 4px; 40 | border-radius: 4px; 41 | } 42 | 43 | #logo { 44 | display:none; 45 | } 46 | 47 | #logo_img { 48 | display:none; 49 | } 50 | 51 | #controls { 52 | width: 190px; 53 | height: 34px; 54 | background-color: #808080; 55 | position: absolute; 56 | top: 1px; 57 | left: 0px; 58 | -webkit-border-radius: 4px; 59 | -moz-border-radius: 4px; 60 | border-radius: 4px; 61 | border: 0px solid #041830; 62 | } 63 | 64 | #registration_control { 65 | width: 86px; 66 | height: 33px; 67 | position: absolute; 68 | left: 44px; 69 | top: 0px; 70 | background-color: #4A698E; 71 | -webkit-border-radius: 4px; 72 | -moz-border-radius: 4px; 73 | border-radius: 4px; 74 | border: 1px solid #041830; 75 | } 76 | 77 | #reg_status { 78 | margin: 4px 4px 4px 4px; 79 | width: 40px; 80 | height: 20px; 81 | font-size: 8px; 82 | text-align: center; 83 | position: absolute; 84 | top: 0px; 85 | left: 0px; 86 | border: 1px solid #2a4a6f; 87 | background: #7691b1; 88 | -webkit-border-radius: 7px; 89 | -moz-border-radius: 7px; 90 | border-radius: 7px; 91 | color: #e0e0e0; 92 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 93 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 94 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 95 | } 96 | 97 | #register { 98 | position: absolute; 99 | left: 46px; 100 | top: 0px; 101 | height: 24px; 102 | } 103 | 104 | #unregister { 105 | display:none; 106 | } 107 | 108 | #dial_control { 109 | display:none; 110 | } 111 | 112 | #digits { 113 | display:none; 114 | } 115 | 116 | #dial { 117 | display:none; 118 | } 119 | 120 | #audio_control { 121 | width: 42px; 122 | height: 33px; 123 | position: absolute; 124 | left: 0px; 125 | top: 0px; 126 | background-color: #4A698E; 127 | -webkit-border-radius: 4px; 128 | -moz-border-radius: 4px; 129 | border-radius: 4px; 130 | border: 1px solid #041830; 131 | } 132 | 133 | #mic_mute { 134 | position: absolute; 135 | left: 3px; 136 | top: 0px; 137 | height: 24px; 138 | } 139 | 140 | #vol_up { 141 | display:none; 142 | } 143 | 144 | #vol_down { 145 | display:none; 146 | } 147 | 148 | 149 | #dialpad { 150 | width: 316px; 151 | height: 33px; 152 | background-color: #4A698E; 153 | position: absolute; 154 | top: 0px; 155 | left: 132px; 156 | border: 1px solid #041830; 157 | -webkit-border-radius: 4px; 158 | -moz-border-radius: 4px; 159 | border-radius: 4px; 160 | } 161 | 162 | .button { 163 | margin-top: 4px; 164 | margin-left: 1px; 165 | margin-right: 0px; 166 | min-width: 30px; 167 | height: 30px; 168 | border: 1px solid #041830; 169 | background: #2a4a6f; 170 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 171 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 172 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 173 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 174 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 175 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 176 | -webkit-border-radius: 6px; 177 | -moz-border-radius: 6px; 178 | border-radius: 6px; 179 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 180 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 181 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 182 | text-shadow: #122e4f 0 1px 0; 183 | color: #e0e0e0; 184 | font-size: 14px; 185 | font-family: helvetica, serif; 186 | text-decoration: none; 187 | vertical-align: middle; 188 | } 189 | .button:hover { 190 | border: 1px solid #041830; 191 | text-shadow: #122e4f 0 1px 0; 192 | background: #2a4b84; 193 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 194 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 195 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 196 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 197 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 198 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 199 | color: #fff; 200 | } 201 | .button:active { 202 | text-shadow: #122e4f 0 1px 0; 203 | border: 1px solid #041830; 204 | background: #243f5e; 205 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 206 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 207 | background: -moz-linear-gradient(top, #687f99, #243f5e); 208 | background: -ms-linear-gradient(top, #687f99, #243f5e); 209 | background: -o-linear-gradient(top, #687f99, #243f5e); 210 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 211 | color: #fff; 212 | } 213 | 214 | .dialpad_button { 215 | min-width: 26px; 216 | height: 26px; 217 | border: 1px solid #041830; 218 | background: #2a4a6f; 219 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 220 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 221 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 222 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 223 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 224 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 225 | -webkit-border-radius: 6px; 226 | -moz-border-radius: 6px; 227 | border-radius: 6px; 228 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 229 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 230 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 231 | text-shadow: #122e4f 0 1px 0; 232 | color: #e0e0e0; 233 | font-size: 14px; 234 | font-family: helvetica, serif; 235 | text-decoration: none; 236 | vertical-align: middle; 237 | } 238 | .dialpad_button:hover { 239 | border: 1px solid #041830; 240 | text-shadow: #122e4f 0 1px 0; 241 | background: #2a4b84; 242 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 243 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 244 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 245 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 246 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 247 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 248 | color: #fff; 249 | } 250 | .dialpad_button:active { 251 | text-shadow: #122e4f 0 1px 0; 252 | border: 1px solid #041830; 253 | background: #243f5e; 254 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 255 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 256 | background: -moz-linear-gradient(top, #687f99, #243f5e); 257 | background: -ms-linear-gradient(top, #687f99, #243f5e); 258 | background: -o-linear-gradient(top, #687f99, #243f5e); 259 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 260 | color: #fff; 261 | } 262 | 263 | #dial_row1 { 264 | position: absolute; 265 | top: 4px; 266 | left: 1px; 267 | width: 78px; 268 | } 269 | 270 | #one { 271 | position: absolute; 272 | top: 0px; 273 | left: 0px; 274 | } 275 | 276 | #two { 277 | position: absolute; 278 | top: 0px; 279 | left: 26px; 280 | } 281 | 282 | #three { 283 | position: absolute; 284 | top: 0px; 285 | left: 52px; 286 | } 287 | 288 | #dial_row2 { 289 | position: absolute; 290 | top: 4px; 291 | left: 79px; 292 | width: 78px; 293 | } 294 | 295 | #four { 296 | position: absolute; 297 | top: 0px; 298 | left: 0px; 299 | } 300 | 301 | #five { 302 | position: absolute; 303 | top: 0px; 304 | left: 26px; 305 | } 306 | 307 | #six { 308 | position: absolute; 309 | top: 0px; 310 | left: 52px; 311 | } 312 | 313 | #dial_row3 { 314 | position: absolute; 315 | top: 4px; 316 | left: 157px; 317 | width: 78px; 318 | } 319 | 320 | #seven { 321 | position: absolute; 322 | top: 0px; 323 | left: 0px; 324 | } 325 | 326 | #eight { 327 | position: absolute; 328 | top: 0px; 329 | left: 26px; 330 | } 331 | 332 | #nine { 333 | position: absolute; 334 | top: 0px; 335 | left: 52px; 336 | } 337 | 338 | #dial_row4 { 339 | position: absolute; 340 | top: 4px; 341 | left: 235px; 342 | width: 78px; 343 | } 344 | 345 | #star { 346 | position: absolute; 347 | top: 0px; 348 | left: 26px; 349 | } 350 | 351 | #zero { 352 | position: absolute; 353 | top: 0px; 354 | left: 0px; 355 | } 356 | 357 | #pound { 358 | position: absolute; 359 | top: 0px; 360 | left: 52px; 361 | } 362 | 363 | #dial_dtmf { 364 | display:none; 365 | } 366 | 367 | #dtmf_digits { 368 | display:none; 369 | } 370 | 371 | #send_dtmf { 372 | display:none; 373 | } 374 | -------------------------------------------------------------------------------- /src/css/mini.css: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | * 4 | * CSS File for the Vicidial WebRTC Phone 5 | * 6 | * Copyright (C) 2016 Michael Cargile 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | ****************************************************************************** 22 | */ 23 | 24 | 25 | 26 | #container { 27 | width: 614px; 28 | height: 36px; 29 | } 30 | 31 | #main { 32 | width: 614px; 33 | height: 36px; 34 | position: relative; 35 | top: 2px; 36 | left: 2px; 37 | background-color: #808080; 38 | -webkit-border-radius: 4px; 39 | -moz-border-radius: 4px; 40 | border-radius: 4px; 41 | } 42 | 43 | #logo { 44 | display:none; 45 | } 46 | 47 | #logo_img { 48 | display:none; 49 | } 50 | 51 | #controls { 52 | width: 168px; 53 | height: 34px; 54 | background-color: #808080; 55 | position: absolute; 56 | top: 1px; 57 | left: 0px; 58 | -webkit-border-radius: 4px; 59 | -moz-border-radius: 4px; 60 | border-radius: 4px; 61 | border: 0px solid #041830; 62 | } 63 | 64 | #registration_control { 65 | width: 86px; 66 | height: 32px; 67 | position: absolute; 68 | left: 2px; 69 | top: 0px; 70 | background-color: #4A698E; 71 | -webkit-border-radius: 4px; 72 | -moz-border-radius: 4px; 73 | border-radius: 4px; 74 | border: 1px solid #041830; 75 | } 76 | 77 | #reg_status { 78 | margin: 4px 4px 4px 4px; 79 | width: 40px; 80 | height: 20px; 81 | font-size: 8px; 82 | text-align: center; 83 | position: absolute; 84 | top: 0px; 85 | left: 0px; 86 | border: 1px solid #2a4a6f; 87 | background: #7691b1; 88 | -webkit-border-radius: 7px; 89 | -moz-border-radius: 7px; 90 | border-radius: 7px; 91 | color: #e0e0e0; 92 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 93 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 94 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 95 | } 96 | 97 | #register { 98 | position: absolute; 99 | left: 46px; 100 | top: 0px; 101 | height: 24px; 102 | } 103 | 104 | #unregister { 105 | display:none; 106 | } 107 | 108 | #dial_control { 109 | width: 80px; 110 | height: 32px; 111 | position: absolute; 112 | left: 92px; 113 | top: 0px; 114 | background-color: #4A698E; 115 | -webkit-border-radius: 4px; 116 | -moz-border-radius: 4px; 117 | border-radius: 4px; 118 | border: 1px solid #041830; 119 | } 120 | 121 | #digits { 122 | margin: 4px 4px 4px 4px; 123 | width: 34px; 124 | height: 20px; 125 | text-align: center; 126 | border: 1px solid #2a4a6f; 127 | background: #f0f0f0; 128 | -webkit-border-radius: 7px; 129 | -moz-border-radius: 7px; 130 | border-radius: 7px; 131 | color: #2a4a6f; 132 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 133 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 134 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 135 | } 136 | 137 | #dial { 138 | position: absolute; 139 | left: 42px; 140 | top: 0px; 141 | height: 24px; 142 | } 143 | 144 | #audio_control { 145 | width: 116px; 146 | height: 32px; 147 | position: absolute; 148 | left: 176px; 149 | top: 0px; 150 | background-color: #4A698E; 151 | -webkit-border-radius: 4px; 152 | -moz-border-radius: 4px; 153 | border-radius: 4px; 154 | border: 1px solid #041830; 155 | } 156 | 157 | #mic_mute { 158 | position: absolute; 159 | left: 3px; 160 | top: 0px; 161 | height: 24px; 162 | } 163 | 164 | #vol_up { 165 | position: absolute; 166 | left: 40px; 167 | top: 0px; 168 | height: 24px; 169 | } 170 | 171 | #vol_down { 172 | position: absolute; 173 | left: 77px; 174 | top: 0px; 175 | height: 24px; 176 | } 177 | 178 | 179 | #dialpad { 180 | width: 316px; 181 | height: 34px; 182 | background-color: #4A698E; 183 | position: absolute; 184 | top: 0px; 185 | left: 296px; 186 | border: 1px solid #041830; 187 | -webkit-border-radius: 4px; 188 | -moz-border-radius: 4px; 189 | border-radius: 4px; 190 | } 191 | 192 | .button { 193 | margin-top: 4px; 194 | margin-left: 1px; 195 | margin-right: 0px; 196 | min-width: 30px; 197 | height: 30px; 198 | border: 1px solid #041830; 199 | background: #2a4a6f; 200 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 201 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 202 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 203 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 204 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 205 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 206 | -webkit-border-radius: 6px; 207 | -moz-border-radius: 6px; 208 | border-radius: 6px; 209 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 210 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 211 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 212 | text-shadow: #122e4f 0 1px 0; 213 | color: #e0e0e0; 214 | font-size: 14px; 215 | font-family: helvetica, serif; 216 | text-decoration: none; 217 | vertical-align: middle; 218 | } 219 | .button:hover { 220 | border: 1px solid #041830; 221 | text-shadow: #122e4f 0 1px 0; 222 | background: #2a4b84; 223 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 224 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 225 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 226 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 227 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 228 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 229 | color: #fff; 230 | } 231 | .button:active { 232 | text-shadow: #122e4f 0 1px 0; 233 | border: 1px solid #041830; 234 | background: #243f5e; 235 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 236 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 237 | background: -moz-linear-gradient(top, #687f99, #243f5e); 238 | background: -ms-linear-gradient(top, #687f99, #243f5e); 239 | background: -o-linear-gradient(top, #687f99, #243f5e); 240 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 241 | color: #fff; 242 | } 243 | 244 | .dialpad_button { 245 | min-width: 26px; 246 | height: 26px; 247 | border: 1px solid #041830; 248 | background: #2a4a6f; 249 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 250 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 251 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 252 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 253 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 254 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 255 | -webkit-border-radius: 6px; 256 | -moz-border-radius: 6px; 257 | border-radius: 6px; 258 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 259 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 260 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 261 | text-shadow: #122e4f 0 1px 0; 262 | color: #e0e0e0; 263 | font-size: 14px; 264 | font-family: helvetica, serif; 265 | text-decoration: none; 266 | vertical-align: middle; 267 | } 268 | .dialpad_button:hover { 269 | border: 1px solid #041830; 270 | text-shadow: #122e4f 0 1px 0; 271 | background: #2a4b84; 272 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 273 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 274 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 275 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 276 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 277 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 278 | color: #fff; 279 | } 280 | .dialpad_button:active { 281 | text-shadow: #122e4f 0 1px 0; 282 | border: 1px solid #041830; 283 | background: #243f5e; 284 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 285 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 286 | background: -moz-linear-gradient(top, #687f99, #243f5e); 287 | background: -ms-linear-gradient(top, #687f99, #243f5e); 288 | background: -o-linear-gradient(top, #687f99, #243f5e); 289 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 290 | color: #fff; 291 | } 292 | 293 | #dial_row1 { 294 | position: absolute; 295 | top: 4px; 296 | left: 1px; 297 | width: 78px; 298 | } 299 | 300 | #one { 301 | position: absolute; 302 | top: 0px; 303 | left: 0px; 304 | } 305 | 306 | #two { 307 | position: absolute; 308 | top: 0px; 309 | left: 26px; 310 | } 311 | 312 | #three { 313 | position: absolute; 314 | top: 0px; 315 | left: 52px; 316 | } 317 | 318 | #dial_row2 { 319 | position: absolute; 320 | top: 4px; 321 | left: 79px; 322 | width: 78px; 323 | } 324 | 325 | #four { 326 | position: absolute; 327 | top: 0px; 328 | left: 0px; 329 | } 330 | 331 | #five { 332 | position: absolute; 333 | top: 0px; 334 | left: 26px; 335 | } 336 | 337 | #six { 338 | position: absolute; 339 | top: 0px; 340 | left: 52px; 341 | } 342 | 343 | #dial_row3 { 344 | position: absolute; 345 | top: 4px; 346 | left: 157px; 347 | width: 78px; 348 | } 349 | 350 | #seven { 351 | position: absolute; 352 | top: 0px; 353 | left: 0px; 354 | } 355 | 356 | #eight { 357 | position: absolute; 358 | top: 0px; 359 | left: 26px; 360 | } 361 | 362 | #nine { 363 | position: absolute; 364 | top: 0px; 365 | left: 52px; 366 | } 367 | 368 | #dial_row4 { 369 | position: absolute; 370 | top: 4px; 371 | left: 235px; 372 | width: 78px; 373 | } 374 | 375 | #star { 376 | position: absolute; 377 | top: 0px; 378 | left: 26px; 379 | } 380 | 381 | #zero { 382 | position: absolute; 383 | top: 0px; 384 | left: 0px; 385 | } 386 | 387 | #pound { 388 | position: absolute; 389 | top: 0px; 390 | left: 52px; 391 | } 392 | 393 | #dial_dtmf { 394 | display:none; 395 | } 396 | 397 | #dtmf_digits { 398 | display:none; 399 | } 400 | 401 | #send_dtmf { 402 | display:none; 403 | } 404 | -------------------------------------------------------------------------------- /src/css/thin.css: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | * 4 | * CSS File for the Vicidial WebRTC Phone 5 | * 6 | * Copyright (C) 2016 Michael Cargile 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | ****************************************************************************** 22 | */ 23 | 24 | 25 | 26 | #container { 27 | width: 1085px; 28 | height: 36px; 29 | } 30 | 31 | #main { 32 | width: 1085px; 33 | height: 36px; 34 | position: relative; 35 | top: 2px; 36 | left: 2px; 37 | background-color: #808080; 38 | -webkit-border-radius: 4px; 39 | -moz-border-radius: 4px; 40 | border-radius: 4px; 41 | } 42 | 43 | #logo { 44 | width: 152px; 45 | height: 34px; 46 | background-color: #808080; 47 | position: absolute; 48 | top: 0px; 49 | left: 0px; 50 | -webkit-border-radius: 4px; 51 | -moz-border-radius: 4px; 52 | border-radius: 4px; 53 | border: 0px solid #041830; 54 | } 55 | 56 | #logo_img { 57 | width: 148px; 58 | height: 32px; 59 | position: absolute; 60 | left: 1px; 61 | top: 1px; 62 | background-color: #E0E0E0; 63 | -webkit-border-radius: 4px; 64 | -moz-border-radius: 4px; 65 | border-radius: 4px; 66 | border: 1px solid #041830; 67 | } 68 | 69 | #controls { 70 | width: 249px; 71 | height: 34px; 72 | background-color: #808080; 73 | position: absolute; 74 | top: 1px; 75 | left: 152px; 76 | -webkit-border-radius: 4px; 77 | -moz-border-radius: 4px; 78 | border-radius: 4px; 79 | border: 0px solid #041830; 80 | } 81 | 82 | #registration_control { 83 | width: 166px; 84 | height: 32px; 85 | position: absolute; 86 | left: 2px; 87 | top: 0px; 88 | background-color: #4A698E; 89 | -webkit-border-radius: 4px; 90 | -moz-border-radius: 4px; 91 | border-radius: 4px; 92 | border: 1px solid #041830; 93 | } 94 | 95 | #reg_status { 96 | margin: 4px 4px 4px 4px; 97 | width: 84px; 98 | height: 20px; 99 | text-align: center; 100 | position: absolute; 101 | top: 0px; 102 | left: 0px; 103 | border: 1px solid #2a4a6f; 104 | background: #7691b1; 105 | -webkit-border-radius: 7px; 106 | -moz-border-radius: 7px; 107 | border-radius: 7px; 108 | color: #e0e0e0; 109 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 110 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 111 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 112 | } 113 | 114 | #register { 115 | position: absolute; 116 | left: 90px; 117 | top: 0px; 118 | height: 24px; 119 | } 120 | 121 | #unregister { 122 | position: absolute; 123 | left: 126px; 124 | top: 0px; 125 | height: 24px; 126 | } 127 | 128 | #dial_control { 129 | width: 130px; 130 | height: 32px; 131 | position: absolute; 132 | left: 173px; 133 | top: 0px; 134 | background-color: #4A698E; 135 | -webkit-border-radius: 4px; 136 | -moz-border-radius: 4px; 137 | border-radius: 4px; 138 | border: 1px solid #041830; 139 | } 140 | 141 | #digits { 142 | margin: 4px 4px 4px 4px; 143 | width: 84px; 144 | height: 20px; 145 | text-align: center; 146 | border: 1px solid #2a4a6f; 147 | background: #f0f0f0; 148 | -webkit-border-radius: 7px; 149 | -moz-border-radius: 7px; 150 | border-radius: 7px; 151 | color: #2a4a6f; 152 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 153 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 154 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 155 | } 156 | 157 | #dial { 158 | position: absolute; 159 | left: 92px; 160 | top: 0px; 161 | height: 24px; 162 | } 163 | 164 | #audio_control { 165 | width: 116px; 166 | height: 32px; 167 | position: absolute; 168 | left: 308px; 169 | top: 0px; 170 | background-color: #4A698E; 171 | -webkit-border-radius: 4px; 172 | -moz-border-radius: 4px; 173 | border-radius: 4px; 174 | border: 1px solid #041830; 175 | } 176 | 177 | #mic_mute { 178 | position: absolute; 179 | left: 3px; 180 | top: 0px; 181 | height: 24px; 182 | } 183 | 184 | #vol_up { 185 | position: absolute; 186 | left: 40px; 187 | top: 0px; 188 | height: 24px; 189 | } 190 | 191 | #vol_down { 192 | position: absolute; 193 | left: 77px; 194 | top: 0px; 195 | height: 24px; 196 | } 197 | 198 | 199 | #dialpad { 200 | width: 500px; 201 | height: 34px; 202 | background-color: #4A698E; 203 | position: absolute; 204 | top: 0px; 205 | left: 581px; 206 | border: 1px solid #041830; 207 | -webkit-border-radius: 4px; 208 | -moz-border-radius: 4px; 209 | border-radius: 4px; 210 | } 211 | 212 | .button { 213 | margin-top: 4px; 214 | margin-left: 1px; 215 | margin-right: 0px; 216 | min-width: 30px; 217 | height: 30px; 218 | border: 1px solid #041830; 219 | background: #2a4a6f; 220 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 221 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 222 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 223 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 224 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 225 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 226 | -webkit-border-radius: 6px; 227 | -moz-border-radius: 6px; 228 | border-radius: 6px; 229 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 230 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 231 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 232 | text-shadow: #122e4f 0 1px 0; 233 | color: #e0e0e0; 234 | font-size: 14px; 235 | font-family: helvetica, serif; 236 | text-decoration: none; 237 | vertical-align: middle; 238 | } 239 | .button:hover { 240 | border: 1px solid #041830; 241 | text-shadow: #122e4f 0 1px 0; 242 | background: #2a4b84; 243 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 244 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 245 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 246 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 247 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 248 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 249 | color: #fff; 250 | } 251 | .button:active { 252 | text-shadow: #122e4f 0 1px 0; 253 | border: 1px solid #041830; 254 | background: #243f5e; 255 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 256 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 257 | background: -moz-linear-gradient(top, #687f99, #243f5e); 258 | background: -ms-linear-gradient(top, #687f99, #243f5e); 259 | background: -o-linear-gradient(top, #687f99, #243f5e); 260 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 261 | color: #fff; 262 | } 263 | 264 | .dialpad_button { 265 | min-width: 26px; 266 | height: 26px; 267 | border: 1px solid #041830; 268 | background: #2a4a6f; 269 | background: -webkit-gradient(linear, left top, left bottom, from(#7691b1), to(#2a4a6f)); 270 | background: -webkit-linear-gradient(top, #7691b1, #2a4a6f); 271 | background: -moz-linear-gradient(top, #7691b1, #2a4a6f); 272 | background: -ms-linear-gradient(top, #7691b1, #2a4a6f); 273 | background: -o-linear-gradient(top, #7691b1, #2a4a6f); 274 | background-image: -ms-linear-gradient(top, #7691b1 0%, #2a4a6f 100%); 275 | -webkit-border-radius: 6px; 276 | -moz-border-radius: 6px; 277 | border-radius: 6px; 278 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 279 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 280 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0; 281 | text-shadow: #122e4f 0 1px 0; 282 | color: #e0e0e0; 283 | font-size: 14px; 284 | font-family: helvetica, serif; 285 | text-decoration: none; 286 | vertical-align: middle; 287 | } 288 | .dialpad_button:hover { 289 | border: 1px solid #041830; 290 | text-shadow: #122e4f 0 1px 0; 291 | background: #2a4b84; 292 | background: -webkit-gradient(linear, left top, left bottom, from(#7692bc), to(#2a4b84)); 293 | background: -webkit-linear-gradient(top, #7692bc, #2a4b84); 294 | background: -moz-linear-gradient(top, #7692bc, #2a4b84); 295 | background: -ms-linear-gradient(top, #7692bc, #2a4b84); 296 | background: -o-linear-gradient(top, #7692bc, #2a4b84); 297 | background-image: -ms-linear-gradient(top, #7692bc 0%, #2a4b84 100%); 298 | color: #fff; 299 | } 300 | .dialpad_button:active { 301 | text-shadow: #122e4f 0 1px 0; 302 | border: 1px solid #041830; 303 | background: #243f5e; 304 | background: -webkit-gradient(linear, left top, left bottom, from(#687f99), to(#2a4b84)); 305 | background: -webkit-linear-gradient(top, #687f99, #243f5e); 306 | background: -moz-linear-gradient(top, #687f99, #243f5e); 307 | background: -ms-linear-gradient(top, #687f99, #243f5e); 308 | background: -o-linear-gradient(top, #687f99, #243f5e); 309 | background-image: -ms-linear-gradient(top, #687f99 0%, #243f5e 100%); 310 | color: #fff; 311 | } 312 | 313 | #dial_row1 { 314 | position: absolute; 315 | top: 4px; 316 | left: 4px; 317 | width: 96px; 318 | } 319 | 320 | #one { 321 | position: absolute; 322 | top: 0px; 323 | left: 0px; 324 | } 325 | 326 | #two { 327 | position: absolute; 328 | top: 0px; 329 | left: 32px; 330 | } 331 | 332 | #three { 333 | position: absolute; 334 | top: 0px; 335 | left: 64px; 336 | } 337 | 338 | #dial_row2 { 339 | position: absolute; 340 | top: 4px; 341 | left: 99px; 342 | width: 96px; 343 | } 344 | 345 | #four { 346 | position: absolute; 347 | top: 0px; 348 | left: 0px; 349 | } 350 | 351 | #five { 352 | position: absolute; 353 | top: 0px; 354 | left: 32px; 355 | } 356 | 357 | #six { 358 | position: absolute; 359 | top: 0px; 360 | left: 64px; 361 | } 362 | 363 | #dial_row3 { 364 | position: absolute; 365 | top: 4px; 366 | left: 196px; 367 | width: 96px; 368 | } 369 | 370 | #seven { 371 | position: absolute; 372 | top: 0px; 373 | left: 0px; 374 | } 375 | 376 | #eight { 377 | position: absolute; 378 | top: 0px; 379 | left: 32px; 380 | } 381 | 382 | #nine { 383 | position: absolute; 384 | top: 0px; 385 | left: 64px; 386 | } 387 | 388 | #dial_row4 { 389 | position: absolute; 390 | top: 4px; 391 | left: 293px; 392 | width: 96px; 393 | } 394 | 395 | #star { 396 | position: absolute; 397 | top: 0px; 398 | left: 32px; 399 | } 400 | 401 | #zero { 402 | position: absolute; 403 | top: 0px; 404 | left: 0px; 405 | } 406 | 407 | #pound { 408 | position: absolute; 409 | top: 0px; 410 | left: 64px; 411 | } 412 | 413 | #dial_dtmf { 414 | position: absolute; 415 | top: 4px; 416 | left: 390px; 417 | } 418 | 419 | #dtmf_digits { 420 | position: absolute; 421 | top: 0px; 422 | left: 0px; 423 | width: 44px; 424 | height: 22px; 425 | text-align: center; 426 | border: 1px solid #2a4a6f; 427 | background: #f0f0f0; 428 | -webkit-border-radius: 7px; 429 | -moz-border-radius: 7px; 430 | border-radius: 7px; 431 | color: #2a4a6f; 432 | -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 433 | -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 434 | box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px; 435 | } 436 | 437 | #send_dtmf { 438 | position: absolute; 439 | top: -3px; 440 | right: -98px; 441 | height: 24px; 442 | } 443 | -------------------------------------------------------------------------------- /src/debug/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all 2 | -------------------------------------------------------------------------------- /src/debug/viciphone_access.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/debug/viciphone_access.log -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/favicon.ico -------------------------------------------------------------------------------- /src/images/reg_status_blink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/reg_status_blink.gif -------------------------------------------------------------------------------- /src/images/wp_dial.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_dial.gif -------------------------------------------------------------------------------- /src/images/wp_hangup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_hangup.gif -------------------------------------------------------------------------------- /src/images/wp_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_logo.gif -------------------------------------------------------------------------------- /src/images/wp_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_logo.png -------------------------------------------------------------------------------- /src/images/wp_mic_off.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_mic_off.gif -------------------------------------------------------------------------------- /src/images/wp_mic_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_mic_on.gif -------------------------------------------------------------------------------- /src/images/wp_register_active.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_register_active.gif -------------------------------------------------------------------------------- /src/images/wp_register_inactive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_register_inactive.gif -------------------------------------------------------------------------------- /src/images/wp_speaker_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_speaker_down.gif -------------------------------------------------------------------------------- /src/images/wp_speaker_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_speaker_up.gif -------------------------------------------------------------------------------- /src/images/wp_unregister_active.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_unregister_active.gif -------------------------------------------------------------------------------- /src/images/wp_unregister_inactive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/images/wp_unregister_inactive.gif -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Thank you for choosing ViciPhone.

4 |

In order to use ViciPhone you must use "https://phone1.viciphone.com/viciphone.php" as your Webphone URL.

5 |

If you are using ViciPhone in conjunction with Vicidial you will need to change this setting in ADMIN → System Settings.

6 | 7 | 8 | -------------------------------------------------------------------------------- /src/js/vici_phone.js: -------------------------------------------------------------------------------- 1 | /* 2 | ******************************************************************************* 3 | * 4 | * HTML File for the Vicidial WebRTC Phone 5 | * 6 | * Copyright (C) 2016 Michael Cargile 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | ******************************************************************************* 22 | */ 23 | var debug = debug_enabled; 24 | 25 | var myUserAgent = false; 26 | var myRegisterer = false; 27 | var mySession = false; 28 | var myMediaStream = false; 29 | var myRegUri = false; 30 | var myCallUri = false; 31 | var mySipServer = false; 32 | 33 | var incall = false; 34 | var ringing = false; 35 | var progress = false; 36 | var muted = false; 37 | var caller = ''; 38 | 39 | const dtmfVolume = 0.15; 40 | 41 | // Array of the various UI elements 42 | var uiElements = { 43 | container: document.getElementById('container'), 44 | main: document.getElementById('main'), 45 | audio: document.getElementById('audio'), 46 | logo: document.getElementById('logo'), 47 | controls: document.getElementById('controls'), 48 | registration_control: document.getElementById('registration_control'), 49 | reg_status: document.getElementById('reg_status'), 50 | register: document.getElementById('register'), 51 | unregister: document.getElementById('unregister'), 52 | dial_control: document.getElementById('dial_control'), 53 | digits: document.getElementById('digits'), 54 | dial: document.getElementById('dial'), 55 | audio_control: document.getElementById('audio_control'), 56 | mic_mute: document.getElementById('mic_mute'), 57 | vol_up : document.getElementById('vol_up'), 58 | vol_down: document.getElementById('vol_down'), 59 | dialpad: document.getElementById('dialpad'), 60 | one: document.getElementById('one'), 61 | two: document.getElementById('two'), 62 | three: document.getElementById('three'), 63 | four: document.getElementById('four'), 64 | five: document.getElementById('five'), 65 | six: document.getElementById('six'), 66 | seven: document.getElementById('seven'), 67 | eight: document.getElementById('eight'), 68 | nine: document.getElementById('nine'), 69 | star: document.getElementById('star'), 70 | zero: document.getElementById('zero'), 71 | pound: document.getElementById('pound'), 72 | dial_dtmf: document.getElementById('dial_dtmf'), 73 | dtmf_digits: document.getElementById('dtmf_digits'), 74 | send_dtmf: document.getElementById('send_dtmf'), 75 | debug: document.getElementById('debug'), 76 | reg_icon: document.getElementById('reg_icon'), 77 | unreg_icon: document.getElementById('unreg_icon'), 78 | dial_icon: document.getElementById('dial_icon'), 79 | hangup_icon: document.getElementById('hangup_icon'), 80 | mute_icon: document.getElementById('mute_icon'), 81 | vol_up_icon: document.getElementById('vol_up_icon'), 82 | vol_down_icon: document.getElementById('vol_down_icon') 83 | }; 84 | 85 | // Array of DTMF audio tones 86 | var audioPlayback = { 87 | dtmfZero : new Audio('sounds/0.wav'), 88 | dtmfOne : new Audio('sounds/1.wav'), 89 | dtmfTwo : new Audio('sounds/2.wav'), 90 | dtmfThree : new Audio('sounds/3.wav'), 91 | dtmfFour : new Audio('sounds/4.wav'), 92 | dtmfFive : new Audio('sounds/5.wav'), 93 | dtmfSeven : new Audio('sounds/7.wav'), 94 | dtmfEight : new Audio('sounds/8.wav'), 95 | dtmfNine : new Audio('sounds/9.wav'), 96 | dtmfSix : new Audio('sounds/6.wav'), 97 | dtmfHash : new Audio('sounds/hash.wav'), 98 | dtmfStar : new Audio('sounds/star.wav'), 99 | ring : new Audio('sounds/ringing.mp3'), 100 | progress : new Audio('sounds/progress-na.mp3'), 101 | }; 102 | 103 | // Array of default phrases used when a phrase is not initialized 104 | var defaultPhrases = { 105 | }; 106 | 107 | 108 | var nav = window.navigator; 109 | 110 | window.addEventListener("unload",handleUnload); 111 | 112 | // get the Registration URI object 113 | myRegUri = SIP.UserAgent.makeURI("sip:" + sip_uri); 114 | 115 | var myUserAgentConfig = { 116 | autostart: false, 117 | autostop: true, 118 | contactName: '', 119 | contactParams: { 120 | transport: "wss", 121 | }, 122 | allowLegacyNotifications: true, 123 | authorizationUsername: auth_user, 124 | authorizationPassword: password, 125 | displayName: cid_name, 126 | delegate: { 127 | onInvite, 128 | onConnect, 129 | onDisconnect 130 | }, 131 | forceRport: false, 132 | hackIpInContact: true, 133 | hackAllowUnregisteredOptionTags: false, 134 | hackViaTcp: true, 135 | logBuiltinEnabled: true, 136 | logConfiguration: true, 137 | logLevel: "debug", 138 | noAnswerTimeout: 60, 139 | transportOptions: { 140 | traceSip: true, 141 | server: ws_server, 142 | }, 143 | uri: myRegUri, 144 | userAgentString: 'VICIphone 3.0.0', 145 | }; 146 | 147 | var lang = { 148 | attempting:'Attempting', 149 | connected:'WS Connected', 150 | disconnected:'WS Disconnected', 151 | exten:'Extension', 152 | incall:'Incall', 153 | init:'Initializing...', 154 | redirect:'Redirect', 155 | regFailed:'Reg. Failed', 156 | registering:'Registering', 157 | registered:'Registered', 158 | reject:'Rejected', 159 | ringing:'Ringing', 160 | send:'Send', 161 | trying:'Trying', 162 | unregFailed:'Unreg. Failed', 163 | unregistered:'Unregistered', 164 | unregistering:'Unregistering', 165 | webrtcError:'Something went wrong with WebRTC. Either your browser does not support the necessary WebRTC functions, you did not allow your browser to access the microphone, or there is a configuration issue. Please check your browsers error console for more details. For a list of compatible browsers please vist http://webrtc.org/', 166 | }; 167 | 168 | initialize(); 169 | 170 | 171 | 172 | function initialize() { 173 | // Initialization 174 | debugOut ( '
  displayName: ' + cid_name + "
  uri: " + sip_uri + "
  authorizationUser: " + auth_user + "
  authorizationPassword: " + password + "
  wsServers: " + ws_server ); 175 | 176 | // initialize the language translation 177 | initLanguage(); 178 | 179 | // report which microphone and speakers are available 180 | reportMediaDevices(); 181 | 182 | // configure the audio playbacks 183 | configureAudio(); 184 | 185 | // adjust the display settings 186 | processDisplaySettings(); 187 | 188 | 189 | // set the mySipServer variable based off the sip_uri sent in 190 | mySipServer = sip_uri.replace(/^.*@/,''); 191 | 192 | // add event listeners for the various buttons 193 | addListeners(); 194 | 195 | // set the reg status variable 196 | uiElements.reg_status.value = lang.init; 197 | 198 | myUserAgent = new SIP.UserAgent(myUserAgentConfig); 199 | myUserAgent.start() 200 | .then(() => { 201 | console.log("myUserAgent started"); 202 | 203 | myRegisterer = new SIP.Registerer(myUserAgent); 204 | 205 | // Setup myRegisterer state change handler 206 | myRegisterer.stateChange.addListener((newState) => { 207 | switch (newState) { 208 | case SIP.RegistererState.Registered: 209 | handleRegRegistered(); 210 | break; 211 | case SIP.RegistererState.Unregistered: 212 | handleRegUnregistered(); 213 | break; 214 | case SIP.RegistererState.Terminated: 215 | handleRegTerminated(); 216 | break; 217 | } 218 | }); 219 | 220 | // Send REGISTER 221 | myRegisterer.register() 222 | .then((request) => { 223 | handleRegRegistering(request); 224 | }) 225 | .catch((error) => { 226 | handleRegFailed(error); 227 | }); 228 | 229 | }) 230 | .catch((error) => { 231 | console.error("Failed to start myUserAgent " + error.message); 232 | }); 233 | }; 234 | 235 | function initLanguage() { 236 | if ( langAttempting != '' ) { lang.attempting = langAttempting ; } 237 | if ( langConnected != '' ) { lang.connected = langConnected ; } 238 | if ( langDisconnected != '' ) { lang.disconnected = langDisconnected ; } 239 | if ( langExten != '' ) { lang.exten = langExten ; } 240 | if ( langIncall != '' ) { lang.incall = langIncall ; } 241 | if ( langInit != '' ) { lang.init = langInit ; } 242 | if ( langRedirect != '' ) { lang.redirect = langRedirect ; } 243 | if ( langRegFailed != '' ) { lang.regFailed = langRegFailed ; } 244 | if ( langRegistering != '' ) { lang.registering = langRegistering ; } 245 | if ( langRegistered != '' ) { lang.registered = langRegistered ; } 246 | if ( langReject != '' ) { lang.reject = langReject ; } 247 | if ( langRinging != '' ) { lang.ringing = langRinging ; } 248 | if ( langSend != '' ) { lang.send = langSend ; } 249 | if ( langTrying != '' ) { lang.trying = langTrying ; } 250 | if ( langUnregFailed != '' ) { lang.unregFailed = langUnregFailed ; } 251 | if ( langUnregistered != '' ) { lang.unregistered = langUnregistered ; } 252 | if ( langUnregistering != '' ) { lang.unregistering = langUnregistering ; } 253 | if ( langWebrtcError != '' ) { lang.webrtcError = langWebrtcError ; } 254 | } 255 | 256 | 257 | function onConnect() { 258 | uiElements.reg_status.value = lang.connected; 259 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 260 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 261 | } 262 | 263 | function onDisconnect(error) { 264 | uiElements.reg_status.value = lang.disconnected; 265 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 266 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 267 | if (!error) { debugOut( "User agent stopped" ); } 268 | else { debugOut( error.message ); } 269 | } 270 | 271 | // function called when a SIP INVITE is recieved 272 | function onInvite(invitation) { 273 | debugOut( "INVITE Recieved" ); 274 | 275 | // check if we are in a call already 276 | if ( incall ) { 277 | // we are so reject it 278 | debugOut( 'Recieved INVITE while in a call. Rejecting.' ); 279 | var options = { 280 | statusCode: 486, 281 | reasonPhrase: "Busy Here" 282 | }; 283 | invitation.reject(options); 284 | } else { 285 | mySession = invitation; 286 | 287 | // Setup session state change handler 288 | mySession.stateChange.addListener((state) => { 289 | switch (state) { 290 | case SIP.SessionState.Initial: 291 | handleSessionInitial(); 292 | break; 293 | case SIP.SessionState.Establishing: 294 | handleSessionEstablishing(); 295 | break; 296 | case SIP.SessionState.Established: 297 | handleSessionEstablished(); 298 | break; 299 | case SIP.SessionState.Terminating: 300 | case SIP.SessionState.Terminated: 301 | handleSessionTerminated(); 302 | break; 303 | default: 304 | debugOut("Unknown session state."); 305 | } 306 | }); 307 | 308 | 309 | // we are now so good to process it 310 | 311 | var remoteUri = mySession.remoteIdentity.uri.toString(); 312 | var displayName = mySession.remoteIdentity.displayName; 313 | var regEx1 = /sip:/; 314 | var regEx2 = /@.*$/; 315 | var extension = remoteUri.replace( regEx1 , '' ); 316 | extension = extension.replace( regEx2 , '' ); 317 | caller = extension; 318 | 319 | debugOut( 'Got Invite from <' + extension + '> "' + displayName + '"'); 320 | uiElements.reg_status.value = extension + ' - ' + displayName; 321 | 322 | debugOut( 'Audio Settings: autoGainControl=' + auto_gain + ' echoCancellation=' + echo_can + ' noiseSuppression=' + noise_sup ); 323 | // if auto answer is set answer the call 324 | if ( auto_answer ) { 325 | //incall = true; 326 | debugOut( 'Auto-Answered Call' ); 327 | uiElements.dial_icon.src = 'images/wp_hangup.gif'; 328 | 329 | options = { 330 | sessionDescriptionHandlerOptions: { 331 | constraints: { 332 | audio: { 333 | autoGainControl: auto_gain, 334 | echoCancellation: echo_can, 335 | noiseSuppression: noise_sup, 336 | }, 337 | video: false 338 | } 339 | } 340 | }; 341 | 342 | mySession.accept(options); 343 | } else { 344 | // auto answer not enabled 345 | // ring the phone 346 | ringing = true; 347 | 348 | // start ringing 349 | audioPlayback.ring.play(); 350 | startBlink(); 351 | } 352 | } 353 | } 354 | 355 | 356 | // function called to place an outbound call 357 | function dialNumber() { 358 | // check if currently in a call 359 | if ( incall ) { 360 | debugOut( 'Already in a call' ); 361 | } else { 362 | myCallUri = SIP.UserAgent.makeURI( 'sip:' + uiElements.digits.value + '@' + mySipServer ); 363 | 364 | mySession = new SIP.Inviter(myUserAgent, myCallUri); 365 | 366 | // Setup session state change handler 367 | mySession.stateChange.addListener((state) => { 368 | switch (state) { 369 | case SIP.SessionState.Initial: 370 | handleSessionInitial(); 371 | break; 372 | case SIP.SessionState.Establishing: 373 | handleSessionEstablishing(); 374 | break; 375 | case SIP.SessionState.Established: 376 | handleSessionEstablished(); 377 | break; 378 | case SIP.SessionState.Terminating: 379 | case SIP.SessionState.Terminated: 380 | handleSessionTerminated(); 381 | break; 382 | default: 383 | debugOut("Unknown session state."); 384 | } 385 | }); 386 | 387 | debugOut( 'Audio Settings: autoGainControl=' + auto_gain + ' echoCancellation=' + echo_can + ' noiseSuppression=' + noise_sup ); 388 | // Options including delegate to capture response messages 389 | const inviteOptions = { 390 | requestDelegate: { 391 | onAccept: (response) => { 392 | handleInviteAccept(response); 393 | } 394 | , 395 | onProgress: (response) => { 396 | handleInviteProgress(response); 397 | }, 398 | onRedirect: (response) => { 399 | handleInviteRedirect(response); 400 | }, 401 | onReject: (response) => { 402 | handleInviteReject(response); 403 | }, 404 | onTrying: (response) => { 405 | handleInviteTrying(response); 406 | } 407 | }, 408 | sessionDescriptionHandlerOptions: { 409 | constraints: { 410 | audio: { 411 | autoGainControl: auto_gain, 412 | echoCancellation: echo_can, 413 | noiseSuppression: noise_sup, 414 | }, 415 | video: false 416 | } 417 | } 418 | }; 419 | 420 | mySession.invite(inviteOptions); 421 | 422 | incall = true; 423 | uiElements.reg_status.value = lang.attempting + ' - ' + uiElements.digits.value; 424 | 425 | caller = uiElements.digits.value; 426 | 427 | uiElements.digits.value = ''; 428 | } 429 | 430 | return true; 431 | } 432 | 433 | // called when we get a 2XX message for our outgoing call 434 | function handleInviteAccept(response){ 435 | if (mySession != false) { 436 | debugOut( 'Called party accepted - ' + response.message.statusCode + ":" + response.message.reasonPhrase ); 437 | 438 | incall = true; 439 | 440 | uiElements.reg_status.value = lang.incall + ' - ' + caller; 441 | 442 | // They answered stop ringing 443 | audioPlayback.progress.pause(); 444 | audioPlayback.progress.currentTime = 0; 445 | stopBlink(); 446 | } else { 447 | debugOut( 'Called party accepted but the session has already been terminated - ' + response.message.statusCode + ":" + response.message.reasonPhrase ); 448 | debugOut( 'Is RTCP-MUX set for this phone account?' ); 449 | 450 | incall = false 451 | 452 | uiElements.reg_status.value = lang.registered; 453 | } 454 | 455 | // They answered stop ringing 456 | audioPlayback.progress.pause(); 457 | audioPlayback.progress.currentTime = 0; 458 | stopBlink(); 459 | 460 | } 461 | 462 | // called when we get a 1XX message for our outgoing call 463 | // excludes 100 responses 464 | function handleInviteProgress(response){ 465 | debugOut( 'Called party is ringing - ' + response.message.statusCode + ":" + response.message.reasonPhrase ); 466 | 467 | uiElements.reg_status.value = lang.ringing + ' - ' + caller; 468 | 469 | // start the progress audio 470 | audioPlayback.progress.play(); 471 | startBlink(); 472 | } 473 | 474 | // called when we get a 3XX message for our outgoing call 475 | function handleInviteRedirect(response){ 476 | debugOut( 'Called party redirected the call - ' + response.message.statusCode + ":" + response.message.reasonPhrase ); 477 | 478 | incall = false; 479 | 480 | uiElements.reg_status.value = lang.redirect + ' - ' + caller; 481 | 482 | // stop the progress audio 483 | audioPlayback.progress.pause(); 484 | audioPlayback.progress.currentTime = 0; 485 | stopBlink(); 486 | } 487 | 488 | // called when we get a 4XX, 5XX, 6XX message for our outgoing call 489 | function handleInviteReject(response) { 490 | debugOut( 'Called party rejected the call - ' + response.message.statusCode + ":" + response.message.reasonPhrase ); 491 | 492 | incall = false; 493 | 494 | if (( uiElements.reg_status.value != lang.registered ) && (uiElements.reg_status.value != lang.unregistered)) { 495 | uiElements.reg_status.value = lang.reject + ' (' + response.message.statusCode + " - " + response.message.reasonPhrase + ')'; 496 | } 497 | 498 | // stop the progress audio 499 | audioPlayback.progress.pause(); 500 | audioPlayback.progress.currentTime = 0; 501 | stopBlink(); 502 | } 503 | 504 | // called when we get a 100 message for our outgoing call 505 | function handleInviteTrying(response) { 506 | debugOut( 'Called party is trying the call - ' + response.message.statusCode + ":" + response.message.reasonPhrase ); 507 | 508 | uiElements.reg_status.value = lang.trying + ' - ' + caller; 509 | } 510 | 511 | function handleInviteFailed(error) { 512 | debugOut( "Invite Failed : " + error.message ); 513 | } 514 | 515 | 516 | function handleSessionInitial() { 517 | debugOut( 'Session Initializing' ); 518 | } 519 | 520 | function handleSessionEstablishing() { 521 | debugOut( 'Session Establishing' ); 522 | } 523 | 524 | function handleSessionEstablished() { 525 | debugOut( 'Session Established' ); 526 | 527 | // we are in a call 528 | incall = true; 529 | 530 | // We need to check the peer connection to determine which track was added 531 | var pc = mySession.sessionDescriptionHandler.peerConnection; 532 | 533 | // Gets remote tracks 534 | var remoteStream = new MediaStream(); 535 | pc.getReceivers().forEach(function(receiver) { 536 | if( receiver.track ) { 537 | remoteStream.addTrack(receiver.track); 538 | } 539 | }); 540 | 541 | uiElements.audio.srcObject = remoteStream; 542 | uiElements.audio.play(); 543 | } 544 | 545 | function handleSessionTerminated() { 546 | debugOut( 'Session Terminated' ); 547 | 548 | mySession = false; 549 | 550 | // remove the audio tracks 551 | uiElements.audio.srcObject = null; 552 | uiElements.audio.pause(); 553 | 554 | // if ( myRegisterer.state == "Registered" ) { 555 | // uiElements.reg_status.value = lang.registered; 556 | // uiElements.reg_icon.src = 'images/wp_register_active.gif'; 557 | // uiElements.unreg_icon.src = 'images/wp_unregister_inactive.gif'; 558 | // uiElements.dial_icon.src = 'images/wp_dial.gif'; 559 | // } else { 560 | // uiElements.reg_status.value = lang.unregistered; 561 | // uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 562 | // uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 563 | // uiElements.dial_icon.src = 'images/wp_dial.gif'; 564 | // } 565 | 566 | if ( ringing ) { 567 | // stop ringing 568 | ringing = false; 569 | audioPlayback.ring.pause(); 570 | audioPlayback.ring.currentTime = 0; 571 | } 572 | 573 | stopBlink(); 574 | 575 | // call has ended 576 | incall = false; 577 | } 578 | 579 | function handleUnload() { 580 | // check if in a call 581 | if ( incall ) { 582 | mySession.bye(); 583 | mySession = false; 584 | incall = false; 585 | audioPlayback.ring.pause(); 586 | audioPlayback.ring.currentTime = 0; 587 | } 588 | 589 | return true; 590 | } 591 | 592 | 593 | 594 | // function called when a SIP MESSAGE is recieved 595 | // NOT IMPLEMENTED IN VICIPHONE 596 | function handleMessage(message) { 597 | debugOut( "MESSAGE Recieved. NOT IMPLEMENTED IN VICIPHONE!" ); 598 | } 599 | 600 | // function called when a SIP MESSAGE is recieved 601 | // NOT IMPLEMENTED IN VICIPHONE 602 | function handleNotify(notification) { 603 | debugOut( "NOTIFY Recieved. NOT IMPLEMENTED IN VICIPHONE!" ); 604 | } 605 | 606 | // function called when a SIP MESSAGE is recieved 607 | // NOT IMPLEMENTED IN VICIPHONE 608 | function handleRefer(referral) { 609 | debugOut( "REFER Recieved. NOT IMPLEMENTED IN VICIPHONE!" ); 610 | } 611 | 612 | // function called when a SIP MESSAGE is recieved 613 | // NOT IMPLEMENTED IN VICIPHONE 614 | function handleSubscription(subscription) { 615 | debugOut( "SUBSCRIBE Recieved. NOT IMPLEMENTED IN VICIPHONE!" ); 616 | } 617 | 618 | // called when RegistererState changes to Registered 619 | function handleRegRegistered() { 620 | if ( incall == false ) { 621 | uiElements.reg_status.value = lang.registered; 622 | uiElements.reg_icon.src = 'images/wp_register_active.gif'; 623 | uiElements.unreg_icon.src = 'images/wp_unregister_inactive.gif'; 624 | 625 | // check if we should call an extension upon registration 626 | if (( dial_reg_exten == 1 ) && ( reg_exten != '' )) { 627 | uiElements.digits.value = reg_exten; 628 | dialNumber(); 629 | } 630 | } 631 | } 632 | 633 | // called when RegistererState changes to Unregistered 634 | function handleRegUnregistered() { 635 | uiElements.reg_status.value = lang.unregistered; 636 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 637 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 638 | } 639 | 640 | // called when RegistererState changes to Terminated 641 | function handleRegTerminated() { 642 | uiElements.reg_status.value = lang.unregistered; 643 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 644 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 645 | debugOut( "Registration Terminated" ); 646 | } 647 | 648 | // called when a registration request is sent 649 | function handleRegRegistering(request) { 650 | uiElements.reg_status.value = lang.registering; 651 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 652 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 653 | debugOut( "Register Request Sent:
  " + request.message ); 654 | } 655 | 656 | // called when a registration request fails 657 | function handleRegFailed(error) { 658 | uiElements.reg_status.value = lang.regFailed; 659 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 660 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 661 | debugOut( "Got Registration Error: " + error.message ); 662 | } 663 | 664 | // called when a registration request is sent 665 | function handleRegUnregistering(request) { 666 | uiElements.reg_status.value = lang.unregistering; 667 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 668 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 669 | debugOut( "Un-Register Request Sent:
  " + request.message ); 670 | } 671 | 672 | // called when a registration request fails 673 | function handleRegUnregFailed(error) { 674 | uiElements.reg_status.value = lang.unregFailed; 675 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 676 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 677 | debugOut( "Got Un-Registration Error: " + error.message ); 678 | } 679 | 680 | // called when the registrer button is pressed 681 | function registerButton( ) { 682 | debugOut( 'Register Button Pressed' ); 683 | 684 | // Send REGISTER 685 | myRegisterer.register() 686 | .then((request) => { 687 | handleRegRegistering(request); 688 | }) 689 | .catch((error) => { 690 | handleRegFailed(error); 691 | }); 692 | 693 | return true; 694 | } 695 | 696 | // called when the unregistrer button is pressed 697 | function unregisterButton() { 698 | debugOut( 'Un-Register Button Pressed' ); 699 | 700 | // Send un-REGISTER 701 | myRegisterer.unregister() 702 | .then((request) => { 703 | handleRegUnregistering(request); 704 | }) 705 | .catch((error) => { 706 | handleRegUnregFailed(error); 707 | }); 708 | 709 | return true; 710 | } 711 | 712 | // called to configure the various audio playbacks 713 | function configureAudio( ) { 714 | // adjust the dtmf tone volume 715 | audioPlayback.dtmfZero.volume = dtmfVolume; 716 | audioPlayback.dtmfOne.volume = dtmfVolume; 717 | audioPlayback.dtmfTwo.volume = dtmfVolume; 718 | audioPlayback.dtmfThree.volume = dtmfVolume; 719 | audioPlayback.dtmfFour.volume = dtmfVolume; 720 | audioPlayback.dtmfFive.volume = dtmfVolume; 721 | audioPlayback.dtmfSix.volume = dtmfVolume; 722 | audioPlayback.dtmfSeven.volume = dtmfVolume; 723 | audioPlayback.dtmfEight.volume = dtmfVolume; 724 | audioPlayback.dtmfNine.volume = dtmfVolume; 725 | audioPlayback.dtmfHash.volume = dtmfVolume; 726 | audioPlayback.dtmfStar.volume = dtmfVolume; 727 | 728 | // make the ringing audio loop 729 | audioPlayback.ring.addEventListener('ended', function() { 730 | this.currentTime = 0; 731 | this.play(); 732 | }, false); 733 | 734 | if ( region ) { 735 | var progressFile = 'sounds/progress-' + region + '.mp3'; 736 | debugOut( 'progress audio = ' + progressFile ); 737 | audioPlayback.progress = new Audio(progressFile); 738 | } 739 | 740 | // make the progress audio loop 741 | audioPlayback.progress.addEventListener('ended', function() { 742 | this.currentTime = 0; 743 | this.play(); 744 | }, false) 745 | 746 | return true; 747 | } 748 | 749 | // called to make the reg_status element blink 750 | function startBlink( ) { 751 | uiElements.reg_status.style.backgroundImage = "url('images/reg_status_blink.gif')"; 752 | return true; 753 | } 754 | 755 | // called to make the reg_status element stop blinking 756 | function stopBlink( ) { 757 | uiElements.reg_status.style.backgroundImage = ""; 758 | return true; 759 | } 760 | 761 | // called when one of the dial pad buttons is pressed 762 | function dialPadPressed( digit, mySession ) { 763 | // if the dialpad is hidden do nothing 764 | if ( hide_dialpad ) { 765 | return false; 766 | } 767 | 768 | // play the appropriate dtmf audio sound 769 | switch( digit ) { 770 | case "0": 771 | audioPlayback.dtmfZero.play(); 772 | break; 773 | case "1": 774 | audioPlayback.dtmfOne.play(); 775 | break; 776 | case "2": 777 | audioPlayback.dtmfTwo.play(); 778 | break; 779 | case "3": 780 | audioPlayback.dtmfThree.play(); 781 | break; 782 | case "4": 783 | audioPlayback.dtmfFour.play(); 784 | break; 785 | case "5": 786 | audioPlayback.dtmfFive.play(); 787 | break; 788 | case "6": 789 | audioPlayback.dtmfSix.play(); 790 | break; 791 | case "7": 792 | audioPlayback.dtmfSeven.play(); 793 | break; 794 | case "8": 795 | audioPlayback.dtmfEight.play(); 796 | break; 797 | case "9": 798 | audioPlayback.dtmfNine.play(); 799 | break; 800 | case "*": 801 | audioPlayback.dtmfStar.play(); 802 | break; 803 | case "#": 804 | audioPlayback.dtmfHash.play(); 805 | break; 806 | } 807 | 808 | // check if the mySession is not there 809 | if ( mySession == false ) { 810 | debugOut( 'Adding key press ' + digit + ' to dial digits' ); 811 | uiElements.digits.value = uiElements.digits.value + digit; 812 | } else { 813 | debugOut( 'Sending DTMF ' + digit ); 814 | var options = { 815 | requestOptions: { 816 | body: { 817 | contentDisposition: "render", 818 | contentType: "application/dtmf-relay", 819 | content: "Signal=" + digit + "\r\nDuration=100" 820 | } 821 | } 822 | }; 823 | mySession.info(options); 824 | } 825 | 826 | return true; 827 | } 828 | 829 | async function sendButton( mySession ) { 830 | // if the dialpad is hidden do nothing 831 | if ( hide_dialpad ) { 832 | return false; 833 | } 834 | 835 | // check if the mySession is not there 836 | if ( mySession == false ) { 837 | // TODO give some type of error 838 | } else { 839 | var digits = uiElements.dtmf_digits.value; 840 | for (var i = 0; i < digits.length; i++) { 841 | var digit = digits[i]; 842 | debugOut( 'Sending DTMF ' + digit ); 843 | var options = { 844 | requestOptions: { 845 | body: { 846 | contentDisposition: "render", 847 | contentType: "application/dtmf-relay", 848 | content: "Signal=" + digit + "\r\nDuration=250" 849 | } 850 | } 851 | }; 852 | mySession.info(options); 853 | 854 | // sleep 250ms 855 | await new Promise(r => setTimeout(r, 250)); 856 | 857 | // play the appropriate dtmf audio sound 858 | switch( digit ) { 859 | case "0": 860 | audioPlayback.dtmfZero.play(); 861 | break; 862 | case "1": 863 | audioPlayback.dtmfOne.play(); 864 | break; 865 | case "2": 866 | audioPlayback.dtmfTwo.play(); 867 | break; 868 | case "3": 869 | audioPlayback.dtmfThree.play(); 870 | break; 871 | case "4": 872 | audioPlayback.dtmfFour.play(); 873 | break; 874 | case "5": 875 | audioPlayback.dtmfFive.play(); 876 | break; 877 | case "6": 878 | audioPlayback.dtmfSix.play(); 879 | break; 880 | case "7": 881 | audioPlayback.dtmfSeven.play(); 882 | break; 883 | case "8": 884 | audioPlayback.dtmfEight.play(); 885 | break; 886 | case "9": 887 | audioPlayback.dtmfNine.play(); 888 | break; 889 | case "*": 890 | audioPlayback.dtmfStar.play(); 891 | break; 892 | case "#": 893 | audioPlayback.dtmfHash.play(); 894 | break; 895 | } 896 | 897 | } 898 | 899 | uiElements.dtmf_digits.value = ''; 900 | } 901 | 902 | return true; 903 | } 904 | 905 | 906 | 907 | function dialButton() { 908 | // check if in a call 909 | if ( incall ) { 910 | // we are so they hung up the call 911 | debugOut( 'Hangup Button Pressed' ); 912 | uiElements.dial_icon.src = 'images/wp_dial.gif'; 913 | hangupCall(); 914 | } else { 915 | // we are not 916 | 917 | // check if ringing 918 | if ( ringing ) { 919 | // we are ringing 920 | // stop the ringing 921 | ringing = false; 922 | stopBlink(); 923 | audioPlayback.ring.pause(); 924 | audioPlayback.ring.currentTime = 0; 925 | 926 | //incall = true; 927 | debugOut( 'Answered Call' ); 928 | uiElements.dial_icon.src = 'images/wp_hangup.gif'; 929 | 930 | options = { 931 | sessionDescriptionHandlerOptions: { 932 | constraints: { 933 | audio: { 934 | autoGainControl: true, 935 | echoCancellation: true, 936 | noiseSuppression: true, 937 | }, 938 | video: false 939 | } 940 | } 941 | }; 942 | 943 | mySession.accept(options); 944 | 945 | } else { 946 | // not in a call and the phone is not ringing 947 | debugOut( 'Dial Button Pressed' ); 948 | // make sure the dial box is not hidden 949 | if ( !hide_dialbox ) { 950 | uiElements.dial_icon.src = 'images/wp_hangup.gif'; 951 | dialNumber(); 952 | } 953 | } 954 | } 955 | 956 | return true; 957 | } 958 | 959 | function muteButton() { 960 | // if the button is hidden do nothing 961 | if ( hide_mute ) { 962 | return false; 963 | } 964 | 965 | // check if in a call 966 | if ( incall ) { 967 | if ( muted ) { 968 | // call is currently muted 969 | // unmute it 970 | muted = false; 971 | debugOut( 'Un-Mute Button Pressed' ); 972 | uiElements.mute_icon.src = 'images/wp_mic_on.gif'; 973 | } else { 974 | // call is not muted 975 | // mute it 976 | muted = true; 977 | debugOut( 'Mute Button Pressed' ); 978 | uiElements.mute_icon.src = 'images/wp_mic_off.gif'; 979 | } 980 | 981 | // find all the tracks and toggle them. 982 | var pc = mySession.sessionDescriptionHandler.peerConnection; 983 | 984 | if (pc.getSenders) { 985 | pc.getSenders().forEach(function (sender) { 986 | if (sender.track) { 987 | console.log( sender.track.getCapabilities() ); 988 | 989 | sender.track.enabled = !muted; 990 | } 991 | }); 992 | } else { 993 | pc.getLocalStreams().forEach(function (stream) { 994 | stream.getAudioTracks().forEach(function (track) { 995 | console.log( track.getCapabilities() ); 996 | 997 | track.enabled = !muted; 998 | }); 999 | stream.getVideoTracks().forEach(function (track) { 1000 | console.log( track.getCapabilities() ); 1001 | 1002 | track.enabled = !muted; 1003 | }); 1004 | }); 1005 | } 1006 | 1007 | } else { 1008 | debugOut( 'Mute Button Pressed But Not In Call' ); 1009 | uiElements.mute_icon.src = 'images/wp_mic_on.gif'; 1010 | muted = false; 1011 | } 1012 | 1013 | return true; 1014 | } 1015 | 1016 | function volumeUpButton() { 1017 | // if the volume buttons are hidden do nothing 1018 | if ( hide_volume ) { 1019 | return false; 1020 | } 1021 | 1022 | debugOut( 'Volume Up Button Pressed' ); 1023 | adjustVolume(0.1); 1024 | 1025 | return true; 1026 | } 1027 | 1028 | function volumeDownButton() { 1029 | // if the volume buttons are hidden do nothing 1030 | if ( hide_volume ) { 1031 | return false; 1032 | } 1033 | debugOut( 'Volume Down Button Pressed' ); 1034 | adjustVolume(-0.1); 1035 | 1036 | return true; 1037 | } 1038 | 1039 | function adjustVolume( value ) { 1040 | volume = uiElements.audio.volume; 1041 | debugOut( 'Current Volume = ' + Math.round(volume * 100) + '%'); 1042 | new_volume = volume + value; 1043 | if ( new_volume > 1 ) { 1044 | debugOut( 'Volume is maxed' ); 1045 | } else if ( new_volume < 0 ) { 1046 | debugOut( 'Volume is already 0' ); 1047 | } else { 1048 | volume = new_volume; 1049 | } 1050 | if ( volume < 0 ) { volume = 0; } 1051 | if ( volume > 1 ) { volume = 1; } 1052 | debugOut( 'New Volume = ' + Math.round(volume * 100) + '%' ); 1053 | uiElements.audio.volume = volume; 1054 | 1055 | return true; 1056 | } 1057 | 1058 | function hangupCall() { 1059 | // check if in a call 1060 | if ( incall ) { 1061 | if ( mySession != false ) { 1062 | if ( mySession.state == SIP.SessionState.Established ) { 1063 | mySession.bye(); 1064 | } else if ( mySession.state == SIP.SessionState.Establishing ) { 1065 | mySession.cancel(); 1066 | } 1067 | } 1068 | mySession = false; 1069 | incall = false; 1070 | audioPlayback.ring.pause(); 1071 | audioPlayback.ring.currentTime = 0; 1072 | audioPlayback.progress.pause(); 1073 | audioPlayback.progress.currentTime = 0; 1074 | if ( myRegisterer.state == "Registered" ) { 1075 | uiElements.reg_status.value = lang.registered; 1076 | uiElements.reg_icon.src = 'images/wp_register_active.gif'; 1077 | uiElements.unreg_icon.src = 'images/wp_unregister_inactive.gif'; 1078 | uiElements.dial_icon.src = 'images/wp_dial.gif'; 1079 | } else { 1080 | uiElements.reg_status.value = lang.unregistered; 1081 | uiElements.reg_icon.src = 'images/wp_register_inactive.gif'; 1082 | uiElements.unreg_icon.src = 'images/wp_unregister_active.gif'; 1083 | uiElements.dial_icon.src = 'images/wp_dial.gif'; 1084 | } 1085 | } else { 1086 | debugOut( 'Attempt to hang up non-existant call' ); 1087 | } 1088 | 1089 | return true; 1090 | } 1091 | 1092 | function handleInboundRefer() { 1093 | debugOut( 'Session Refer Event Fired' ); 1094 | } 1095 | 1096 | function WebRTCError() { 1097 | alert( 'Something went wrong with WebRTC. Either your browser does not support the necessary WebRTC functions, you did not allow your browser to access the microphone, or there is a configuration issue. Please check your browsers error console for more details. For a list of compatible browsers please vist http://webrtc.org/'); 1098 | } 1099 | 1100 | 1101 | 1102 | function processDisplaySettings() { 1103 | if ( hide_dialpad ) { 1104 | debugOut("Hiding Dialpad"); 1105 | uiElements.dialpad.setAttribute("hidden", true); 1106 | uiElements.main.style.width = '265px'; 1107 | } 1108 | if ( hide_dialbox ) { 1109 | debugOut("Hiding Dialbox"); 1110 | uiElements.digits.setAttribute("hidden", true); 1111 | } 1112 | if ( hide_mute ) { 1113 | debugOut("Hiding Mute Button"); 1114 | uiElements.mic_mute.setAttribute("hidden", true); 1115 | } 1116 | if ( hide_volume ) { 1117 | debugOut("Hiding Volume Buttons"); 1118 | uiElements.vol_down.setAttribute("hidden", true); 1119 | uiElements.vol_up.setAttribute("hidden", true); 1120 | } 1121 | } 1122 | 1123 | function debugOut( string ) { 1124 | // chekc if debug is enabled 1125 | if ( debug ) { 1126 | // format the date string 1127 | var date; 1128 | date = new Date(); 1129 | date = date.getFullYear() + '-' + 1130 | ('00' + (date.getMonth()+1)).slice(-2) + '-' + 1131 | ('00' + date.getDate()).slice(-2) + ' ' + 1132 | ('00' + date.getHours()).slice(-2) + ':' + 1133 | ('00' + date.getMinutes()).slice(-2) + ':' + 1134 | ('00' + date.getSeconds()).slice(-2); 1135 | 1136 | // add the debug string to the debug element 1137 | uiElements.debug.innerHTML = uiElements.debug.innerHTML + date + ' => ' + string + '
'; 1138 | } else { 1139 | return false; 1140 | } 1141 | } 1142 | 1143 | async function reportMediaDevices() { 1144 | let stream = null; 1145 | try { 1146 | stream = await navigator.mediaDevices.getUserMedia({video: false, audio: true}); 1147 | } catch (err) { 1148 | // TODO handle error 1149 | } 1150 | 1151 | if (!nav.mediaDevices || !nav.mediaDevices.enumerateDevices) { 1152 | debugOut ("enumerateDevices() not supported."); 1153 | } else { 1154 | var audioInDevices = ""; 1155 | var audioOutDevices = ""; 1156 | nav.mediaDevices.enumerateDevices() 1157 | .then(function(devices) { 1158 | devices.forEach(function(device) { 1159 | if ( device.kind == 'audioinput' ) { 1160 | audioInDevices = audioInDevices + "
  " + device.label + "(" + device.deviceId + ")" ; 1161 | } 1162 | if ( device.kind == 'audiooutput' ) { 1163 | audioOutDevices = audioOutDevices + "
  " + device.label + "(" + device.deviceId + ")"; 1164 | } 1165 | //debugOut(device.kind + ": " + device.label + " id = " + device.deviceId); 1166 | }); 1167 | 1168 | debugOut( "Audio Input Devices: " + audioInDevices ); 1169 | debugOut( "Audio Output Devices: " + audioOutDevices ); 1170 | }) 1171 | .catch(function(err) { 1172 | debugOut(err.name + ": " + err.message); 1173 | }); 1174 | } 1175 | } 1176 | 1177 | function addListeners() { 1178 | // Dial pad keys 1179 | uiElements.one.addEventListener("click", function() { dialPadPressed('1',mySession) } ); 1180 | uiElements.two.addEventListener("click", function() { dialPadPressed('2',mySession) } ); 1181 | uiElements.three.addEventListener("click", function() { dialPadPressed('3',mySession) } ); 1182 | uiElements.four.addEventListener("click", function() { dialPadPressed('4',mySession) } ); 1183 | uiElements.five.addEventListener("click", function() { dialPadPressed('5',mySession) } ); 1184 | uiElements.six.addEventListener("click", function() { dialPadPressed('6',mySession) } ); 1185 | uiElements.seven.addEventListener("click", function() { dialPadPressed('7',mySession) } ); 1186 | uiElements.eight.addEventListener("click", function() { dialPadPressed('8',mySession) } ); 1187 | uiElements.nine.addEventListener("click", function() { dialPadPressed('9',mySession) } ); 1188 | uiElements.zero.addEventListener("click", function() { dialPadPressed('0',mySession) } ); 1189 | uiElements.star.addEventListener("click", function() { dialPadPressed('*',mySession) } ); 1190 | uiElements.pound.addEventListener("click", function() { dialPadPressed('#',mySession) } ); 1191 | 1192 | // Send DTMF button 1193 | uiElements.send_dtmf.addEventListener("click", function() { sendButton(mySession) } ); 1194 | 1195 | // Dial Button 1196 | uiElements.dial.addEventListener("click", function() { dialButton() } ); 1197 | 1198 | // Mute Button 1199 | uiElements.mic_mute.addEventListener("click", function() { muteButton() } ); 1200 | 1201 | // Volume Buttons 1202 | uiElements.vol_up.addEventListener("click", function() { volumeUpButton() } ); 1203 | uiElements.vol_down.addEventListener("click", function() { volumeDownButton() } ); 1204 | 1205 | // Register Button 1206 | uiElements.register.addEventListener("click", function() { registerButton( ) } ); 1207 | 1208 | // Unregister Button 1209 | uiElements.unregister.addEventListener("click", function() { unregisterButton( ) } ); 1210 | } 1211 | -------------------------------------------------------------------------------- /src/sounds/0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/0.wav -------------------------------------------------------------------------------- /src/sounds/1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/1.wav -------------------------------------------------------------------------------- /src/sounds/2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/2.wav -------------------------------------------------------------------------------- /src/sounds/3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/3.wav -------------------------------------------------------------------------------- /src/sounds/4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/4.wav -------------------------------------------------------------------------------- /src/sounds/5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/5.wav -------------------------------------------------------------------------------- /src/sounds/6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/6.wav -------------------------------------------------------------------------------- /src/sounds/7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/7.wav -------------------------------------------------------------------------------- /src/sounds/8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/8.wav -------------------------------------------------------------------------------- /src/sounds/9.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/9.wav -------------------------------------------------------------------------------- /src/sounds/hash.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/hash.wav -------------------------------------------------------------------------------- /src/sounds/progress-eu.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/progress-eu.mp3 -------------------------------------------------------------------------------- /src/sounds/progress-na.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/progress-na.mp3 -------------------------------------------------------------------------------- /src/sounds/progress-uk.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/progress-uk.mp3 -------------------------------------------------------------------------------- /src/sounds/ringing.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/ringing.mp3 -------------------------------------------------------------------------------- /src/sounds/star.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vicimikec/ViciPhone/24e98fccfa7b7079fff970e02fca5f002ac1f2cc/src/sounds/star.wav -------------------------------------------------------------------------------- /src/viciphone.appcache: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | CACHE: 3 | NETWORK: 4 | * 5 | FALLBACK: 6 | -------------------------------------------------------------------------------- /src/viciphone.php: -------------------------------------------------------------------------------- 1 | "; 88 | echo "alert('Referring URL ( $base_referring_url ) is not encrypted. VICIphone cannot load without encryption. Please make sure you are using the correct URL.')"; 89 | echo ""; 90 | exit; 91 | } 92 | 93 | 94 | // whether debug should be enabled 95 | $debug_enabled = false; 96 | 97 | // sip connection info 98 | $cid_name = "$phone_login"; 99 | $sip_uri = "$phone_login@$server_ip"; 100 | $auth_user = "$phone_login"; 101 | $password = "$phone_pass"; 102 | 103 | // process options 104 | $options_array = explode("--", $options); 105 | 106 | // DEBUG options 107 | if ( in_array( "DEBUG" , $options_array ) ) { 108 | $debug_enabled = true; 109 | } else { 110 | // default to enabled 111 | $debug_enabled = false; 112 | } 113 | 114 | // display restriction options 115 | // whether to disable the dialpad 116 | if ( in_array( "DIALPAD_N" , $options_array ) ) { 117 | $hide_dialpad = true; 118 | } else { 119 | // default to enabled 120 | $hide_dialpad = false; 121 | } 122 | // whether to disable the dial box 123 | if ( in_array( "DIALBOX_N" , $options_array ) ) { 124 | $hide_dialbox = true; 125 | } else { 126 | // default to enabled 127 | $hide_dialbox = false; 128 | } 129 | // whether to disable the mute button 130 | if ( in_array( "MUTE_N" , $options_array ) ) { 131 | $hide_mute = true; 132 | } else { 133 | // default to enabled 134 | $hide_mute = false; 135 | } 136 | // whether to disable the volume buttons 137 | if ( in_array( "VOLUME_N" , $options_array ) ) { 138 | $hide_volume = true; 139 | } else { 140 | // default to enabled 141 | $hide_volume = false; 142 | } 143 | 144 | // behavior options 145 | // whether to enable auto answer 146 | if ( in_array( "AUTOANSWER_Y" , $options_array ) ) { 147 | $auto_answer = true; 148 | } else { 149 | $auto_answer = false; 150 | } 151 | 152 | // WEBSOCKET url 153 | $ws_server = ''; 154 | 155 | // Layout file handling 156 | $layout = ''; 157 | 158 | // general settings 159 | $settings = ''; 160 | 161 | // session id 162 | $session_id = ''; 163 | 164 | foreach( $options_array as $value ) { 165 | if ( strpos( $value, 'WEBSOCKETURL' ) !== false ) { 166 | $ws_server = $value; 167 | $ws_server = str_replace( 'WEBSOCKETURL', '', $ws_server ); 168 | } 169 | 170 | if ( strpos( $value, 'WEBPHONELAYOUT' ) !== false ) { 171 | $layout = $value; 172 | $layout = str_replace( 'WEBPHONELAYOUT', '', $layout ); 173 | } 174 | 175 | if ( strpos( $value, 'SETTINGS' ) !== false ) { 176 | $settings = $value; 177 | $settings = str_replace( 'SETTINGS', '', $settings ); 178 | } 179 | 180 | if ( strpos( $value, 'SESSION' ) !== false ) { 181 | $session_id = $value; 182 | $session_id = str_replace( 'SESSION', '', $session_id ); 183 | } 184 | } 185 | 186 | 187 | if ( $layout == '' ) { 188 | # layout is blank use the default 189 | $layout = 'css/default.css'; 190 | } elseif ( preg_match('#^https?://#i', $layout) === 1 ) { 191 | # layout begins with http:// or https:// so it is a link 192 | # do nothing 193 | } elseif ( preg_match('#^css/#i', $layout) === 1 ) { 194 | # layout begins with css/ 195 | if ( preg_match('#\.css$#i', $layout) === 1 ) { 196 | # layout ends in .css 197 | # do nothing 198 | } else { 199 | # append .css to the layout 200 | $layout .= ".css"; 201 | } 202 | } elseif ( preg_match('#\.css$#i', $layout) === 1 ) { 203 | # layout ends in .css 204 | $layout = "css/" . $layout; 205 | } else { 206 | $layout = "css/" . $layout . ".css"; 207 | } 208 | # sanitize the layout to try to prevent XSS 209 | $layout = filter_var($layout, FILTER_SANITIZE_URL ); 210 | 211 | # build the settings array 212 | $settings_array = explode('\n',$settings); 213 | foreach( $settings_array as $line ) { 214 | $key = strstr( $line, ":", true ); 215 | $value = strstr( $line, ":" ); 216 | $value = preg_replace( '/:/', '', $value ); 217 | $value = preg_replace( '/"/', '', $value ); 218 | 219 | if ( $key == 'autoGain' ) { $auto_gain_control = $value; } 220 | if ( $key == 'echoCan' ) { $echo_cancellation = $value; } 221 | if ( $key == 'noiseSup' ) { $noise_suppression = $value; } 222 | if ( $key == 'dialRegExten' ) { $dial_reg_exten = $value; } 223 | if ( $key == 'progReg' ) { $progress_region = $value; } 224 | if ( $key == 'langAttempting' ) { $langAttempting = $value; } 225 | if ( $key == 'langConnected' ) { $langConnected = $value; } 226 | if ( $key == 'langDisconnected' ) { $langDisconnected = $value; } 227 | if ( $key == 'langExten' ) { $langExten = $value; } 228 | if ( $key == 'langIncall' ) { $langIncall = $value; } 229 | if ( $key == 'langInit' ) { $langInit = $value; } 230 | if ( $key == 'langRedirect' ) { $langRedirect = $value; } 231 | if ( $key == 'langRegFailed' ) { $langRegFailed = $value; } 232 | if ( $key == 'langRegistering' ) { $langRegistering = $value; } 233 | if ( $key == 'langRegistered' ) { $langRegistered = $value; } 234 | if ( $key == 'langReject' ) { $langReject = $value; } 235 | if ( $key == 'langRinging' ) { $langRinging = $value; } 236 | if ( $key == 'langSend' ) { $langSend = $value; } 237 | if ( $key == 'langTrying' ) { $langTrying = $value; } 238 | if ( $key == 'langUnregFailed' ) { $langUnregFailed = $value; } 239 | if ( $key == 'langUnregistered' ) { $langUnregistered = $value; } 240 | if ( $key == 'langUnregistering' ) { $langUnregistering = $value; } 241 | if ( $key == 'langWebrtcError' ) { $langWebrtcError = $value; } 242 | } 243 | 244 | 245 | // call the template 246 | require_once('vp_template.php'); 247 | ?> 248 | -------------------------------------------------------------------------------- /src/vp_int_example.php: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /src/vp_interpreter.php: -------------------------------------------------------------------------------- 1 | 44 | 45 | -------------------------------------------------------------------------------- /src/vp_template.php: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 26 | Vicidial Web Phone 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 | 36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 |
50 |
51 | 52 | 53 | 54 |
55 |
56 | 57 | 58 |
59 |
60 | 61 | 62 | 63 |
64 |
65 | 66 | 67 | 68 |
69 |
70 | 71 | 72 | 73 |
74 |
75 | 76 | 77 | 78 |
79 |
80 | 81 | 82 | 83 |
84 |
85 | 86 | 87 | 88 |
89 |
90 | 91 | 92 |
93 |
94 | 95 | 96 |
97 | 98 | 99 |
100 | 101 | 102 | 103 |
104 | 105 | 106 | 107 | 108 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | --------------------------------------------------------------------------------