
The article will describe a way to connect a direct Moscow number to Skype with free incoming calls
for $ 8 a year.UPD: This method is no longer relevant, everything can be done easier habrahabr.ru/blogs/skype/130299/#comment_4599646')
Together with direct Moscow gateways will be available in major cities of Russia, Ukraine, Great Britain, USA and others, through which incoming calls can be received using an additional five-digit prefix, and if there is no need for a direct number, the solution will be completely free.
For this, two sip providers will be used and the own asterisk server for switching.
The scheme only makes sense if it is important to receive incoming calls on Skype, otherwise, you can use a regular sip client and cancel the last three parts of the scheme.
In addition, there are a large number of operators who provide such a service out of the box, but it costs incomparably more expensive and often with the charging of incoming calls.
The principle is as follows: the first operator provides a direct number +7901, the asterisk server connects to it as a sip client and redirects all incoming calls to the sip id of the second provider that has sip => skype gateway and in the control panel is configured to redirect incoming calls to Skype.
To get started, we will get accounts with sip-providers
The first, the one that sells direct number -
zadarma.comWe are registering, choosing the “Economy” tariff - this is a tariff without a monthly fee.
In the
Settings = = Direct Number menu, we connect the number, it will become active after a minimum deposit of $ 1.25. To save the number, it is necessary to replenish the account every two months for any amount (hence the entire cost of $ 7.5 per year).
You can do without recharging. You can already receive incoming calls through extension gateways. The list of gateways is in the control panel or here
zadarma.com/ru/intertel/dirnumThen in the
Settings => Sip-settings menu, we save our five-digit sip id (it is an added prefix when calling through gateways) and a password.
The second operator that provides redirection from sip to skype -
sipnet.ruRegister. Account will be valid for 30 days. To make it permanent you need to either register your mobile number or refill your account for a minimum amount.
In the
Settings => Forwarding menu, put a tick "
Always redirect to " and enter skype login in the format username@skype.sipnet.ru. It is also necessary to add skype.sipnet.ru to Skype contact list.
Remember our ten-digit sip id.
Asterisk setup
For those who do not have the ability / desire to turn an asterisk on my own, I can share my own and connect your accounts, thankfully, not much is spent on telephony.
Further it is assumed that the asterisk is installed on a server with a real IP. Configs look like this:
sip.conf[general]
context=default
allowguest=no
useragent=my_asterisk
tos_sip=cs3
tos_audio=ef
bindport=5060 ;
bindaddr=123.45.67.89 ; ip
register=12399:password@sip.zadarma.com/12345 ; 12399:password - sip id
[12399]
type = user
host = sip.zadarma.com
username = 12399
secret = password
dtmfmode = rfc2833
disallow = all
allow = alaw
extentions.conf[default]
exten => 12399,1,Dial(SIP/0012345678@sipnet.ru) ;; 12399 sip id zadarma, 0012345678 - sip id sipnet.ru
You can check if the asterisk is successfully configured in the zadarma.com panel -> sip settings. The trunk must be online, the user agent must be the one specified in sip.conf
You can view debug information by connecting to the asterisk console:
asterisk -rIf everything is configured correctly, when you call your sip id in zadarma, an incoming Skype call should come from skype.sipnet.ru
Total
Pros:- Price: if you do not need direct Moscow, it turns out completely free
- Flexibility: you can easily forward calls to your mobile phone, sip account, skype, etc.
Minuses:- Complexity
- skype can't see caller number
- Stability: due to the large number of nodes of the circuit is high risk of its failure