Skype for SIP
Configuring an Asterisk PBX with Skype for SIP
.
Below you can find the necessary changes you need to do in your Asterisk configuration files in order to configure your PBX for incoming and outgoing calls with Skype for SIP.
Asterisk configuration changes:
sip.conf file —> make the modifications below in this file. sip.conf file can be found under /etc/asterisk/
[general]
context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; defaults to “asterisk”
disallow=all ; First disallow all codecs
allow=ulaw
allow=alaw
allow=g729 ; Allow codecs in order of preference
canreinvite=no; ATTENTION: You should substitute the number 99051000000060 for your own Skype for SIP username everywhere this number is used
register => 99051000000060:password_in_your_sip_profile@sip.skype.net/99051000000060
; change this for your own SIP password provided in your Skype for SIP profile page
externip = xxxx.xxx.xxx.xxx ; IP Address that we’re going to put in outbound SIP if you are behind a NAT
; ATTENTION: You should substitute the number 99051000000060 for your own Skype for SIP username everywhere this number is used
; You should add this to the bottom of your sip.conf file
[99051000000060]
type=friend
dtmfmode=rfc2833
context=skype
host=sip.skype.com
username=99051000000060 ; change this for your own SIP username provided in your Skype for SIP profile page
secret=password_in_your_sip_profile ; change this for your own SIP password provided in your Skype for SIP profile page
allow=ulaw
allow=alaw
allow=g729
nat=no
fromdomain=sip.skype.com
insecure=invite
extensions.conf file —> make the modifications below in this file. extensions file can be found under /etc/asterisk/
; add the following to the bottom of your extensions.conf file to be able to make and receive calls from Skype for SIP[skype]
; ATTENTION: You should substitute the number 99051000000060 for your own Skype for SIP username everywhere this number is used
; Outbound calling using Skype for SIP, all calls started by “00” will be sent out through Skype for SIP
exten => _00X.,1, Answer
exten => _00X.,n, Set(CALLERID(num)=99051000000060) ; this is very important otherwise call will be rejected on Skype’s side
exten => _00X.,n, Dial(SIP/${EXTEN}@99051000000060)
exten => _00X.,n, Hangup;Example of inbound calls from Skype for SIP
exten => 99051000000060,1,Answer ; Answer the line
exten => 99051000000060,n,Playback(Welcome) ; Play a message or substitute this line for anything you want to do with the Skype incoming calls
After making these changes in the configuration files, you should login into your asterisk instance by typing in the shell: asterisk –r
Once logged in, you need reload your asterisk configuration by typing: reload
These instructions were originally posted here.