Форум русскоязычного сообщества Ubuntu


Считаете, что Ubuntu недостаточно дружелюбна к новичкам?
Помогите создать новое Руководство для новичков!

Автор Тема: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis  (Прочитано 14211 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Vengant

  • Автор темы
  • Новичок
  • *
  • Сообщений: 43
  • RA1AIE
    • Просмотр профиля
    • Радиолюбители Санкт-Петербурга
Пациент - Asterisk 1.8 на Ubuntu-server 9.04. Задача - привязать к астериску аккаунт скайп, чтобы принимать звонки из скайпа на SIP телефон, и звонить с SIP телефона по скайпу. Для этого существует штатное расширение Asterisk производства Digium, но оно коммерческое и лицензии стоят денег. Однако существует свободный проект - SipToSis (http://www.mhspot.com/sts/siptosis.html), позволяющий сделать то же самое.

Итак, как я все это настраивал.
Для запуска Skype в консольном Linux используем Xvfb (X Virtual Frame Buffer) и для настройки Skype с другой машины - x11vnc:

apt-get install xvfb x11vnc

Скачаем и установим собственно Skype:
Качаем последнюю версию с http://www.skype.com, устанавливаем:
dpkg -i skype.deb

Для работы SipToSis необходима Java версии не ниже 1.5. Установим:

sudo apt-get install sun-java6-jre
Cкачаем SipToSis: http://www.mhspot.com/sts/siptosis_download.php

Разархивируем в /etc/siptosis и проставим chmod на исполняемый файл:

chmod +x /etc/siptosis/SipToSis_linux
Теперь настроим asterisk. В users.conf добавим:

[Skype]
username=Skype
type=friend
context=Skype
secret=
host=dynamic
nat=no
dtmfmode=auto
canreinvite=no
incominglimit=1
outgoinglimit=1
call-limit=1
busylevel=1

В extensions.conf добавим
exten => 1001,1,Dial(SIP/Skype/echo123)
И перезагрузим asterisk.

Теперь правим конфиг SipToSis:
sudo nano /etc/siptosis/siptosis.cfg
Закомментируем блок настроек, начинающийся с "#Sample AUTO config with NO registration"
Раскомментируем блок "#Sample Asterisk registration example", поправим:
host_port=5070
contact_url=sip:Skype@127.0.0.1:5070
from_url="Skype" <sip:Skype@127.0.0.1:5060>
username=Skype
realm=asterisk
passwd=
expires=300
do_register=yes
minregrenewtime=120
regfailretrytime=15

Запускаем:
sudo /usr/bin/Xvfb :101 -ac &
sudo DISPLAY=:101 /usr/bin/skype &
sudo x11vnc -display :101 &

Подключаемся с другой машины (в моем случае, с Windows XP через VNC Viewer), вводим в Skype логин-пароль, отключаем все лишнее.

Теперь запускаем :
DISPLAY=:101 /etc/siptosis/SipToSis_linux
Если все сделано правильно, SipToSis запустится и попытается подключиться к Skype. Skype выдаст вопрос - разрешить ли подключение. Разрешаем и ставим галку "запомнить".

Проверяем: набираем с подключенного к Asterisk клиента 1001 - мы должны услышать тестовый звонок Skype.

Чтобы принимать входящие звонки, в  /etc/siptosis/SkypeToSipAuth.props прописываем соответствующее правило. Например:
*,sip:user1@127.0.0.1:5060 - перенаправлять все входящие звонки Skype SIP-юзеру "user1". Естественно, нужно создать в extensions.conf контекст "Skype", в котором разрешить звонки на этот extension.
« Последнее редактирование: 19 Июля 2011, 20:02:50 от Дмитрий Бо »

Оффлайн hs85

  • Новичок
  • *
  • Сообщений: 38
    • Просмотр профиля
Re: [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #1 : 30 Июня 2011, 12:33:04 »
Подскажите, а архива с SipToSis у вас случайно не осталось? Сайт более недоступен.

Оффлайн ttl

  • Новичок
  • *
  • Сообщений: 35
  • Everybody lies.
    • Просмотр профиля
Re: [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #2 : 30 Июня 2011, 16:15:01 »
На счастье - осталось!  :coolsmiley:

Оффлайн hs85

  • Новичок
  • *
  • Сообщений: 38
    • Просмотр профиля
Re: [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #3 : 10 Июля 2011, 09:49:23 »
Спасибо! Уже нашел.
Теперь вопрос по многоканальности.
Есть ли возможность реализовать? Т.е. сделать запуск нескольких скайпов?

Оффлайн ttl

  • Новичок
  • *
  • Сообщений: 35
  • Everybody lies.
    • Просмотр профиля
Re: [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #4 : 10 Июля 2011, 16:05:09 »
digium

Оффлайн hs85

  • Новичок
  • *
  • Сообщений: 38
    • Просмотр профиля
Re: [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #5 : 10 Июля 2011, 16:54:06 »
Вы про транки по 60 баксов? Они уж месяц как продажи закрыли.

Оффлайн ttl

  • Новичок
  • *
  • Сообщений: 35
  • Everybody lies.
    • Просмотр профиля
Re: [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #6 : 11 Июля 2011, 09:54:35 »
На сколько мне известно - Мелксофт купил скайп. Что будет в ближайший год не известно (точне не интересовался). Мне и одного канала хватает...
« Последнее редактирование: 12 Августа 2011, 11:10:59 от ttl »

Оффлайн magistor

  • Новичок
  • *
  • Сообщений: 8
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #7 : 12 Августа 2011, 10:01:23 »
добрый день!
Пробовал настроить по вашей хаутушке, но наткнулся на проблему лог ниже...
Launching SipToSis
2011-08-12 05:38:39,065 Starting SipToSis v20110310
2011-08-12 05:38:39,085 STUN: Error - Unknown Host: stun.xten.net
2011-08-12 05:38:39,089 Skype4Java Version 1.2.0.1
2011-08-12 05:38:39,093 os=Linux ver=2.6.38-8-generic arch=i386 (2 core)
2011-08-12 05:38:39,093 javaVer=1.6.0_22 - Sun Microsystems Inc. (32 bit)
2011-08-12 05:38:39,149 Available Codecs: PCMU(0),PCMA(8),iLBC(98)
2011-08-12 05:38:39,149 DTMF rfc2833(101)
2011-08-12 05:38:39,149 initSkype - If stuck, check Skype online & API auth
2011-08-12 05:38:39,213 PublicIP=["тут мой внешний айпи"]
2011-08-12 05:38:49,166 Skype Status: NOT_AVAILABLE - retrying every 5 seconds
2011-08-12 05:39:04,167 Skype Status: NOT_AVAILABLE - retrying every 5 seconds
2011-08-12 05:39:19,168 Skype Status: NOT_AVAILABLE - retrying every 5 seconds
2011-08-12 05:39:34,169 Skype Status: NOT_AVAILABLE - retrying every 5 seconds
2011-08-12 05:39:49,173 Skype Status: NOT_AVAILABLE - retrying every 5 seconds
2011-08-12 05:40:04,174 Skype Status: NOT_AVAILABLE - retrying every 5 seconds
2011-08-12 05:40:19,175 Skype Status: NOT_AVAILABLE - retrying every 5 seconds
2011-08-12 05:40:30,680 SkypeVer:2.2.0.35
2011-08-12 05:40:30,756 Attached SkypeUserId:ir-pak
2011-08-12 05:40:30,780 Config - skypeClientSupportsMultiCalls:false  concurrentCallLimit:2
2011-08-12 05:40:30,780 SipToSis contact_url=sip:Ir-pak@127.0.0.1:5070
2011-08-12 05:40:30,784 Ext. Srvr (from_url)=sip:Ir-pak@127.0.0.1:5060
2011-08-12 05:40:30,784 via_addr=192.168.5.50  realm=asterisk
2011-08-12 05:40:30,784 RTP Ports: 63200-63202  Local Skype Ports: 64432-64435
2011-08-12 05:40:30,784 jitterLevel=-1
2011-08-12 05:40:30,896 Registrar Server Domains=
2011-08-12 05:40:30,900 WAITING FOR INCOMING CALL
2011-08-12 05:40:30,920 MaxCallTime: not limited MaxPSTNCallTime: not limited
2011-08-12 05:40:30,920 MaxDailyPSTNUniqueNumberCount: 48 MaxDailyPSTNMinutes: 350
2011-08-12 05:40:30,920 Loading Skype PSTN Call History
2011-08-12 05:40:30,924 WAITING FOR INCOMING CALL
2011-08-12 05:40:30,984 0 possible calls to import.
2011-08-12 05:40:31,048 PSTN counters reset at: 00:00:00 UTC
2011-08-12 05:40:31,048 Qualified PSTN calls today: 0 Time: 0 minutes
2011-08-12 05:40:31,152 AcctBalance: 4,86 USD
2011-08-12 05:40:31,152 REGISTRATION
2011-08-12 05:40:31,188 Registration failure: 404 Not found
2011-08-12 05:40:32,188 Failed Registration retrying in 15 seconds.
2011-08-12 05:40:47,189 Registration failure: 404 Not found
2011-08-12 05:40:48,189 Failed Registration retrying in 15 seconds.


также выкладываю siptosis.conf
#        SipToSis configuration file

# ___________________________________________

#



#Set to log_debug.properties for full debugging

logConfigFile=log.properties



#set to yes to turn on recorders - useful for debugging - recordings saved to recordings folder.

recordSkypeIn=no

recordSkypeOut=no

recordSIPIn=no

recordSIPOut=no





#set to yes to run connector tests - this disables normal operation

runConnectorReliabilityTest=no



#linux connector parms

#0=no lock ,1=spinlock,2=mutex,not set defaults to 0

linux_lockmode=0

#not set defaults to 150ms

linux_idleSleepMs=150

#not defaults to 75ms

linux_activeSleepMs=75



#Set to yes to enable logging of skype API messages

skypeAPITrace=no



#how often in minutes to check for configuration changes (0=disable)

configWatchInterval=0



#how often to check for skype client connection - 0 = no checking

connectorWatchDogMinutes=0



#skype PSTN connection fee in your account's currency (example 0.039)

connectionFee=0



#---Call limiting features

#Maximum call length (0=unlimited)

MaxCallTimeLimitMinutes=0

#Minutes before forced cutoff to play warning file

WarnMinutesBeforeCutoff=1

#Warning file to play when nearing call limit

OverLimitWarningFile=clips/overlimit.wav

#SIP response when call refused due to limit reached

OverUsageLimitSipResponse=480

#maximum daily pstn minutes to allow (0=unlimited)

dailyPstnLimitMinutes=350

#max unique numbers that can be called (0=unlimited)

dailyPstnUniqueNumberLimit=48

#Any new call must have at least this many minutes remaining in daily limit

refuseNewPstnCallsWhenRemainingMinutesUnder=5

#maximum pstn call limit (0=unlimited)

MaxPstnCallTimeLimitMinutes=0

#specify to import skype client call history at startup (disable if it takes too long)

loadSkypeClientCallHistory=yes

#list of PSTN number prefixes that are not to be included in the PSTN call count and time

tollFreeNumberPrefixes=1800,1888,1866,1877

#---End of call limiting features



#low balance notifier settings

#send a low balance email when balance gets below this amount (based on your currency) (-1 disables)

#   make sure to set it to one minute or more of your currency

emailWhenBalanceDropsTo=-1

#smtp host (example: mail.something.net)

emailHost=

#smtp port

emailPort=25

#smtp user (not normally needed)

emailUsername=

#smtp password (not normally needed)

emailPassword=

#recipient email addresses seperated by semicolon (example: someone@somewhere.com)

emailRecipients=

#sender of email (example: sender@sender.com)

emailFrom=

#set to yes to send a test message at startup to test your configuration. After a successful test set back to no.

emailTest=no





#interval in minutes to set Skype Online Status (0=disabled)

setSkypeOnlineStatusInterval=0

#status to set to when interval reached (Options: ONLINE,DND,AWAY,INVISIBLE,OFFLINE)

skypeOnlineStatus=ONLINE



#prefix to force sip dialing from a Skype callback

callBackForceSipPrefix=*



#path to SipToSis call history logs

callLogPath=log/



#Files containing Authorization rules

siptoskypeauthfile=SipToSkypeAuth.props

skypetosipauthfile=SkypeToSipAuth.props



#Files containing dialing transforms

SkypeOutDialingRulesFile=SkypeOutDialingRules.props

SipOutDialingRulesFile=SipOutDialingRules.props



#location of ua.jar file

ua_jar=ua.jar



#increase audio threads processing priority (0-2) 0=normal

audioPriorityIncrease=0



#jitter enable and size (-1=disable,0=minimum,1=small,2=medium,3=large,4=extra large)

jitterLevel=-1



#Set to skype_connect=no to disable connection to skype client - for testing purposes

skype_connect=yes



#set to your skype userid you want to attach to. Used for Windows multiple instances and no RunAs.

#skypeUserId=



#Following ports are used by skype to transfer audio to/from siptosis

#  - use any unused ports - uses 2 ports per connection

skype_audioportbase=64432





#Set to yes to enable skype DTMF support - uses more cpu

enableSkypeDtmfDetector=yes

SkypeDtmfGain=1

SkypeDtmfDetectorHitThreshold=30

SkypeDtmfDetectorSilenceThreshold=40

#1 is default - set between .1 and .063 to help with mobile or poor signal dtmf detection

SkypeDtmfDetectorTwistAdjust=1

#shutoff detector after time has elapsed (0=never disable)

autoDisableSkypeDtmfDetectorSeconds=80





#Set to yes to regenerate SIP DTMF to Skype

sendSipDtmfToSkype=yes



#Set to yes to regenerate Skype DTMF to Sip

sendSkypeDtmfToSip=yes



#DTMF Interdigit delay between digits sent out over Skype

skypeDtmfInterDigitDelayms=700



#If using inband detectors, no to detect dtmf only during authentication (saves cpu)

inbandFullTimeDtmfDetection=yes



#set to yes to suppress 180 ringing when making Skype PSTN calls.

suppressSkypePSTNSipRingback=no



#special mode if using skype client manually and an outbound skype call is made, it will attempt a sip call and link the two

JoinManualSkypeOutboundCallToSip=no



#refuse,voicemail,ignore,transferto:skypeid 

#  If you are using a PBX with multiple clients/ids you probably want to use ignore

#  or possibly transferto:nextskypeid:nextskypeid2:nextskypeid3:etc to the next skypeclient in the chain

#  then refuse on the last one

SkypeInboundAllChannelsBusyAction=refuse

#time to wait for succesful tranfer in milliseconds

SkypeTransferTimeoutMs=8000



#If an incoming skype call and sip destination is not available for any reason, what to do with skype call.

#Allowed options: ring or refuse - ring allows the skype client to continue ringing and be answered manually.

SkypeInboundSipDestUnavailableAction=refuse





#busy,transferto:sipurl 

#  If you want multiple outbound channels (AsteriskWin32 does not like this)

#  use transferto:sipurl to the next SipToSis channel in the chain then busy on the last one

SipInboundAllChannelsBusyAction=busy





#enable if skype client can support multiple active calls at same time - trying to lie here won't work

#I have yet to find a client that can do this

skypeclientsupportsmulticalls=no



#For an ATA/SIP Phone set to 2 - this allows two total calls - one will be on hold.

#For a PBX - depending on if the skype client supports multi calls - if not set it to 1

#  otherwise set based on your hardware/bandwidth limitations

concurrentcalllimit=2



#specify in 5 minute increments, 0=disable auto shutdown - siptosis will auto shutdown in x minutes when idle

autoShutdownMinutes=0



#Seconds caller has to enter the pin number

pintimeout=8

#Number of pin entry attempts before auto hangup

pinretrylimit=3



#Seconds caller has to enter the destination number

destinationtimeout=12

#Number of destination entry attempts before auto hangup

destinationretrylimit=3



#SIP authorization system recordings - make your own if you like (wav 16k 16bit mono).

pinFile=clips/enterPin.wav

destinationFile=clips/enterDest.wav

dialingFile=clips/dialing.wav

invalidPinFile=clips/invalidPin.wav

invalidDestFile=clips/invalidDest.wav



#Skype authorization system recordings - make your own if you like (wav 16k 16bit mono).

skypePinFile=clips/enterPin.wav

skypeDestinationFile=clips/enterDest.wav

skypeDialingFile=clips/dialing.wav

skypeInvalidPinFile=clips/invalidPin.wav

skypeInvalidDestFile=clips/invalidDest.wav



#Used for Skypeout only - transmit skype feedback audio during PSTN call attempt

handleEarlyMedia=yes



#relay received SIP session progress audio to incoming skype callers

handleSipEarlyMedia=no



#send a ring tone to incoming skype callers

sendRingToSkypeCaller=no

skypeRingFile=clips/skypeRing.wav

skypeRingInterval=8



#set to yes to send Skype EarlyMedia over SIP/RTP using Session Progress (183) instead of accepting call (200)

#   Note: Setting this to yes may cause problems with some PSTN numbers that use specific types of answering systems

sendSkypeEarlyMediaOverSipSessionProgress=no



#replace the SIP From address with the calling Skype User Id

replaceFromWithSkypeId=no



#set to your dialing prefix for easier call back (probably only useful with replaceFromWithSkypeId=yes)

#fromPrefix=7



#allow stripping or modification of skype incoming call info {regex=replacement} {regex=replacement} etc.

# the following removes +1 from the skype callerid

#skypeCallerIdFilters={^\+1=}



#Send Skype IM when calling skype users - not used for skypeout

sendSkypeIM=no

skypeimmessage=You are about to receive a Skype Voice call from [callerid] [callernumber].

#delay between the IM and the actual skype call in seconds.

sendSkypeImDelay=2



#auto auth settings

autoAddContactCalledUsers=no

autoAddContactAuthMessage=Please authorize me to contact you.





#transport_protocols=udp tcp

transport_protocols=udp



#If you are using an external SIP host, using an outbound proxy can improve security by allowing

#only communication with that host or hosts

#outbound_proxy=127.0.0.1:5060

#outbound_proxy=proxy01.sipphone.com:5060

#you can also do selective routing based on the original target - You can also set a default target for unmatched domains (last entry below)

#outbound_proxy={domain=blah.org,nexthop=somewhereelse.com:5062} {domain=192.168.0.12,nexthop=192.168.0.12:5069} {domain=,nexthop=127.0.0.1:5060}





#via_addr generally should be your PC's IP address.

#via_addr=192.168.0.8

#via_addr=127.0.0.1



#if you have multiple network interfaces, you can select it below

#host_ifaddr=192.168.0.8



#set to your static public IP and you need to communicate to external destination

# - if not static IP, do not set this and use stun settings below

# - to work properly, you should setup port forwarding of SIP and RTP ports.

#publicIP=222.22.222.22



#set to a STUN server (you can specify multiple servers for failover)

# - to work properly, you should setup port forwarding of SIP and RTP ports.

stunServer=stun.xten.net:3478,stunserver.org:3478

#minutes between STUN updates (0=only at startup)

stunTestInterval=30



#If you have SIP signal or one way audio problem with the outside you can try the next two settings.

# - translates messages when communicating with an external destination

# - works in conjunction with publicIP setting or STUN

enableNatTranslate=yes



#translates via address when communicating with an external destination

# - works in conjunction with publicIP setting or STUN

# - works only when enableNatTranslate is enabled

enableNatTranslateVia=no





#Sample AUTO config with NO registration

#  username and password not important in this mode

#  Set to available port to transport SIP messages on siptosis computer

##host_port=5070

##username=skypests

##passwd=unimportantpassword

##do_register=no

# --- end of NO registration example ---



#Sample config with NO registration - use if above auto config doesn't work - change 127.0.0.1 to ip address of computer running siptosis

#  username and password not important in this mode

#Set to available port to transport SIP messages on siptosis computer

#host_port=5070

#contact_url=sip:skypests@127.0.0.1:5070

#from_url="skypests" <sip:5611111111@127.0.0.1:5070>

#username=skypests

#passwd=unimportantpassword

#realm=127.0.0.1

# --- end of NO registration example ---



#Sample config WITH registration to GizmoProject - comment out NO registration info above first and uncomment the following

#contact_url=sip:1747???????@SipToSisIpAddress:SipToSisHostPort

#from_url="1747???????" <sip:1747???????@proxy01.sipphone.com:5060>

#username=1747???????

#passwd=?????

#realm=proxy01.sipphone.com

#expires=120

#minregrenewtime=60

#regfailretrytime=15

#do_register=yes

# --- end of WITH registration example ---





#sample FWD reg example - note the outbound proxy

#host_port=5070

#contact_url=sip:8?????@SipToSisIpAddress:SipToSisHostPort

#from_url="8?????" <sip:8?????@fwd.pulver.com:5060>

#username=8?????

#realm=fwd.pulver.com

#passwd=????

#expires=240

#do_register=yes

#minregrenewtime=120

#regfailretrytime=15

#outbound_proxy=fwdnat2.pulver.com:5060

# --- end of FWD registration example ---





#sample pennytel reg example

#host_port=5070

#contact_url=sip:8?????@SipToSisIpAddress:SipToSisHostPort

#from_url="8?????" <sip:8?????@sip.pennytel.com:5060>

#username=8?????

#realm=sip.pennytel.com

#passwd=123456

#expires=320

#do_register=yes

#minregrenewtime=120

#regfailretrytime=15

# --- end of pennytel registration example ---





#Sample Asterisk registration example - comment out NO registration info above first and uncomment the following.

########################################default
#host_port=5070

#contact_url=sip:skypetestuser@SipToSisIpAddress:SipToSisHostPort

#from_url="skypetestuser" <sip:skypetestuser@asteriskIpAddress:asteriskHostPort>

#username=skypetestuser

#realm=asterisk

#passwd=skypetest

#expires=3600

#do_register=yes

#minregrenewtime=120

#regfailretrytime=15

#########################################end
#########################################my
host_port=5070
contact_url=sip:Ir-pak@127.0.0.1:5070
from_url="Skype" <sip:Ir-pak@127.0.0.1:5060>
username=ir-pak
realm=asterisk
passwd=["Сюда я вёл свой пароль от аккаунта Ir-pak"]
expires=300
do_register=yes
minregrenewtime=120
regfailretrytime=15
############################################

#Puts your fake (or real) DID in RequestLine

#DIDNumber=15551234567

#Puts your fake (or real) DID in To Header

#DIDNumber=to:15551234567

# --- end of Asterisk Reg example ---



#Sample FreeSwitch regisration - can't use 5070 like others

#host_port=5077

#contact_url=sip:skypetestuser@SipToSisIpAddress:SipToSisHostPort

#from_url="skypetestuser" <sip:skypetestuser@freeswitchIPAddress:freeswitchHostPort>

#username=skypetestuser

#realm=freeswitchDeterminedRealm

#passwd=skypetest

#expires=3600

#do_register=yes

#minregrenewtime=160

#regfailretrytime=15

# --- end of FreeSwitch Reg example ---







#do_unregister=yes

#do_unregister_all=yes



#keepalive_time - set to zero to disable keep alives - 0 recommended if using local SIP Server otherwise use 25000 to 45000 if not port forwarding

keepalive_time=0



audio=yes

#following is the SIP RTP port base - use an even port number

audio_port=63200

#auto hangup after no rtp packets received for ? seconds

noRtpReceivedAutoHangupSeconds=30



#only PCMU,PCMA,GSM (jmf lib),GSMTRI (tritonus libs) codecs currently supported - order by preference

#You can append RW to the codec name to disable sample averaging - you will need to use filter with those - see FilterParams.

#Speex doesn't not work well at all - high cpu usage and poor sound quality

audio_codec=PCMU,PCMA,ILBC

#PCMU/PCMA allow 160,240,320 - GSM allows 160 - ILBC allows 240, Speex allows 160, Speex16k allows 320  - need one size for each codec specified

#Some ATA's don't work well with 240 for PCMU/PCMA codecs - change to 160 if needed.

audio_frame_size=240,240,240

#if using dynamic payload types (speex and ilbc) you must specify the payload number (asterisk uses 98,97), if not you can remove this parameter

audio_avp=-1,-1,98



#Audio volume gains - 1 for each codec - (decimal number) 1=flat (no gain), higher=louder, too high will clip or distort

#volume sip->skype

skype_audiooutgain=1,1,1

#volume skype->sip

skype_audioingain=1.2,1.2,1.2



#Filter skype audio before being downsampled and sent to SIP device - enable a filter if using the RW codecs.

#No Filtering

FilterParams=NONE

#RC lowpass filter

#RC,delay time (lower lowers cutoff),RC constant (higher lowers cutoff) - 50,40 is a good starting point

#FilterParams=RC,50,40

#FIR filter

#FIR,Order (higher sharper cutoff and more cpu),window type (RECTANGULAR,HANNING,HAMMING,BLACKMAN),filter type (LP,HP,BP),minFreq,maxFreq

#FilterParams=FIR,100,HANNING,LP,0,3200

#FilterParams=FIR,100,HANNING,HP,300,3200

#FilterParams=FIR,100,HANNING,BP,300,3200



#If yes, will send RTP packets to address received from the otherside

#  instead of what was received in the session descriptor.

#  This may help with one way audio problems.

enableSendRTPtoReceivedAddress=yes



#works with above setting - sending of rtpPackets can be redirected until receiving this number of packets. After that the address is locked.

lockRtpSendAddressAfterPackets=1



#Set to -1 to disable rfc2833 some providers use 96 most use 101

dtmf2833payloadtype=101



#Use these for SIP INFO msg support - first is the most common type

#dtmfinfotype=application/dtmf-relay

#dtmfinfotype=application/dtmf



#Use only if rfc2833 and INFO are not supported - uses more cpu

enableSIPInbandDtmfDetector=no

SIPInbandDtmfDetectorGain=1

SipDtmfDetectorHitThreshold=30

SipDtmfDetectorSilenceThreshold=40

#1 is default - set between .1 and .063 to help with mobile or poor signal dtmf detection

SipDtmfDetectorTwistAdjust=1

#shutoff detector after time has elasped

autoDisableSipInbandDtmfDetectorSeconds=80





#params to control sip response address handling

useViaRport=yes

useViaReceived=yes

#Set to yes to work around stupid ATA's that give out public IP to local lan devices.

enableFixRemoteAddress=yes

#send all responses using outbound proxy - outbound proxy must be set up

sendResponseUsingOutboundProxy=yes

#fixes problem with Linphone

early_dialog=yes



#sip response for any uncovered reason (possibly no skype credit)

baseFailureResponse=403

#sip response if remote skype user refused call

skypeRefusedResponse=603

#sip response if skype call failed (possibly no skype credit)

skypeFailedResponse=408

#sip response if invalid skype user or number

skypeInvalidDestinationResponse=404

#sip response if skype returned unplaced status

skypeUnPlacedResponse=408

#sip response if called party is busy

skypeBusyResponse=600



#network buffers for skype api audio transport (0=leave at OS default)

TcpRxBufferSize=8192

TcpTxBufferSize=8192

#network buffers for RTP audio transport (0=leave at OS default)

RtpRxBufferSize=8192

RtpTxBufferSize=8192

#TOS flags (recommended 0x10 or 0x18) -1 to use platform default

# On windows make sure DWORD HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\DisableUserTOSSetting=0 Does nothing on Vista and later

RtpTosFlags=0x10



#*** register server settings below *** not required if registration is not needed for phone

#set to yes to turn on server registrar or no to disable

is_registrar=yes

#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 somedomain.com

allowMultiContactsPerUser=no

#enable if your ATA/SIP device does not send the port in the request line (FritzBox and others)

domain_port_any=yes



#voicemail clips

vmNoMessagesClip=clips/vmpnomessages.wav

vmPlayingClip=clips/vmpplayingmessages.wav

vmEndOfMessageClip=clips/vmpendofmessageprompt.wav

vmMessageDeletedClip=clips/vmpmessagedeleted.wav

vmMessageDeleteAllClip=clips/vmpmessagedeleteall.wav

vmNoMoreMessagesClip=clips/vmpnomoremessages.wav

vmRecordingBeepClip=clips/vmprecordingbeep.wav

Использую рабочую станцию ибунту "Desktop" с гномом и запущеном скайпе. при запуске siptosis скайп предупреждает о том что эта программа пытается получить доступ, я жму разрешить и ставлю галку что бы запомнить выбор навсегда.

Реально прошу помощи , тема мне интересна и является маленькой мечтой.
Зарание спасибо!
« Последнее редактирование: 12 Августа 2011, 10:13:57 от magistor »

Оффлайн ttl

  • Новичок
  • *
  • Сообщений: 35
  • Everybody lies.
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #8 : 12 Августа 2011, 11:03:39 »
Давайте попробуем разобраться:
Астериском у меня рулит FreePBX (так руководство поставило задачу).
В FreePBX users.conf это будет транк с параметрамы PEER Details:

username=Skype
type=friend
context=Skype
secret=SimplePassword123
host=dynamic
nat=no
dtmfmode=auto
canreinvite=no
incominglimit=1
outgoinglimit=1
call-limit=1
busylevel=1


В extensions.conf я ничего не прописывал, так как настройкой маршрутизации занялся после связки.
Далее

sudo nano /etc/siptosis/siptosis.cfg

Привел к такому виду:

logConfigFile=log.properties
recordSkypeIn=no
recordSkypeOut=no
recordSIPIn=no
recordSIPOut=no
runConnectorReliabilityTest=no
linux_lockmode=0
linux_idleSleepMs=150
linux_activeSleepMs=75
skypeAPITrace=no
configWatchInterval=0
connectorWatchDogMinutes=0
connectionFee=0
MaxCallTimeLimitMinutes=0
WarnMinutesBeforeCutoff=1
OverLimitWarningFile=clips/overlimit.wav
OverUsageLimitSipResponse=480
dailyPstnLimitMinutes=350
dailyPstnUniqueNumberLimit=48
refuseNewPstnCallsWhenRemainingMinutesUnder=5
MaxPstnCallTimeLimitMinutes=0
loadSkypeClientCallHistory=yes
tollFreeNumberPrefixes=1800,1888,1866,1877
#Это я не заполнял и не проверял но и не комментировал
#Примерные настройки возможны такие
emailWhenBalanceDropsTo=-1
emailHost=gmail.com
emailPort=25
emailUsername=SipBalance
emailPassword=GiveMe1Dollar
emailRecipients=adm@gmail.com
emailFrom=SipBalance@gmail.com
emailTest=no
setSkypeOnlineStatusInterval=0
skypeOnlineStatus=ONLINE
callBackForceSipPrefix=*
callLogPath=log/
siptoskypeauthfile=SipToSkypeAuth.props
skypetosipauthfile=SkypeToSipAuth.props
SkypeOutDialingRulesFile=SkypeOutDialingRules.props
SipOutDialingRulesFile=SipOutDialingRules.props
ua_jar=ua.jar
audioPriorityIncrease=0
jitterLevel=-1
skype_connect=yes
skype_audioportbase=64432
enableSkypeDtmfDetector=yes
SkypeDtmfGain=1
SkypeDtmfDetectorHitThreshold=30
SkypeDtmfDetectorSilenceThreshold=40
autoDisableSkypeDtmfDetectorSeconds=80
sendSipDtmfToSkype=yes
sendSkypeDtmfToSip=yes
skypeDtmfInterDigitDelayms=700
inbandFullTimeDtmfDetection=yes
suppressSkypePSTNSipRingback=no
two
JoinManualSkypeOutboundCallToSip=no
SkypeInboundAllChannelsBusyAction=refuse
SkypeTransferTimeoutMs=8000
SkypeInboundSipDestUnavailableAction=refuse
SipInboundAllChannelsBusyAction=busy
skypeclientsupportsmulticalls=no
concurrentcalllimit=2
autoShutdownMinutes=0
pintimeout=8
pinretrylimit=3
destinationtimeout=12
destinationretrylimit=3
pinFile=clips/enterPin.wav
destinationFile=clips/enterDest.wav
dialingFile=clips/dialing.wav
invalidPinFile=clips/invalidPin.wav
invalidDestFile=clips/invalidDest.wav
skypePinFile=clips/enterPin.wav
skypeDestinationFile=clips/enterDest.wav
skypeDialingFile=clips/dialing.wav
skypeInvalidPinFile=clips/invalidPin.wav
skypeInvalidDestFile=clips/invalidDest.wav
handleEarlyMedia=yes
handleSipEarlyMedia=no
sendRingToSkypeCaller=no
skypeRingFile=clips/skypeRing.wav
skypeRingInterval=8
sendSkypeEarlyMediaOverSipSessionProgress=no
replaceFromWithSkypeId=no
sendSkypeIM=no
skypeimmessage=You are about to receive a Skype Voice call from [callerid] [callernumber].
sendSkypeImDelay=2
autoAddContactCalledUsers=no
autoAddContactAuthMessage=Please authorize me to contact you.
transport_protocols=udp
domains (last entry below)
stunServer=stun.xten.net:3478,stunserver.org:3478
stunTestInterval=30
enableNatTranslate=yes
enableNatTranslateVia=no
running siptosis
host_port=5070
from_url="skype" <sip:skype@127.0.0.1:5060>
username=skype
realm=asterisk
passwd=SimplePassword123
expires=3600
do_register=yes
minregrenewtime=120
regfailretrytime=15
following
45000 if not port forwarding
keepalive_time=0
audio=yes
audio_port=63200
noRtpReceivedAutoHangupSeconds=30
FilterParams.
audio_codec=PCMU,PCMA,ILBC
audio_frame_size=240,240,240
audio_avp=-1,-1,98
skype_audiooutgain=1,1,1
skype_audioingain=1.2,1.2,1.2
FilterParams=NONE
enableSendRTPtoReceivedAddress=yes
lockRtpSendAddressAfterPackets=1
dtmf2833payloadtype=101
enableSIPInbandDtmfDetector=no
SIPInbandDtmfDetectorGain=1
SipDtmfDetectorHitThreshold=30
SipDtmfDetectorSilenceThreshold=40
autoDisableSipInbandDtmfDetectorSeconds=80
useViaRport=yes
useViaReceived=yes
enableFixRemoteAddress=yes
sendResponseUsingOutboundProxy=yes
early_dialog=yes
baseFailureResponse=403
skypeRefusedResponse=603
skypeFailedResponse=408
skypeInvalidDestinationResponse=404
skypeUnPlacedResponse=408
skypeBusyResponse=600
TcpRxBufferSize=8192
TcpTxBufferSize=8192
RtpRxBufferSize=8192
RtpTxBufferSize=8192
RtpTosFlags=0x10
is_registrar=yes
register_new_users=yes
allowMultiContactsPerUser=no
domain_port_any=yes
vmNoMessagesClip=clips/vmpnomessages.wav
vmPlayingClip=clips/vmpplayingmessages.wav
vmEndOfMessageClip=clips/vmpendofmessageprompt.wav
vmMessageDeletedClip=clips/vmpmessagedeleted.wav
vmMessageDeleteAllClip=clips/vmpmessagedeleteall.wav
vmNoMoreMessagesClip=clips/vmpnomoremessages.wav
vmRecordingBeepClip=clips/vmprecordingbeep.wav


При каждой перезагрузке нужно перезапускать VNC сервер и сам siptosis.
У меня это делает скрипт из rc.local.

sudo /usr/bin/Xvfb :101 -ac &
sudo DISPLAY=:101 /usr/bin/skype &
sudo x11vnc -display :101 &

DISPLAY=:101 /etc/siptosis/SipToSis_linux


Не забываем об:

mcedit /etc/siptosis/SkypeToSipAuth.props

У меня:

*,sip:706@127.0.0.1:5060
*,play:clips/invalidDest.wav

Здесь 706 - это Extention в FreePBX, на который нужно звонить.
И на конец - в настройках входящей маршрутизации указываем переадресацию с 706 на необходимый номер (у меня это группа 703).
« Последнее редактирование: 12 Августа 2011, 11:16:24 от ttl »

Оффлайн ttl

  • Новичок
  • *
  • Сообщений: 35
  • Everybody lies.
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #9 : 12 Августа 2011, 11:08:42 »
Судя из Ваших логов - скайп авторизуется - показывается баланс. Нужно проверять связку с астериском;) Может проблема в том, что не заведен Extention? Попробуйте добавить контакт скайпа в другой клиент и понаблюдайте - появляется ли в сети "сервер".

Оффлайн klistrod

  • Новичок
  • *
  • Сообщений: 1
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #10 : 18 Декабря 2011, 01:05:22 »
Сделал как все написано но выбивает ошибка при звонке:
WARNING[8756]: app_dial.c:2198 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown)

Оффлайн ttl

  • Новичок
  • *
  • Сообщений: 35
  • Everybody lies.
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #11 : 19 Декабря 2011, 18:39:35 »
Напишете вашу связку и сразу - проверьте права на исполнение файлов в директории siptosis.

Оффлайн Pasha_49

  • Новичок
  • *
  • Сообщений: 3
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #12 : 04 Мая 2012, 13:31:24 »
Спасибо за данный метод, всё работает. Но есть 1 вопрос. Я могу так позвонить определенному контакту в скайпе по его логину. А как мне сделать групповой звонок? Есть группа, сохранена в закладки, и как совершить туда звонок?

Оффлайн ttl

  • Новичок
  • *
  • Сообщений: 35
  • Everybody lies.
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #13 : 04 Мая 2012, 14:37:46 »
Рекомендую отказаться от SipToSis - малоэффективный... желаемого результата врятли вы добьетесь.
Переходите на freeswitch mod_skypopen. Вещь интересная, быстро подымается и работает так, как вам нужно. Можно "подружить" со Asterisk-ом.
Испытывал на Ubuntu х32, а так же х64.
С помощью этого мода можна набрать определенный skype-uin. Получится направление типа: SIP/Skype/{Skype_NickName}.
Если группа имеет имя - думаю возможно позвонить и на группу, но сам не пробовал.
На echo123 (Test Skype Micro) дозваниваюсь с первого гудка...
« Последнее редактирование: 04 Мая 2012, 14:41:42 от ttl »

Оффлайн Pasha_49

  • Новичок
  • *
  • Сообщений: 3
    • Просмотр профиля
Re: [Wiki] [HOWTO] Cвязка Asterisk и Skype через SipToSis
« Ответ #14 : 07 Мая 2012, 10:39:10 »
Спасибо, попробую. С помощью SipToSis дозванваюсь на skype-uin, он так же есть у Test Skype Micro. А у групп нету skype-uin, не знаю как найти какой-нибудь id группы. А имя группы хранится только на локальном скайпе. Кстати с SipToSis я могу звонить максимум раз в минуту, какая-то задержка есть между звонками. Если звонить чаще, ошибки вылазят.
А можете поделиться конфигами freeswitch mod_skypopen?

 

Страница сгенерирована за 0.036 секунд. Запросов: 25.