⬆️ ⬇️

Allow customers to make free Skype calls to their office

For some time now, Skype allows you to integrate your service with a client's SIP server. This option will allow customers or employees to make calls to the office for free in a situation where a call to a landline number is not possible at all or is expensive. Circumstances may force a customer to call from Cuba to a Moscow city number. So let's take the overhead and let the customer make calls to us from Skype for free.



To do this, we need an office number that is terminated on a softswitch, in my case it is Asterisk. The client will make a call to a skype account (the icon with which we place it on the site), which will forward the call to our SIP server.



Create a Skype Manager account here.

After that, from the Features menu, create a new SIP profile that will be used for calls from Skype to our server.

')

Skype offers one monthly simultaneous subscription for this service at a price of 4.95 euros, two lines cost 9.90 euros :).

From the Manager Skype interface and only from it we transfer the necessary amount and proceed to setting up the sip profile.



It should be noted that if you subscribed to one line and suddenly decided to connect the second, this trick will not succeed. Must be deactivated

old subscription, losing 4.95 euros and then connect the new one to 2 lines already. Money, of course, no one will return to you :).



Let's start creating a Skype account from the Members menu from which the call will be redirected to SIP. It is best to give some meaningful name to the account, since the client can add it to your contact list.

Now, in the Authentication details menu, we’ll tell Skype on which IP to terminate the call.

call termination settings



We are returning to the SIP profile and indicating the account previously created in Members Skype as the path to assigning calls. We also inform you what Skype number should make a call.

which internal call is directed



Create a sip.conf in the direction of skype

[skype] type=friend context=from_skype host=5.sip.skype.com call-limit=100 nat=no insecure=port,invite disallow=all allow=alaw dtmfmode=rfc2833 


We catch calls in 1000 extensions in the context of from_skype and direct it to the voice menu (in the context menu), the context configuration from_skype



 [from_skype] exten => 1000,1,Set(SKYPE=1) exten => 1000,n,Goto(menu,6666,1) exten => 1000,n,Hangup() 


In the context of the menu, we call the operators and display the names of the callers.

 [menu] exten => 6666,1,GotoIf($["${SKYPE}" == "1"]?skype:orig_caller) exten => 6666,n(skype),Set(CALLERID(name)=Skype:${CALLERID(name)}) exten => 6666,n,Goto(next) exten => 6666,n(orig_caller),Set(CALLERID(name)=Ordinary:${CALLERID(name)}) exten => 6666,n(next),Dial(SIP/1001/1001&SIP/1002/1002) exten => 6666,n,Hangup() 


Making an icon on the site :)

 <!-- Skype 'Skype Me!' button http://www.skype.com/go/skypebuttons --> <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script> <a href="skype:some_skype_account?call"><img src="/images/call_blue_transparent_70x29.png" style="border: none;vertical-align:middle" width="70" height="29" alt="Skype Me!" /></a> <!-- /end skype --> 


A nice option is that Skype sends without changing the nickname of users, which will allow us to offer an alternative menu to our customers and employees :).

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



All Articles