User Tools

Site Tools


software:freepbx

FreePBX

How-Tos

epel repository

If you want to use epel repositories to install Skype and other programs you have to exclude some packages in order to avoid conflicts.

# nano /etc/yum.repos.d/epel.repo

[epel]
...
exclude=libresample,fail2ban,libsrtp,libsrtp-devel,nodejs,nodejs-devel,npm

Skype in/out calls

  1. Add epel and nux.ro repositories, don't forget to exclude conflicting packages (see the section above)
  2. Install skype, java, x11 and dbus
    # yum install skype java xorg-x11-server-Xvfb x11vnc dbus-x11
  3. Prepare logfile for SipToSis
    # mkdir /var/log/siptosip.log
    # chgrp asterisk /var/log/siptosip.log
    # chmod 660 /var/log/siptosip.log
  4. Download and configure SipToSis
    # su - asterisk
    $ mkdir siptosis ; cd siptosis
    $ wget "http://latest-siptosis-package.tar.bz2"  # Look on Google for a website to download it
    $ tar xvjf latest-siptosis-package.tar.bz2
    $ nano siptosis.cfg
    
         ...
         #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=AsteriskUserForSiptosipTrunk
         passwd=AsteriskPasswordForSiptosipTrunk
         realm=asterisk # change this according to your PBX
         do_register=no
         # --- end of NO registration example ---
         ...
         
    $ nano SkypeToSipAuth.prop
    
         ...
         #Examples:
         *,sip:AsteriskUserForSiptosipTrunk@192.168.1.1:5060 # DON'T FORGET TO CHANGE USER, IP AND PORT ACCORDING TO YOUR ASTERISK CONF. For instance if you are using pjsip for extensions on port 5060 and sip for trunks on port 5061 YOU MUST use 5061 in this row otherwise SipToSis will try to authenticate itself calling the pjsip instance that doesn't know it as a trunk.
         ...
         
         ...
         #Default: all incoming skype callers get the invalid destination message
         #*,play:clips/invalidDest.wav
         ...
  5. Create a start script
    $ cd
    $ nano startskype
    
         #!/bin/sh
    
         SKYPE_BINARY="/usr/bin/skype"
         SIPTOSIS_BINARY="/home/asterisk/siptosis/SipToSis_linux"
         
         /usr/bin/Xvfb :101 -ac &
         sleep 15
         DISPLAY=:101 pulseaudio &
         DISPLAY=:101 ${SKYPE_BINARY} &
         x11vnc -display :101 &
         DISPLAY=:101 ${SIPTOSIS_BINARY} > /var/log/siptosip.log &
    
    $ chmod +x startskype
  6. Create a stop script
    $ nano stopskype
    
         #!/bin/sh
         
         killall "pulseaudio"
         killall "skype"
         killall "SipToSis_linux"
         killall "x11vnc"
         killall "Xvfb"
         
    $ chmod +x stopskype
  7. Start Skype
    $ ./startskype
  8. Connect to the X server with your favorite VNC client, login with your account (Don't forget to tick “Remember me”!) and authorize SipToSis plugin
  9. Go to FreePBX trunks configuration and create a new trunk with the following parameters:
    GENERAL
    Trunk name: Skype
    Outbound CallerID: [yourSkypeUsername]-Skype
    
    SIP SETTINGS
    outgoing
    Trunk name: out-Skype
    PEER Details:
         username=AsteriskUserForSiptosipTrunk
         type=friend
         secret=AsteriskPasswordForSiptosipTrunk
         context=from-trunk
         host=127.0.0.1
         port=5070
         nat=never
         dtmfmode=auto
         canreinvite=no ;(possibly set to yes if you know what you are doing)
         insecure=port,invite
         qualify=yes ; optional
         incominglimit=1
         outgoinglimit=1
         call-limit=1
         busylevel=1
         permit=127.0.0.1/255.255.255.255&[your_ips]/255.255.255.255
    incoming
    User Context: Skype
    USER Details:
         host=192.168.122.154
         port=5070
         insecure=port,invite
         secret=AsteriskPasswordForSiptosipTrunk
         type=friend
         username=AsteriskUserForSiptosipTrunk
         user=AsteriskUserForSiptosipTrunk
         fromuser=AsteriskUserForSiptosipTrunk
         nat=no
         qualify=yes
         disallow=all
         allow=ulaw&alaw&ilbc&speex
  10. Configure an outbound route
    ROUTE SETTINGS
    Route name: Skype
    Trunk Sequence for Matched Routes: Skype
    
    DIAL PATTERNS
    prefix: 9999
  11. Apply the new configuration and try a test call to 9999[skype-username] (e.g. 9999echo123)

Special numbers to call directly a Skype username (useful for a quick dial or when you can write just numbers on your phone keyboard)

  1. Create a custom extension with the following parameter:
    GENERAL
    User Extension: [number_that_you_will_call]
    Display Name: [skype-username-of-your-friend]
    Link to a Default User: None
    
    ADVANCED
    Dial: SIP/Skype/[skype-username-of-your-friend]
  2. Apply the new configuration and try a test call to [number_that_you_will_call]
software/freepbx.txt · Last modified: 2017/02/15 09:09 by Michele Porelli