MHSpot.com
SipToSis TM - SIP to Skype Gateway Bridge Troubleshooting
STS Home FAQ ATA Setup Skype Trunk Setup Troubleshooting Forum Downloads Skype Deals

This page contains a variety of common questions/problems and hopefully solutions.

When I make/receive a Skype call, I don't hear anything (no audio/sound) on the SIP side or I get RTP Timeout Error. Confirm setting enableSendRTPtoReceivedAddress=yes in siptosis.cfg. Make sure the RTP ports are not being blocked by any type of firewall or nat device. STS default incoming UDP ports to open are 5070 and 63200-63202. For multiple channels you will need to include the ports for all channels. The startup display shows the port allocations. Make sure that the correct IP address is being used in the siptosis configuration file(s). Try adding via_addr=IPaddressOfSipToSis to the siptosis.cfg file (especially on linux). Try turning off STUN on your ATA or softphone. Disable silence suppression on your SIP device. Check that you are using a supported and enabled codec. The console displays enabled codecs at startup.
Version 20090502 and higher has some additional NAT enhancement settings. See settings: publicIP, stunServer, enableNatTranslate and enableNatTranslateVia in the siptosis.cfg sample.

What does "Unrecognized identity" or "Unrecognised identity" mean?
The general meaning is that the Skype User being called is not valid.
If you are attempting a SkypeOut call then check the following:

  • Improper dial plan setup
  • Improper configuration of SkypeOutDialingRules.props, you can create mappings and transforms in this file.
  • Improper setup in the PBX dialing extensions (See next question)

When dialing out with my PBX's dial plan, the dialing prefix is being sent to the Skype Gateway. How can I fix this? Normal Asterisk PBX's can strip the dialing prefix in the extensions.conf file like this:
exten => _7X.,1,Dial(SIP/siptosisuser/${EXTEN:1}) or exten => _901.,n,Dial(SIP/stsTrunk_01/${EXTEN:3})
If your PBX can't be configured this way or you don't want to, then you can work around this in SkypeOutDialingRules.props. For example, if your PBX dialing prefix is 7 you could add the following line:
^7([1-9][0-9]{10})$:+$1
The $1 will only capture what's in the parenthesis. In the example above, the 7 prefix will be left out when making the SkypeOut call with 11 digit dialing. If 713051234567 was sent to the gateway, SipToSis would transform it to +13051234567 as needed by Skype. For other dialing prefixes, change the 7 to the new prefix. You can also do this for Skype User mapping with as many lines as you need. Note: make sure no other rules make the same match. Read up on regular expressions if you need to get more complicated.

How do I call a Skype User when I can only dial numbers on my phone? You can add mappings to SkypeOutDialingRules.props or if using a PBX, you can map them there. If your Skype client has speed dial, you can map numbers to users there also. To use the built in mapping features add patterns to SkypeOutDialingRules.props like this:

^([1-9][0-9]{6})$:+1561$1
^([1-9][0-9]{9})$:+1$1
^([0-9]{7,})$:+$1
^50$:skypeusertocall1
^51$:skypeusertocall2
^52$:skypeusertocall3
^53$:skypeusertocall4

The first 3 lines handle SkypeOut calls using standard U.S. style 7, 10 and 11 digit and International dialing. Change the 1st line's area code as needed. The rest of the lines perform number to Skype User translations.

I'm getting an error when calling: FAILED (Reason: Sound I/O error.) This is caused by an improperly configured Skype sound device. A Skype Compatible sound device is required for all operating systems.

Linux specific issues:
  When using a sound hardware: You may not have setup to share the sound device correctly (usually the microphone is the issue but not always). See Sharing sound device with Alsa for an example of how to do this.
  When using snd-dummy: It can indicate running out of streams. Either enable more snd-dummy cards (modprobe snd-dummy enable=1,1,1,1 and 8 clients per dummy card) or modify the Alsa driver's dummy.c to allow more streams as shown below.

Alsa dummy.c modification:
Get package Driver (alsa-driver) 1.0.22.1 from Alsa Project Download
Extract into /usr/src
cd /usr/src/alsa-driver-1.0.22.1/alsa-kernel/drivers
Change line 152:
static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
to:
static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128};
cd /usr/src/alsa-driver-1.0.22.1
sudo ./configure
sudo make
sudo make install
reboot
more /proc/asound/version - should show Alsa Driver version 1.0.22.1

Configure all skype clients (Mic/Spkrs/Ring) - set to Dummy, Dummy PCM (hw:1,0)

I'm hearing the caller from the speakers when on a call Skype has changed the behavior of the API or created a bug with the new Skype clients. Clients 3.8 and 2.0.0.72 do not have this problem.
For Windows Skype clients 4.x simply turn the speaker volume down to the minimum setting on the Skype sound settings screen.
For linux Skype clients the client does not have volume controls - you will have to either mute the sound with alsamixer (Note: I do not recommend using pulse audio with the gateway) This will mute the entire system. If you only want to mute skype, see Skype Alsa setup The other option is to setup snd-dummy.

I'm trying to make a skype call and sometimes I get some strange SIP response messages? Here's the default possible call failure response codes. Your PBX/Asterisk Server will need to handle these statuses.

  • 603 Skype User refused the call
  • 404 Skype call failed, invalid user, no skype credit (Can't tell the difference)
  • 408 Skype client responded UNPLACED - whatever that means
  • 600 Skype user is busy
  • 480 Over Usage Limit (as of version 20090526)
  • 403 Anything else
These status codes can be changed as of SipToSis version 20080926. The default failure status code settings in SipToSis.cfg are:
baseFailureResponse=403
skypeRefusedResponse=603
skypeFailedResponse=404
skypeUnPlacedResponse=408
skypeBusyResponse=600
OverUsageLimitSipResponse=480 (as of version 20090526)
You can set these values to whatever your needs are. The stsdialresult macro included with SipToSis should handle these. If you are not using an Asterisk PBX, you may have to custom handle them yourself or change the response codes to fit your PBX server.

I'm trying to use the register feature and I get "Registration failure: 401 Unauthorized" Incorrect realm is the most likely cause. On an Asterisk type server, look for realm=???? in sip.conf, if the realm entry is not set, it should be 'asterisk'. If you still don't know what the realm should be. Do the following procedure to find out:
Delete log files in the siptosis/log folder.
In siptosis.cfg set logConfigFile=log_debug.properties
Run siptosis to get the error message again
Look at the siptosis/log/message.log file and look for the "SIP/2.0 401 Unauthorized" message:

192.168.0.4:5060/udp (511 bytes): received
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.4:5070;branch=z9hG4bK173300;received=192.168.0.4;rport=5070
From: "skypetestuser" <sip:skypetestuser@192.168.0.4:5060>;tag=z9hG4bK88627584
To: "skypetestuser" <sip:skypetestuser@192.168.0.4:5060>;tag=as1ce8cbcf
Call-ID: 680092275580@192.168.0.4
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2eef842d"
Content-Length: 0
It's telling you the correct realm to use  (^^look up^^)

Can you explain the setting SkypeInboundAllChannelsBusyAction? If using an ATA, you would most likely want to refuse any extra calls above your call limit (default 2). You could also set it to ignore, in that case the caller would just get ringing until they gave up.

On a PBX using multiple Skype Users, you could setup multiple instances and chain incoming Skype calls to another Skype channel. This requires a different Skype User account for each channel.
For example, let's say you have 4 Skype clients called: skypeuser1,skypeuser2,skypeuser3,skypeuser4.
In siptosis_1.cfg set SkypeInboundAllChannelsBusyAction=transferto:skypeuser2
In siptosis_2.cfg set SkypeInboundAllChannelsBusyAction=transferto:skypeuser3
In siptosis_3.cfg set SkypeInboundAllChannelsBusyAction=transferto:skypeuser4
In siptosis_4.cfg set SkypeInboundAllChannelsBusyAction=refuse
In each siptosis_?.cfg file, set concurrentcalllimit=1.
If a skype caller calls skypeuser1 (your main advertised skype user) and skypeuser1 is already on a call, it would transfer to skypeuser2. If skypeuser2 is busy, it will transfer to skypeuser3 and so on until you run out of skype channels. The stsTrunkBuilder sets this up for you.

The Audio chops/chopping/choppy, what can I do to reduce or eliminate it?
If you are using other programs, expect to get some chopping. Startup of applications and anything that performs disk access will cause the most problems.
You may also be experiencing some internet latency or packet loss issues. Make sure that Skype has no issues if you use it manually. The skype echo test is not a good test for this. There are a few basic things to try:

  • Raise the Network Jitter Level in the ATA
  • Turn off software firewall - if this resolves the issue, you can try another software firewall or get a hardware firewall
  • Disable QOS in tha ATA
  • If using bandwidth throttling, make sure you are allowing sufficient bandwidth
  • Test your network and internet connection for packet loss and fix if possible
  • Make sure your internet connection has sufficient bandwidth
  • Use of linux snd-dummy driver as the Skype output device is known to cause this problem in some cases. Try Sample Linux Sound Setup if you have a sound card installed. If that gives you trouble, try Sample Linux Sound Setup if you have a sound card installed.
  • Make sure your CPU is not at maximum
There are also a few settings in siptosis.cfg you can try:
  • jitterLevel=2 (New with 20081025 version)
  • maxAudioDelayMs=9999 (Obsolete with 20081018 version)
  • useskypetimingsource=no (Obsolete with 20081018 version)
  • audioPriorityIncrease=1 (Not sure if has any effect)
  • For PCMU/PCMA codecs, set audio_frame_size to 240 or 160 - some phones require 160
  • On Windows, In SipToSis_win.bat you can try adding (don't do this unless you have to)
    start /ABOVENORMAL /B
    Add that in front of the java command (same line) and remove the pause command on the last line (if it's there)

The sound/audio is delayed more than using Skype directly
Some additional delay is unavoidable due to the nature of the additional transcoding, network/cpu latency and the additional transfer of the audio packets to/from the SIP device (which also has inherent delays). Realistically, expect at least 125ms minimum additional delay. If you are using Asterisk, it is best to use canreinvite=yes on both SIP legs (if possible) to avoid another hop and additional Asterisk loading. That said, on Linux the default network socket buffers may be very large by default - on my default Centos 5.2 install it's around 55,000. While this is great for high data throughput, it's not very good for real time applications. The following settings in siptosis.cfg may help:
TcpRxBufferSize=8192
TcpTxBufferSize=8192
RtpRxBufferSize=8192
RtpTxBufferSize=8192
You can try this on windows as well, but on my Windows XP Pro, it defaults to 8192 already. It's possible that other windows versions are using excessive buffer sizes.
Other possibilities:

  • Your internet connection has insufficient bandwidth
  • Your CPU is overloaded

While on a call, the sound delay increases as time passes
snd-dummy can cause this (even if only set as the input device). Click Alternative to snd-dummy for a solution if you have a hardware sound device.

I'm seeing messages like Codec: GSMTRI not loaded or Codec won't instantiate.
Note: This message is harmless and will not stop operation of the other codecs. It is just a warning that a configured codec is not operational. If you want to use it, download the tritonus libraries tritonus_gsm-0.3.6.jar and tritonus_share-0.3.6.jar and put them in the SipToSis folder. If you did that correctly already, then you may not be using the current SipToSis startup file. Update your startup script's classpath to contain references to the jar files above.

If you don't want to use GSM with the tritonus libraries or don't want the message, edit siptosis.cfg and remove GSMTRI from the codec list. For example, if the codec parameters look like this:

audio_codec=PCMU,PCMA,GSMTRI,ILBC,SPEEX
audio_frame_size=240,240,160,240,160
audio_avp=-1,-1,-1,98,97

Since GSMTRI is the third codec, simply remove the third entry from each line.
After removal it would look like this:

audio_codec=PCMU,PCMA,ILBC,SPEEX
audio_frame_size=240,240,240,160
audio_avp=-1,-1,98,97

The same procedure is used to remove other unwanted codecs or add additional supported codecs.

How do I use GSM using Sun's Java Media Framework?
Download and install Sun's Java Media Framework from Sun's website. Locate jmf.jar file and copy it to the SipToSis root folder.
Change the codec setting in siptosis.cfg. For example, if the codec parameters look like this:

audio_codec=PCMU,PCMA,GSMTRI,ILBC,SPEEX
audio_frame_size=240,240,160,240,160
audio_avp=-1,-1,-1,98,97

Simply change the default GSMTRI codec to GSM - You can not use both.
After the change it would look like this:

audio_codec=PCMU,PCMA,GSM,ILBC,SPEEX
audio_frame_size=240,240,160,240,160
audio_avp=-1,-1,-1,98,97

I'm getting "command not found" when trying to run ./SipToSis_linux or other linux script
One or more of the scripts may not be in unix file format due to me forgetting to set it or possibly the method used to transfer the files to your box. Editing on windows and then transferring the file to a linux box is a good way to cause this. To fix, perform the following on the linux box:
vi SipToSis_linux (or other linux script)
If this is the problem you will see [dos] at the bottom of the vi screen.
:q
set ff=unix
:w
It should now work. Also check that java is installed and in your PATH. You can test that by typing 'which java' in a console window. It should return the location of your java install. If not, you need to fix that. If this only occurs with the trunk builder scripts, make sure Xvfb is installed and in your PATH.
Xvfb install: yum install xorg-x11-server-Xvfb

I'm getting a message "Opening the diplay failed" or "Opening the display failed" when I run ./SipToSis_linux
Both Skype and Skype4java on linux require an X server/session. Launch the application from within an X window manager. This can also be caused by X authentication issues.

How do I install Skype on linux
Skype on Centos instructions
Skype on Ubuntu instructions
For other distros, search the internet.

How do I configure DTMF? The following settings are in the siptosis.cfg configuration file. You should not combine multiple SIP DTMF methods as they may conflict - there is no auto setting.

SIP DTMF via RFC2833 (enabled by default):
dtmf2833payloadtype=101 (some servers use 96 or other payload type)
enableSIPInbandDtmfDetector=no
Comment out any dtmfinfotype setting.

SIP DTMF via SIP INFO messages (disabled by default):
enableSIPInbandDtmfDetector=no
dtmf2833payloadtype=-1 (disables the RFC2833 detector)
dtmfinfotype=application/dtmf-relay
or alternatively (the above is most common method)
dtmfinfotype=application/dtmf

SIP DTMF via analog/inband (disabled by default):
dtmf2833payloadtype=-1 (disables the RFC2833 detector)
Comment out any dtmfinfotype setting.
enableSIPInbandDtmfDetector=yes
SipDtmfDetectorHitThreshold=60 - This is the minimum pulse time needed to trigger a DTMF decode.
SipDtmfDetectorSilenceThreshold=6 - This is the minimum silence period required between digits.
For the above 2 parameters, lower values will increase falsing and too high will cause unreliable or no decoding.

If you need analog/inband DTMF decoded even after the connection is active, you need this also.
inbandFullTimeDtmfDetection=yes

For any of the above methods and you want received SIP DTMF sent on to the remote skype user (enabled by default):
sendSipDtmfToSkype=yes

Skype DTMF detection (disabled by default):
Turn on the skype analog detector.
enableSkypeDtmfDetector=yes
SkypeDtmfDetectorHitThreshold=60 - This is the minimum pulse time needed to trigger a DTMF decode.
SkypeDtmfDetectorSilenceThreshold=6 - This is the minimum silence period required between digits.
For the above 2 parameters, lower values will increase falsing and too high will cause unreliable or no decoding.

If you need the Skype received DTMF forwarded on to the SIP connection then you also need the following settings.
sendSkypeDtmfToSip=yes
inbandFullTimeDtmfDetection=yes

The SIP DTMF parameters will also need to be set properly as described previously.

How do I configure the registrar server? Look for the following lines in siptosis.cfg:

#*** register server settings below *** not required if registration is not needed for phone
#set to yes to turn on server registrar
is_registrar=no
#set to yes to allow register of users not already in registar database (users.db)
register_new_users=yes
#set to domains of server - see mjsip doc
domain_names=192.168.0.4

Make the following changes:
is_registrar=yes
domain_names=yourdomain.com
Change yourdomain.com to your required domain. It can be an ip address. It can also have multiple names (separated by a space between names).

I'm getting a message about users.db - how do I get rid of it? This is a message from the built in registrar server. It's not an error. If you register a device with SipToSis, the message will go away. If you never want to register a SIP device with SipToSis, you can turn off the registrar server (recommended for PBX users). In siptosis.cfg make the following change:
is_registrar=no

I can't make it work, how do I get help? Setup can be simple or complicated depending on your capabilities and what you are trying to accomplish. There are many comments in the configuration files to help with settings. I have created some setup guides to help with basic setup:

To try and diagnose an issue, you can try setting logConfigFile=log_debug.properties in the relevant SipToSis config file. Then reproduce the error and view the log file. If you still can't figure it out, you can post a comment on the SipToSis Skype Gateway Forum and hope that someone will answer. You will increase your chances of a response by providing information about the problem and your setup. This means, posting relevant configuration information and console messages. Saying "it doesn't work" won't get you anywhere. Please do not email me, thank you.