📜 ⬆️ ⬇️

Dobrofon - free telephone advice on any issues



Sometimes we have a sudden need to talk with a living person. Ask for advice, get advice, share an idea, tell a funny story, or just talk about anything. It is not always convenient to disturb these friends.

We tried to solve this problem and did Dobrofon - a hotline where you can call at any time and talk to a real person one-on-one. Operators are divided into categories according to qualifications and gender.
All, of course, free and created exclusively for aesthetic pleasure.
')
You can call Dobrofon through:



The article will describe the technical side of the organization of the call-center and the subtleties of connecting all external lines.




Backend works on asterisk. All incoming lines, respectively, are connected to it.
Operators connect to the server via SIP.

All operators are divided into three categories and have a corresponding three-digit internal number:



All accounts are listed in static queues in queues.conf according to their category. Plus, the fourth category is “incident operator” in which the call is sent to all operators at once.

Asterisk configs are noteworthy only
extensions.conf
[internal]

;; allow operators to call each other by internal numbers
exten => _XXX, 1, Dial (SIP / $ {EXTEN}, 60, tT)
exten => _XXX, n, Hangup

[default]

;; From call@dobrofon.com
exten => call, 1, Goto (menu, s, 1)
exten => call, n, hangup ()

;; Calls from tropo.com on skype
exten => trop, 1, Set (CALLERID (name) = $ {CALLERID (num)}); Logging Skype-login from callerid (num) to callerid (name)
exten => trop, n, Set (CALLERID (num) = Skype); In callerid (num) write the line Skype
exten => trop, n, Goto (menu, s, 1)
exten => trop, n, hangup ()

;; From Skype Connect
exten => 99051000164280,1, Set (CALLERID (num) = Skype); In the callerid (num) we write the Skype line, while the callerid (name) already has the caller's Skype login
exten => 99051000164280, n, Goto (menu, s, 1)
exten => 99051000164280, n, Hangup ()

;; From flashwidget
exten => flash, 1, Set (CALLERID (num) = Flash) ;;; In callerid (num) write the string Flash
exten => flash, n, Goto (menu, s, 1)
exten => flash, n, hangup ()

;;;;;;;
;;;;;;; Main menu
;;;;;;;

[menu]
exten => s, 1, Answer ()
exten => s, 2, Background (hello); Record "Welcome to dobraphone"
exten => s, 3, ExecIf ($ [$ {CALLERID (num)} = Skype]? Wait (1)
exten => s, 4, ExecIf ($ [$ {CALLERID (num)} = Skype]? Background (dialpad); If calling from Skype to play a record that you need to enable the dialer in the upper part of the window
exten => s, 5, ExecIf ($ [$ {CALLERID (num)} = Skype]? Wait (1)
exten => s, 6, Background (main); Main menu
exten => s, n, WaitExten (2)

;; random operator
exten => 0,1, Set (CALLERID (num) = $ {CALLERID (num)} _ R); The callerid (num) line is appended with the name of the category that the caller selected so that the operator has an idea of ​​what the caller wants to hear.
exten => 0, n, Playback (connect)
exten => 0, n, Queue (random, tT ,,, 40) ;; wait 40 seconds and if no one picked up the phone to lose "all operators are busy"
exten => 0, n, Playback (busy)
exten => 0, n, hangup ()

exten => 1,1, Set (CALLERID (num) = $ {CALLERID (num)} _ Vip)
exten => 1, n, Playback (connect)
exten => 1, n, SIPAddHeader (Alert-Info: <Bellcore-dr5>) ;; Send a ringtone in the header (for Cisco phones)
exten => 1, n, Queue (vip, tT ,,, 40)
exten => 1, n, Playback (busy)
exten => 1, n, Hangup ()

exten => 2.1, Set (CALLERID (num) = $ {CALLERID (num)} _ Girls)
exten => 2, n, Playback (rita_begin)
exten => 2, n, Queue (girls, tT ,,, 40)
exten => 2, n, Playback (rita_end)
exten => 2, n, Hangup ()

exten => 3.1, Set (CALLERID (num) = $ {CALLERID (num)} _ Boys)
exten => 3, n, Playback (connect)
exten => 3, n, Queue (boys, tT ,,, 40)
exten => 3, n, Playback (busy)
exten => 3, n, Hangup ()

;; direct dialing
exten => _8XXX, 1, Set (CALLERID (num) = $ {CALLERID (num)} _ Direct)
exten => _8XXX, n, SIPAddHeader (Alert-Info: <Bellcore-dr1>)
exten => _8XXX, n, Dial (SIP / $ {EXTEN: 1: 3}, 60, tT)

exten => 9,1, Set (CALLERID (num) = $ {CALLERID (num)} _ BOSS)
exten => 9, n, SIPAddHeader (Alert-Info: <Bellcore-dr1>)
exten => 9, n, Dial (SIP / 100)

;; Timeout random queue
exten => t, 1, Goto (0,1)

;; Strong ext
exten => i, 1, Background (invalid)
exten => i, n, Goto (s, 6)


With this configuration, operators can see through which incoming line the user calls and which digit (category) he chooses. For example, when calling via Skype and selecting a random category, the operator sees the Skype_R line in the CallerID (num) field and the caller's skype login in the CallerID (name) field in his sip client.

This is how it looks on the operator’s side in the eyeBeam SIP client:

image

The policy of dialing in queues is as follows: the call is sent to all operators from the selected category at the same time, the first answering operator picks up the call.

Operators can transfer an active call to each other via blind transfer (grid and extension number) as well as through a regular transfer (first, the operator puts the active call on hold, calls another operator, requests "I can transfer such and such a client to you" and then transfer)

Incoming channels



The most interesting part is the device of incoming channels. I will analyze each channel separately.
None of the providers listed below paid us for advertising (although we do not mind), and everything described is the result of my personal research.

Skype



Previously, our main Skype account was at dobrofon.com
This is a business account connected to the service Skype Connect, at a price of 5 € for one competing line (this service is described in detail here habrahabr.ru/post/144465 ).

During use, it turned out that Skype Connect is a regular account with the unconditional forwarding set to the number +990. These are virtual numbers on the Skype network intended for landing calls. Calls to these numbers are possible only from the Skype network and are not charged.

The cost of the Skype Connect tariff is based on the number of competing lines required. That is, if you want to be able to receive 10 parallel calls through your Skype-login, the rate will be 50 € per month.
But then an interesting hack has opened: the number of parallel lines is limited only by the number itself +990, which is issued to you, while Skype-login does not limit the number of parallel calls. From this it follows that if you redirect calls to another number, which, for example, is covered by a subscription, you can get an analogue of Skype Connect for less money. For example, buy a subscription to Moscow landline phones, buy a multi-channel number +7 (495) and forward calls to it. In this case, the number of parallel lines will be limited on the side of the SIP-provider, and you can never buy Skype Connect. Also Skype calls free to Toll Free numbers in America (+1800, +1888).

Once upon a time, Skype worked very closely with the provider Voxeo.com . Since then, Voxeo has a pool of +990 numbers, which it distributes free of charge to everyone through its subsidiary service tropo.com (This service is so beautiful that I will talk about it in more detail later). At the same time without imposing strict restrictions on the number of parallel lines. (Actually there are limitations, but they are measured by bursts at> 100 calls per minute). Having received such a number from Voxeo, you can make a similar SkypeConnect account for free. True Voxeo announced the termination of support number +990, so that soon these numbers will be disabled.

Now the main way to dial via Skype is a toll free number +990009369990067870

Landline phones



We buy direct Moscow number +7 (499) 504-82-76 from Zadarma.com .

Direct numbers in these countries are provided free of charge by the Voxeo provider:
image

Gateways in major cities are also available.
gateway list
When dialing through gateways, use extension 01488

Russia, Ekaterinburg +7 (343) 236-62-39
Russia, Nizhny Novgorod +7 (831) 429-03-34
Russia, Novosibirsk +7 (383) 289-98-58
Russia, St. Petersburg +7 (812) 309-02-59
Russia, Chelyabinsk +7 (351) 750-35-69
Great Britain, Birmingham +44 (121) 279-03-24
Great Britain, Liverpool +44 (151) 209-01-04
Great Britain, London +44 (20) 3298-41-31
Israel, Jerusalem +972 (2) 569-50-85
Kazakhstan, Almaty +7 (727) 323-13-42
Latvia, Riga +371 (67) 88-15-29
Lithuania, Vilnius +370 (5) 259-61-71
United States, New York +1 (718) 831-71-56

In fact, this list is much larger, so if your city is not in it, write to me about it.


Flash widget



The most sensitive issue is calls via direct from the browser via Flash.
Keeping your own Flash Media Server is very expensive and inconvenient. Its free counterparts like RED5 work very poorly. Splicing it with SIP is all the more time consuming.

There are several providers that provide a Click-to-call widget service for the site.
Having tried everything that I could find, it turned out that the only provider that provides acceptable quality of communication is Zingaya.com .
Everyone else has terrible sound quality, delays, the lack of a numeric keypad and other drawbacks.
image

In addition, Zingaya, allows you to send an arbitrary CallerID when calling. Thus, when calling from the VKontakte application, the operator can see the link to the caller's profile.

Recently, Chrome fully supports WebRTC . At the same time, Zingaya added WebRTC support to its widget, so when calling via Chrome, Falsh is not used and the latency is much better.

GoogleTalk, Gmail and iNum



Our number on the iNum network: +883510001340589

GoogleTalk allows you to call iNum numbers for free.
You can also call from the Gmail web interface if you install the plugin .
image

You can do a lot of interesting things with the iNum number, you can read more about this in Google.

Sip



Main SIP account: call@dobrofon.com

You can also call through the internal numbers of some sip-providers. They are listed on the site.




FAQ



Why is all this necessary?

Just. We believe that human communication is one of the most valuable things in life.

Who are the operators?

Volunteers who are interested.

How to become an operator?

Anyone with a microphone, SIP-client and intelligible speech can become an operator. In the first category, for example, there are many IT professionals who are bored at work, so that it can be used as a free tech. support

In order to get an internal number, you need to write to me or ohm in inbox

How else can you participate?

So we do the dobrophone exclusively in our free time, it’s impossible to implement all our ideas due to lack of time. Therefore, everyone is invited to participate: programmers (asterisk, web front-end, flash, webrtc), designers, layout designers and everyone else who thinks that they can help.

Source: https://habr.com/ru/post/150234/


All Articles