Asterisk/Skype: Difference between revisions

From fakedWiki
Jump to: navigation, search
No edit summary
m (7 revisions imported)
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:
</pre>
</pre>


Download [http://www.mhspot.com/sts/siptosis_download.php SipToSis] (SIP to Skype integration software), unzip and start it:
 
Download [http://www.mhspot.com/sts/siptosis_download.php SipToSis], a.k.a the "SIP to Skype integration software" (the free one in the second table!) and unzip it:
<pre>
<pre>
mkdir /opt/SipToSis
mkdir /opt/SipToSis
Line 10: Line 11:
cd /opt/SipToSis
cd /opt/SipToSis
chmod +x SipToSis_linux
chmod +x SipToSis_linux
screen -S SipToSis ./SipToSis_linux
</pre>
</pre>


When connecting to the VNC server where headless Skype runs, you'll see the dialogue asking you if you want to allow "Skype4Java" to connect to Skype. Go ahead, click whatever makes sense to you... (that would be "Remember this selection", unless you like to do this everytime you start SipToSis, and of course "Yes")
First we have to allow incoming Skype calls and forward them to a SIP extension. To do this, open the file '''/opt/SipToSis/SkypeToSipAuth.props''' with Microsoft Frontpage or your preferred text editor, scroll to the bottom and try to make it look a little something like this:
 
If you're too slow, you may be unable to click any of the buttons - well, you can click them, but nothing happens. If that's the case, just kill SipToSis, reconnect to the screen (''screen -S Skype -r''), kill Skype with ''CTRL+C'' and start everything up again, including the VNC server, and be quicker this time.
 
Now we have to allow incoming Skype calls and forward them to a SIP extension. Open the file '''/opt/SipToSis/SkypeToSipAuth.props''' with Microsoft Frontpage, or any other text editor you prefer, scroll to the bottom and make it look like this:
<pre>
<pre>
#Default: all incoming skype callers get the invalid destination message
#Default: all incoming skype callers get the invalid destination message
Line 26: Line 22:
</pre>
</pre>


After restarting SipToSis, force somebody how's online in Skype to give you a call. You should see their Skype username as the CallerID, if you got a fancy phone from this century, and talk to them just fine.
Feel free to get funky with '''/opt/SipToSis/SipToSkypeAuth.props''' to set up call routing from your SIP device to Skype, i didn't.
 
 
Now make SipToSis talk to Asterisk, edit '''/opt/SipToSis/siptosis.cfg''', comment out the default registration example ''"Sample AUTO config with NO registration"'' and further down change the Asterisk example to your needs
<pre>
#Sample Asterisk registration example - comment out NO registration info above first and uncomment the following.
host_port=5070
contact_url=sip:myskypeuserinasterisk@127.0.0.1:5070
from_url="John Doe" <sip:myskypeuserinasterisk@myAsterisk:5060>
username=myskypeuserinasterisk
realm=myAsterisk
passwd=myskypeuserpasswordinasterisk
expires=3600
do_register=yes
minregrenewtime=120
regfailretrytime=15
</pre>
 
"You need two to play this game called love" they say, and that's exactly how many you need for Skype over Asterisk, so don't forget to add a SIP user to your Asterisk's '''sip.conf'''
<pre>
[myskypeuserinasterisk]
defaultuser=myskypeuserinasterisk
type=friend
context=default
secret=myskypeuserpasswordinasterisk
host=dynamic
nat=no
dtmfmode=auto
canreinvite=no
qualify=yes
defaultip=127.0.0.1
incominglimit=1
outgoinglimit=1
call-limit=1
busylevel=1
</pre>
 
Hold on to your pants, here we go:
<pre>
screen -S SipToSis ./SipToSis_linux
</pre>
 
After starting SipToSis, connect to the VNC server where headless Skype runs. You'll see a dialogue asking you if you want to allow "Skype4Java" to connect to Skype. Go ahead, click whatever makes sense to you... (that would be "Remember this selection", unless you like to do this everytime you start SipToSis, and of course "Yes")
 
If you're too slow, you may be unable to click any of the buttons - well, you can click them, but nothing happens. If that's the case, just kill SipToSis, reconnect to the screen (''screen -S Skype -r''), kill Skype with ''CTRL+C'' and start everything up again, including the VNC server, and be quicker this time.
 
Go ahead, bribe someone how's online in Skype to give you a call. You should even see their Skype username as the CallerID, if you got a fancy phone from this century!

Latest revision as of 20:10, 26 August 2016

Start with getting headless Skype to work, then export the display variable for SipToSis:

export DISPLAY=:0


Download SipToSis, a.k.a the "SIP to Skype integration software" (the free one in the second table!) and unzip it:

mkdir /opt/SipToSis
unzip -d /opt/SipToSis /tmp/SipToSis_20110310.zip
cd /opt/SipToSis
chmod +x SipToSis_linux

First we have to allow incoming Skype calls and forward them to a SIP extension. To do this, open the file /opt/SipToSis/SkypeToSipAuth.props with Microsoft Frontpage or your preferred text editor, scroll to the bottom and try to make it look a little something like this:

#Default: all incoming skype callers get the invalid destination message
#*,play:clips/invalidDest.wav

#Default: all incoming skype caller are forwarded to SIP extension 100 on the local Asterisk
*,sip:100@127.0.0.1:5060,your_skype_username_or_something_else

Feel free to get funky with /opt/SipToSis/SipToSkypeAuth.props to set up call routing from your SIP device to Skype, i didn't.


Now make SipToSis talk to Asterisk, edit /opt/SipToSis/siptosis.cfg, comment out the default registration example "Sample AUTO config with NO registration" and further down change the Asterisk example to your needs

#Sample Asterisk registration example - comment out NO registration info above first and uncomment the following.
host_port=5070
contact_url=sip:myskypeuserinasterisk@127.0.0.1:5070
from_url="John Doe" <sip:myskypeuserinasterisk@myAsterisk:5060>
username=myskypeuserinasterisk
realm=myAsterisk
passwd=myskypeuserpasswordinasterisk
expires=3600
do_register=yes
minregrenewtime=120
regfailretrytime=15

"You need two to play this game called love" they say, and that's exactly how many you need for Skype over Asterisk, so don't forget to add a SIP user to your Asterisk's sip.conf

[myskypeuserinasterisk]
defaultuser=myskypeuserinasterisk
type=friend
context=default
secret=myskypeuserpasswordinasterisk
host=dynamic
nat=no
dtmfmode=auto
canreinvite=no
qualify=yes
defaultip=127.0.0.1
incominglimit=1
outgoinglimit=1
call-limit=1
busylevel=1

Hold on to your pants, here we go:

screen -S SipToSis ./SipToSis_linux

After starting SipToSis, connect to the VNC server where headless Skype runs. You'll see a dialogue asking you if you want to allow "Skype4Java" to connect to Skype. Go ahead, click whatever makes sense to you... (that would be "Remember this selection", unless you like to do this everytime you start SipToSis, and of course "Yes")

If you're too slow, you may be unable to click any of the buttons - well, you can click them, but nothing happens. If that's the case, just kill SipToSis, reconnect to the screen (screen -S Skype -r), kill Skype with CTRL+C and start everything up again, including the VNC server, and be quicker this time.

Go ahead, bribe someone how's online in Skype to give you a call. You should even see their Skype username as the CallerID, if you got a fancy phone from this century!