Giter Club home page Giter Club logo

askozia-telegram-reminder-v2's Introduction

Asterisk Telegram Bot

A Node.js telephony server app for Telegram that uses Node.js Asterisk Manager to simplify the missed calls processing. When there's a missed call Askozia sends a request to this application that is intercepted by Express and it triggers the bot to send a message to a specified chat. For my Bot I use Node Telegram bot Api.

How it all works:

First we get a request from Askozia of type http://ip:port/missed/phone number/time customer waited in seconds The following code proccesses this request:

app.get('/missed/:phone/:duration', function(req, res) {
  // get phone and waiting time, send message with inline keyboard to telegram chat spesified in config.js
});

And that's what we get in Telegram:
1

The inline keyboard under the message represents operators' internal phone numbers. Clicking this button does not result in messages sent to the char rather it works as callback querry. The bot receives it:

bot.on('callback_query', function (msg) {
  /* The json object we receive contains callback data from the button we click here: msg.data
     Do your stuff */
});

Once a button has been clicked the phone call is initiated first to the operator:
3

When the operator picks up the phone, the call is redirected to the customer. Fancy emojis make it more intuitive for operators :) If a customer answered the call this is what we get:
4

In case an operator couldn't hit the "answer" button, the bot notifies the others:
2

Finally, in case a cusomer could bot answer for some reason and droped the call we get this:
5

...or if he didn't bother to pick up the phone:
6

All of the above makes the proccess of making return calls simplier more productive.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.