• Guest
HabraHabr
  • Main
  • Users

  • Development
    • Programming
    • Information Security
    • Website development
    • JavaScript
    • Game development
    • Open source
    • Developed for Android
    • Machine learning
    • Abnormal programming
    • Java
    • Python
    • Development of mobile applications
    • Analysis and design of systems
    • .NET
    • Mathematics
    • Algorithms
    • C#
    • System Programming
    • C++
    • C
    • Go
    • PHP
    • Reverse engineering
    • Assembler
    • Development under Linux
    • Big Data
    • Rust
    • Cryptography
    • Entertaining problems
    • Testing of IT systems
    • Testing Web Services
    • HTML
    • Programming microcontrollers
    • API
    • High performance
    • Developed for iOS
    • CSS
    • Industrial Programming
    • Development under Windows
    • Image processing
    • Compilers
    • FPGA
    • Professional literature
    • OpenStreetMap
    • Google Chrome
    • Data Mining
    • PostgreSQL
    • Development of robotics
    • Visualization of data
    • Angular
    • ReactJS
    • Search technologies
    • Debugging
    • Test mobile applications
    • Browsers
    • Designing and refactoring
    • IT Standards
    • Solidity
    • Node.JS
    • Git
    • LaTeX
    • SQL
    • Haskell
    • Unreal Engine
    • Unity3D
    • Development for the Internet of things
    • Functional Programming
    • Amazon Web Services
    • Google Cloud Platform
    • Development under AR and VR
    • Assembly systems
    • Version control systems
    • Kotlin
    • R
    • CAD/CAM
    • Customer Optimization
    • Development of communication systems
    • Microsoft Azure
    • Perfect code
    • Atlassian
    • Visual Studio
    • NoSQL
    • Yii
    • Mono и Moonlight
    • Parallel Programming
    • Asterisk
    • Yandex API
    • WordPress
    • Sports programming
    • Lua
    • Microsoft SQL Server
    • Payment systems
    • TypeScript
    • Scala
    • Google API
    • Development of data transmission systems
    • XML
    • Regular expressions
    • Development under Tizen
    • Swift
    • MySQL
    • Geoinformation services
    • Global Positioning Systems
    • Qt
    • Dart
    • Django
    • Development for Office 365
    • Erlang/OTP
    • GPGPU
    • Eclipse
    • Maps API
    • Testing games
    • Browser Extensions
    • 1C-Bitrix
    • Development under e-commerce
    • Xamarin
    • Xcode
    • Development under Windows Phone
    • Semantics
    • CMS
    • VueJS
    • GitHub
    • Open data
    • Sphinx
    • Ruby on Rails
    • Ruby
    • Symfony
    • Drupal
    • Messaging Systems
    • CTF
    • SaaS / S+S
    • SharePoint
    • jQuery
    • Puppet
    • Firefox
    • Elm
    • MODX
    • Billing systems
    • Graphical shells
    • Kodobred
    • MongoDB
    • SCADA
    • Hadoop
    • Gradle
    • Clojure
    • F#
    • CoffeeScript
    • Matlab
    • Phalcon
    • Development under Sailfish OS
    • Magento
    • Elixir/Phoenix
    • Microsoft Edge
    • Layout of letters
    • Development for OS X
    • Forth
    • Smalltalk
    • Julia
    • Laravel
    • WebGL
    • Meteor.JS
    • Firebird/Interbase
    • SQLite
    • D
    • Mesh-networks
    • I2P
    • Derby.js
    • Emacs
    • Development under Bada
    • Mercurial
    • UML Design
    • Objective C
    • Fortran
    • Cocoa
    • Cobol
    • Apache Flex
    • Action Script
    • Joomla
    • IIS
    • Twitter API
    • Vkontakte API
    • Facebook API
    • Microsoft Access
    • PDF
    • Prolog
    • GTK+
    • LabVIEW
    • Brainfuck
    • Cubrid
    • Canvas
    • Doctrine ORM
    • Google App Engine
    • Twisted
    • XSLT
    • TDD
    • Small Basic
    • Kohana
    • Development for Java ME
    • LiveStreet
    • MooTools
    • Adobe Flash
    • GreaseMonkey
    • INFOLUST
    • Groovy & Grails
    • Lisp
    • Delphi
    • Zend Framework
    • ExtJS / Sencha Library
    • Internet Explorer
    • CodeIgniter
    • Silverlight
    • Google Web Toolkit
    • CakePHP
    • Safari
    • Opera
    • Microformats
    • Ajax
    • VIM
  • Administration
    • System administration
    • IT Infrastructure
    • *nix
    • Network technologies
    • DevOps
    • Server Administration
    • Cloud computing
    • Configuring Linux
    • Wireless technologies
    • Virtualization
    • Hosting
    • Data storage
    • Decentralized networks
    • Database Administration
    • Data Warehousing
    • Communication standards
    • PowerShell
    • Backup
    • Cisco
    • Nginx
    • Antivirus protection
    • DNS
    • Server Optimization
    • Data recovery
    • Apache
    • Spam and antispam
    • Data Compression
    • SAN
    • IPv6
    • Fidonet
    • IPTV
    • Shells
    • Administering domain names
  • Design
    • Interfaces
    • Web design
    • Working with sound
    • Usability
    • Graphic design
    • Design Games
    • Mobile App Design
    • Working with 3D-graphics
    • Typography
    • Working with video
    • Work with vector graphics
    • Accessibility
    • Prototyping
    • CGI (graphics)
    • Computer Animation
    • Working with icons
  • Control
    • Careers in the IT industry
    • Project management
    • Development Management
    • Personnel Management
    • Product Management
    • Start-up development
    • Managing the community
    • Service Desk
    • GTD
    • IT Terminology
    • Agile
    • Business Models
    • Legislation and IT-business
    • Sales management
    • CRM-systems
    • Product localization
    • ECM / EDS
    • Freelance
    • Venture investments
    • ERP-systems
    • Help Desk Software
    • Media management
    • Patenting
    • E-commerce management
    • Creative Commons
  • Marketing
    • Conferences
    • Promotion of games
    • Internet Marketing
    • Search Engine Optimization
    • Web Analytics
    • Monetize Web services
    • Content marketing
    • Monetization of IT systems
    • Monetize mobile apps
    • Mobile App Analytics
    • Growth Hacking
    • Branding
    • Monetize Games
    • Display ads
    • Contextual advertising
    • Increase Conversion Rate
  • Sundry
    • Reading room
    • Educational process in IT
    • Research and forecasts in IT
    • Finance in IT
    • Hakatonas
    • IT emigration
    • Education abroad
    • Lumber room
    • I'm on my way

Pavel 2.0: Reptiloid Consultant on JS, node.js with Sockets and Telephony

So our INTERCOM’18 has died down, with preference and business cases. As usual, the entrance to the conference was paid: anyone could buy tickets for the TimePad at full price, or get a discount from a reptilian consultant right on the site . Last year, it worked like a familiar callback: you leave the phone in a special form, Paul calls you in a minute and asks questions; the more correct answers, the higher the discount. This time we decided to change the mechanics, making it more difficult both technically and in terms of issues. Under the cut - Pavlik's guts 2.? with the current node and web sockets, do not forget to wear workwear before opening.
 

Pavel 2.0: Reptiloid Consultant on JS, node.js with Sockets and Telephony
 
intercomconf.com from the desktop browser, in the lower right corner Pavlik “wakes up” in the form of a chat and offers to play a game. Enter the number, click "Here is my number" - after that Pavel raises the session between your browser and our backend.
 
 

 
 
If everything has successfully risen and your number has not yet participated in the drawing, then Pavel will offer to call 8-800. Here the Voximplant cloud is already entering and the quiz starts:
 
 

 
Answer: deadline /deadline. The basis taken meme 3r340. This is fine
.

 
 
Yes, the puzzles were like this. Three attempts were made for each question: first there was a “complex” picture, then simpler and at the end the simplest. The first attempts gave the most points; after 5 puzzles, Pavel counted up the points and either gave a free ticket or a 10% -30% discount.
 
 
At the same time, our reptiloid is smart enough: it gave error messages (if you entered the phone number incorrectly, for example), determined that the number was already participating in the drawing (“I see the familiar number on the screen of my non-existing mobile phone. One attempt in one hand - these are the rules. ") And, most importantly, correlated the browser and the cloud. How did this bold IVR work?
 
 

In the mouth
madness
Reptiloid


 
3r361.
 
Answer: call center. Nuff said.
 
 
Speaking dryly, Paul 2.0 is an IVR running in our cloud. Therefore, all reptiloid logic should be spelled out in a JS script, right? Yes, but no.
 
 
The second version of Pavel is synchronized with the client’s browser: Pavel shows the rebuses on the website, and he hears your answers on the phone, depending on which pictures are replaced and the result is displayed. At first glance, such an interaction could be realized with the help of our HTTP API 3r35757. :
 
 
first, the browser would run the script using the 3r3381 method. StartScenarios
. In response, the method gives the parameters media_session_access_url and media_session_access_secure_url which contain URLs for HTTP and HTTPS, respectively;
 
a running script could be communicated using the obtained URLs;
 
the script would tell the browser which pictures to use and update the score using the 3r3-300 method. httpRequestAsync
.
 
 
But how to "catch" a custom browser? Indeed, in 3r3-300. httpRequestAsync
You must pass a unique URL. And yes, pictures - they also need to be stored somewhere.
 
 
Therefore, in addition to the cloud JS-script, we used our backend on express.js paired with socket.io : when the visitor entered the number, the browser gave this number to the http http, after which the http session turned into a session on web sockets. As a result, the script constantly communicated with the backend via http, and already the backend used web sockets to quickly transfer pictures and points to the browser.
 
 
In part of the web sockets, the backend looked like this: [/b]
3r3119.

 
But still, most of the logic was stored in the script. Consider a reptiloid from this side
 
 

We go on the scenario


 
3r3133.
 
Answer: machine learning /machine learning. Taken from Instagram3r3138. Arnie himself
.

 
 
From the obvious: be sure to connect the recognition module 3r3145. ASR
.
 
3r33232. require (Modules.ASR);
 
From interesting:
 
 
in the script was an object questions with all the answers and file names .jpg ;
 
each time the script was run, the questions were mixed using the helper function 3r-3263. shuffle [/b] :
show code [/b]
3r3173.
 
A “top-level” handler for an incoming call (3r3-3181. CallAlerting
) Checks the phone for uniqueness, and also contains handlers for connecting and ending a call. Just inside onCallConnected there is an appeal to the backend (read, to socketio):
 
show code [/b]
3r3192.
 
just above, is seen. startGame , in it just the questions are mixed up, chopped up and sent to the backend along with the picture indices:
 
show code [/b]
 
startASR creates an instance of ASR and indicates the preferred recognition dictionary. When a player pronounces the answer, function stops the ASR and starts processing what was heard - onRecognitionResult ;
 
onRecognitionResult removes the excess from the answer:
 
3r33232. let rr = e[0].replace ("this", "") .replace ("probably", "") .replace ("maybe", "") .replace ("maybe it", "");
rr = rr.replace (//g, '');

And then begins counting attempts, points, and also voiced comments along the way:
 
show code [/b]
 
Also, the function increments variables with attempts and a question number to switch to the next question or end the game;
 
the final function is 3r32r6363. gameFinished [/b] gives backend a sum of points, if a person has won a promotional code - this can be seen in the browser and heard on the phone, because Pavlik voiced winnings; after that, is done. hangup .
 
 
The overall listing of the script approaches 300 lines, the most voluminous piece is the processing of the recognition result, 3r-3263. onRecognitionResult [/b] .
 
 

Talking Fossil


 

 
Answer: Firefox. We have everything.
 
 
Although Paul and the dinosaur, but still keeps up with the times: it develops from year to year and still loves to joke. We hope you appreciate the second version of our reptiloid and "live", and in terms of implementation. Share your views in the comments, be healthy and remember - Paul loves you!

It may be interesting

  • Comments
  • About article
  • Similar news
This publication has no comments.

weber

Author

15-10-2018, 14:15

Publication Date

Website development / Programming / Node.JS

Category
  • Comments: 0
  • Views: 390
Game over, boys
The plugin command for configuring the
The simplest way to support the
Jeffrey Richter comes to Russia: the
Issue # 25: IT training - topical
DevConf 2018 already on Friday, May 18
Write a comment
Name:*
E-Mail:


Comments
Visit Our website If You Need Custom thanksgiving couple shirts, Shirts For Your Company, Family Or Friends & We’ll Cook Something Special for you!
Yesterday, 21:10

raymond weber

Inursing test bank was very pleased  to find this site.I wanted to thank you for this great read!! I definitely  enjoying every little bit of it and I have you bookmarked to check out new  stuff you post.  
Yesterday, 18:20

taxiseo2

You completed certain  reliable points there. I did a search on the subject and found nearly all  persons will agree with your blog.  
nursing test bank
Yesterday, 18:04

taxiseo2

Great post i must say  and thanks for the information. Education is definitely a sticky subject.  However, is still among the leading topics of our time. I appreciate your  post and look forward to more.
nursing test bank
Yesterday, 17:29

taxiseo2

So good! This web post provides knowledge, knowledge, good news, and is very useful. Thank you for everything Taxi Driver Jacket
Yesterday, 15:35

MalenaMorgan

Adv
Website for web developers. New scripts, best ideas, programming tips. How to write a script for you here, we have a lot of information about various programming languages. You are a webmaster or a beginner programmer, it does not matter, useful articles will help to make your favorite business faster.

Login

Registration Forgot password