Show some LOVE, LIKE our page :)

Tuesday, October 21, 2014

POODLE SSLv3 Vulnerabilities Fixes on Debian/pfSense for common widely used apps

Systems or apps that enabled SSLv3 is vulnerable and the only way currently is to disable SSLv3 in various software, applications. Whenever you see any cert that says Version V3, it is vulnerable and must be disabled until further notice.
Ref: CVE-2014-3566

IMPORTANT

  • USETHIS GUIDE AT YOUR OWN RISK, i am not responsible for any broken apps/programs etc etc.
  • We do not know the extent of the vulnerability/fixes this is from best knowledge and effort, you are advised to research of your own too and not completely rely on these below. These methods are also described in many many online articles, i put them together mainly for our customers and people using Deb6/7.
  • This article is to be done/performed by those who have sufficient knowledge in these apps/software
  • Please read more articles and follow online security resources for updates should there be any.
  • Until a patch is released, customers are advised to simply disable SSLv3 as part of an enforced or fallback method for providing encryption.

Software that we use/distribute

1) Apache
2) Asterisk
3) Nagios (and related software)
4) pfSense and related software (e.g. OpenVPN)
5) Other related software

There are many guides out there and (i’ve) we have copied some of them for the ease of our clients

Apache fix

#nano /etc/apache2/mods-available/ssl.conf
Locate the value SSLProtocol, if it doesn’t exist, add exactly as below within the </ifmodule> tag
SLProtocol all -SSLv2 –SSLv3
if exist in that file, change as below
SLProtocol all -SSLv2 to  SLProtocol all -SSLv2 –SSLv3

Restart apache
#/etc/init.d/apache2 restart

A simple test for apache would be to run
#openssl s_client -ssl3 -connect localhost:443

It should throw an error like handshake failure, that’s good!, SSLv3 is disabled on Apache!

Asterisk fix

Read stuff here: http://downloads.asterisk.org/pub/security/AST-2014-011.html

For Asterisk 11

Go to your Asterisk 11 source directory
#cd /usr/src/asterisk-11…..
If don't exist, just download from http://downloads.asterisk.org/pub/telephony/asterisk/. NOTE: Asterisk 11.13.1 fixes this so you don’t have to patch as below if you are redownloading.
#wget http://downloads.asterisk.org/pub/security/AST-2014-011-11.diff
#patch –p0 < AST-2014-011-11.diff

For recent installs (2013 onwards):
#make clean && ./configure --with-crypto --with-ssl --with-srtp=/usr/local/lib --prefix=/usr
#make && make install

Older Installs simply run (Skip if the above worked!)
#make clean && ./configure

For Asterisk 1.8

Go to your Asterisk 1.8 source directory
#cd /usr/src/asterisk-1.8…..
If don't exist, just download from http://downloads.asterisk.org/pub/telephony/asterisk/. NOTE: Asterisk 1.8.31.1 fixes this, so you don’t have to patch as below if you are redownloading
#wget http://downloads.asterisk.org/pub/security/AST-2014-011-1.8.diff
#patch –p0 < AST-2014-011-1.8.diff
#make clean && ./configure --with-crypto --with-ssl --with-srtp=/usr/local/lib --prefix=/usr

Older Installs simply run (Skip if the above worked!)
#make clean && ./configure

#make && make install

For both 1.8 and 11, restart Asterisk (FreePBX users!)
#amportal kill
#amportal start

Nagios fix

[Nagios info contributor: Anthony [at..]] Astiostech.com
Nagios itself as a monitoring system doesn't use SSL in the monitoring core itself. With the POODLE SSLv3 Vulnerabilities in mind, so far Nagios itself is not vulnerable to the issue as the following explains.

Nagios Console (Monitoring Core)

Nagios Core monitoring engine doesnt use SSL in itself. It is only used by the Nagios Web Console or any Nagios Web Configuration Editor. These web consoles are very dependant on the running HTTP server in the system. Therefore the POODLE vulnerabilities on the CORE Nagios should be properly handled by the HTTP server itself.

Nagios NRPE

SSL option in NRPE is used to encrypt the monitoring data. When this is switched on Nagios NRPE encrypts the data between the Nagios Core and the remote server. According to the file 'src/nrpe.c' line 256, since January 19th 2004, by default SSLv3 and SSLv2 has been disabled in NRPE and only TLS protocols are used. Therefore it is considered safe if the SSL is enabled in the NRPE agent.

Nagios NDO2DB

SSL option in NDO2DB is used to encrypt the received monitoring data from Nagios. When this is switched on Nagios NDO2DB encrypts the data between the Nagios Core and the NDO2DBserver. According to the file 'src/ndo2db.c' in line 167, since January 19th 2004, by default SSLv3 and SSLv2 has been disabled in ndo2db and only TLS protocols are used. Therefore it is

pfSense fix

The webserver

Go into the shell of pfsense, and run
#openssl s_client -connect localhost:443 -ssl3
If you see a value other than NONE in the cipher then its vulnerable and must be fixed.

Using the WebUI, we will download and install the system patch manager
1) Goto System, go to Packages, click on Available Packages
2) Locate System Patches and add it/install it
3) Go back to System, click on Patches
4) Click on + to add new patch
5) If using 2.2x, enter this “5ff7f58e5903cca4f99edd20f9db402163527fd6” without quotes as the commit ID
6) If using 2.1x, enter “29be59ad8ed25830f4e50a89977aca53ad8a29f4” without quotes as the commit ID
7) Click on Save, then it will bring you out to the main page, click on Fetch. Wait for it to complete. Now, you should see the word test, click on test. Once you can test, it will tell you patch can be applied cleanly. If only so, click Apply. If not, you’ve done something wrong :(
8) Restart the webservice
9) Point your browser to /restart_httpd.php, say if your pfsense IP is https://10.10.10.1 then just point to https://10.10.10.1/restart_httpd.php
10) Run again
#openssl s_client -connect localhost:443 –ssl3
You should now get an error!

The OpenVPN

OpenVPN uses TLS so it is not vulnerable. OpenVPN uses TLSv1.0, or (with >=2.3.3) optionally TLSv1.2 and is thus not impacted by POODLE. [src pfsense forum]

Other software that uses SSLv3

If you are aware of any other encrypting software that may use SSLv3, you might need to search for documents online on how to disable SSLv3 within the app’s implementation. If you know of such app and need help from us, do contact us and we will have a look at it.

Saturday, October 11, 2014

Debian 7 (wheezy) based Asterisk 12, Freepbx 12 on VMware / Virtualbox (Asterisk VM/Asterisk Ready Virtual Machine)

Show some love,  do like our FB page www.fb.com/Astiostech |

 

[UPDATED: 10 OCT 2014]

Here’s a VMDK image to run a full featured Asterisk PaBX with FreePBX as the management UI using our default and secure install practices. No registrations, no username/password, no signing up for newsletter.

Get it from Sourceforge: https://sourceforge.net/projects/debianasterisk/ [Select SWSterisk12 folder, then download the zip file therein]

 

After extracting, You either need VirtualBox or VMPlayer/VMWare or any Virtualization products that supports VMDK files or if you’re using Hypervisor, convert the image to VHD using MVMC from here.  This is to give you a feel of Asterisk with FreePBX without worrying about installation etc., its plug and play, literally. Just start up to your VirtualBox/VMplayer and get it up and running in seconds. Go in to FreePBX and start creating extensions and enable other features.

This image is free from any lockdowns or customizations that you cannot reverse or disable or enable as you wish. It is completely FREE from any personal restrictions.

This image does not trace usage, or “dials home” or anything strange like that. Totally clean, totally lean and totally fast. It is functional and you can hook it up to a real production environment and you almost have a full fledge PBX, just add a Digium VoIP Gateway or another IP based PSTN.

IMPORTANT

  • DISCLAIMER: By using this VIRTUAL MACHINE IMAGE, i disclaim any sorts of liability whatsoever. What you do with this image is purely your choice/actions.
  • This is not "another distros", nothing proprietary, i don't claim any copyrights, just make it look and feel like its mine for fun, but of course any of those customizations can be reversed. All other trademarks are properties of their respective owners. All rights reserved.
Here’s some information about the VM image you just downloaded
  • It’s in ZIP compression, just get WinRAR or 7-ZIP to extract. After extracting, there should be one vmdk just mount the vmdk into VMWare/VMPlayer or Virtualbox and start the image
  • Username/password
  • OS
    - Username: root (the other non root user is support with same password as below)
    - Password: asteriskrocks (change this!)
  • FreePBX(admin), MySQL(root), AMI(admin): usernames and passwords;
    username: admin
    password: @steriskRocks1 (change this, here’s a good guide to start you off withhttp://www.freepbx.org/support/documentation/installation/first-steps-after-installation)
  • REMEMBER REMEMBER REMEMBER: CHANGE PASSWORDS!
  • The network adapter is set to auto on eth0.
  • Image needs at least 384M memory (or more if you have more)
  • All source files except kernel-headers are removed to save disk space for downloading, you need to download them manually (Size before compression ~ 2.2GB, size after compression ~600M)

OS features/settings

  • Debian 7.6.0 64bit (Source AMD64 netinstall)
  • Disks are LVM so you can add more storage
  • The interface, eth0, is set to use DHCP, so be sure to hook up DHCP or manually edit the IP. IPV6 is disabled. In case you can’t bring the interface up, run #ifconfig –a . Then edit the file in /etc/network/interfaces and set all values to correspond to the interface shown when you run ifconfig –a (not loopback of course)
  • Webmin installed but not started (# /etc/init.d/webmin start , then access using https://<ipaddress>:10000) . Use sparingly, has many holes if it doesn’t get updated constantly.
  • Apache as webserver with enforced HTTPS (Port 443)
  • MySQL administration with Adminer in https://<ipaddress>/dbmanage.php
  • Phpsysinfo https://<ipaddress>/phpsysinfo
  • Munin for monitoring in https://<ipaddress>/munin
  • DHCP and TFTP server downloaded, not installed
  • Firewalled with IPTables (be sure to see /bin/wallfire.sh) - can be stopped and started #wallfire stop #wallfire start
  • Time i.e NTP autosyncs with ntp.org daily, when starting and when stopping
  • Exim4 (mailserver) configured to relay, configure your email appropriately #dpkg-reconfigure exim4-config
  • fail2ban properly set up and ready for ssh and asterisk failed attempts (modify notification email here /etc/fail2ban/jail.conf)
  • Free from bash vulnerability :-)
  • Many CLI tools for troubleshooting like tcpdump, ntop, htop…
  • Astribank support [if ever u need it]
FreePBX/Asterisk features
  • FreePBX 12 with most basic and extended modules pre-installed
  • Asterisk 12.6 (Dahdi tools/linux 2.10.0.1/LibPRI). NOTE I have set to chan_sip as the default sip driver, not pjssip. Had issues with fail2ban and other things. But all other components will work fine, not to worry. Change as you see fit.
  • Asterisk runs as high priority (Nice = 10)
  • New version of g711 selected
  • H323 Enabled
  • SRTP enabled (GoogleTalk/XMPP/Jingle + Secure RTP)
  • Iksemel for GoogleTalk/XMPP/Jingle
  • Asterisk-CEL logging enabled (in DB/table asteriskcdr/cel)
  • Log rotation enabled for files inside /var/log/asterisk/
  • Extra codecs: Speex (wanted to add SILK and openg729 but they seem to crash Asterisk codec translators)
  • WebRTC ready using FreePBX’s UAC
    • Notes on using this
      • A test user has been created for you to immediately use.
      • Click on UCP.
      • Username: 2000, password 2000 (password can be changed under User Management)
      • When using Chrome, be sure to check and enable “unsafe script” on top right corner in the address bar
      • Be sure ports 80 (or 443), ports 8088 both TCP are opened to this box
      • Here’s me making a test call with that user 2000 inside UCP
      • image 

Tuesday, October 7, 2014

Error 0x0000005d when installing Windows 10 tech preview on Oracle VirtualBox (4.3.x)

Thought of quickly setting a note on this. If you get this error with Windows 10 Tech Preview on Virtual Box, you probably have to set the in the General Setting to Windows 8.1 (32 or 64 bit depending on your version you’ve downloaded).

image

Also be sure to have sufficient video memory > 32M, reboot and start installation. Cheers :-)

Thursday, October 2, 2014

FreePBX RCE vulnerability CVE: 2014-7235

The FreePBX team has been made aware of a security vulnerability affecting one of its modules called the Asterisk Recording Interface (ARI). While many of our users do not use this module on a day to day basis, it is almost available in all our installs. 

Important Notes

  • This vulnerability allows unauthenticated remove execution of code via the web and execute shell commands which are then limited to the rights of the apache process (in our client's cases, that would be low privilege user asterisk). However, this user has rights to manage the Asterisk, FreePBX and other web related software or services.
  • FreePBX versions affected: Any version prior to version 12 (e.g. 2.8,2.9,2.10,2.11). 
  • All OS versions
  • This is a FreePBX only bug, not Asterisk, not OS, etc..
  • It is safe to upgrade during production/live. Restarts or reboots are not required

The fixes are available since 30 Sept 2014 and users are advised to run the following commands and/or run from via the web interface or the module admin page: The following commands may require internet access from the Asterisk/FreePBX console to perform the upgrade.

(Do not copy the '#' when pasting into the putty/CLI interface, they are indicators of command line codes)

#rm -rf /var/www/html/admin/modules/admindashboard
#amportal a ma delete admindashboard

NOTE: You may NOT have the above modules installed, even if in error, ignore and proceed as below;

Now, locate and delete these files like below

#for i in `find / -name 'c2.pl' -print`; do rm -i $i; done
#for i in `find / -name 'c.sh' -print`; do rm -i $i; done

The above command will search through any of the automated hacking scripts (if exists) and ask you to remove, just hit [y]es if you find them. Otherwise, the command will return an empty output.

Finally, and most importantly, get the upgrade;
#amportal a ma upgrade fw_ari
#amportal a r

Alternatively, you can upgrade the module as show above via the FreePBX module admin module too.

Systems that expose the http/https port TCP80 or TCP443 (or FreePBX) interface via the internet is at particularly higher risk, you are advised to immediately close all access from the Internet to your FreePBX webUI and should be doing so anyway for best security practice.

For more detailed understanding, please checkout article: http://goo.gl/6JT3oT

Friday, September 26, 2014

Bash vulnerability possible quick fix for Debian 6 and 7 (squeeze and wheezy) - "CVE-2014-6271" or more CVEs

A bug discovered by Stephane Chazelas

IMPORTANT - MUST READ:

  • USE AT YOUR OWN RISK, i am not responsible for any broken apps/programs etc etc. Don’t sue me, im not rich anyway.
  • We do not know the extent of the vulnerability/fixes this is from best knowledge and effort, you are advised to research of your own too and not completely rely on these below. These methods are also described in many many online articles, i put them together mainly for our customers and people using Deb6/7.
  • This article is to be done/performed by people who know how to use bash and shell codes, not for newbies
  • Please read more articles and follow online security resources for updates should there be any. If you need to reupgrade, just follow steps below again, in case there’s a better fix/newer version.

NOTES

  • Note on command line operations: the # means its a shell code to run, copy paste that in your SSH console

Intro

For immediate fix to possible vulnerable users: e.g. using vulnerable bash with bash codes that may run on publicly exposed protocols such as SSH/HTTP etc where publicly accessible shell codes are possible. 

More reading: (askubuntu has an easy article to understand)

Test and Check Version

Note # denotes copy and paste into shell, don’t copy the # itself, copy after it, everything should be a single line unless said otherwise

1) Logon to your OS using SSH

2) Run the following 

#curl https://shellshocker.net/shellshock_test.sh | bash

If you see the output showing "vulnerable" from 7 out of 7 checks, you need to fix, therefore, proceed to fix as below. 

3) To check bash version, run, you might need this info as you may be upgrading to a higher version of bash as shown in this article. this article for debian 6 will assume bash 4.1;

#dpkg -s bash | grep Ver

Fix

Fix for Squeeze (Deb6)

Following a guide from http://www.tannkost.no/2014/09/compile-bash-from-source-to-remedy-shellshock-on-debian-lenny/

1) Do this in the /usr/src dir
#cd /usr/src
#wget http://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz
#tar zxvf bash-4.1.tar.gz
#cd bash-4.1

2) Fetch all patches, including latest ones that patches all related CVEs, note if you are using bash 4.2x then change accordingly, eg change to 4.1 to 4.2 and 41 to 42 so on. Since more and more patches are coming up, i am setting the possible number of patches to 25, at time of writing, there are 17 patches.

#for i in $(seq -f "%03g" 0 25); do wget -nv http://ftp.gnu.org/gnu/bash/bash-4.1-patches/bash41-$i; patch -p0 < bash41-$i; done

#./configure && make
#make install

#mv /bin/bash /bin/bash.old
#ln -s /usr/local/bin/bash /bin/bash

3) Check that you're not vulnerable anymore wiith the output of the following
# it should not output vulnerable word anymore
#curl https://shellshocker.net/shellshock_test.sh | bash

4) You can and also should delete the old one that's a problem
#rm /bin/bash.old

5) Rerun Test!, you should not be vulnerable anymore.

Fix for Wheezy (Deb7)

1) Just run below for Wheezy

#apt-get update

#apt-get install --only-upgrade bash

2) Rerun Test!, you should not be vulnerable anymore. Your bash version should also be higher than that specified above in the MUST READ section.

---http://highsecurity.blogspot.com--- ---RSS http://feeds.feedburner.com/highsecurity---

Friday, August 1, 2014

Fixing magnet links on Google Chrome (and re-associate with uTorrent or <insert.favourite.torrent.program.here>)

NOTE: This post is for education purposes only.

Spent some time trying to fix and after reading/following some resources online like youtube links and others, they still didn't’ seem to work for me. Finally, found this regkey, changed one value and it worked for me. It may help you too..

The association of magnet links on torrent sites (which most of them use instead of a .torrent file) may break if you’ve installed/uninstalled a program that also handles magnet/torrent links and may have override your favorite torrent proggie e.g. uTorrent as your default torrent handler.

And now, Google Chrome won’t associate/open uTorrent when you click the image icon or this type of link image 


So, first do try the following:

1) This Youtube link http://www.youtube.com/watch?v=6nELJpK7B5E

2) This other resource http://www.metserve.com/blog/magnet-links-working-with-chrome

 

If those links still don’t help or the problem isn’t fixed, fear not, there’s one other thing you can do:,

1) Open up the registry (click start, then run, regedit). In Windows 7 or higher, just type in the application bar search box

2) Look for the following key
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\magnet\UserChoice

3) Edit the REG_GZ value for ProgID and enter your favourite program you wish to associate with, e.g. uTorrent
(How to find my program’s progID - http://www.ehow.com/how_6871656_progid.html

 

image

 

And done! IT should work now. Cheers!

Friday, June 20, 2014

Monast – An uber cool FREE web based monitoring for Asterisk (an install guide for Debian users)

I had the chance to install and use Monast (http://monast.sourceforge.net/) by Diego Aguirre and found it extremely useful, simple, fast and FREE to monitor Asterisk 1.4 or higher (this guide uses Asterisk 11.x). Thought i’d share this how to for basic asterisk monitoring needs. Even though the project has not been updated for years, i still find it super useful and works on Asterisk 11 for me just fine.

Important notes:

  • This guide is for users of Debian 32/64, other platforms can adapt, esp the “apt” parts :-)
  • You should already have a running FreePBX (or at least Apache and related libraries) if you do not have FreePBX
  • This guide would likely work for Ubuntu as well

Follow this guide to get it up and running in minutes

  1. Update your apt and get some packages
  2. #apt-get update
  3. #apt-get install python-twisted python-zope.interface php-pear
  4. #pear install HTTP_Client
  5. Get starpy package and install it
  6. #cd /usr/src
  7. #wget -O starpy-1.0.0a13.tar.gz http://downloads.sourceforge.net/project/starpy/starpy/1.0.0a13/starpy-1.0.0a13.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fstarpy%2Ffiles%2Fstarpy%2F1.0.0a13%2F&ts=1402506121&use_mirror=jaist
  8. #tar –zxvf starpy-1.0.0a13.tar.gz
  9. #cd starpy-1.0.0a13/
  10. #./setup.py install
  11. #cd ..
  12. Now download monast
  13. #wget –O monast-3.0b4.tar.gz http://downloads.sourceforge.net/project/monast/Monast%20for%20Asterisk%201.4%2C%201.6%20and%201.8/3.0b4/monast-3.0b4.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmonast%2Ffiles%2FMonast%2520for%2520Asterisk%25201.4%252C%25201.6%2520and%25201.8%2F3.0b4%2F&ts=1403193094&use_mirror=jaist
  14. #tar -zxvf monast-3.0b4.tar.gz
  15. #cd monast-3.0b4/
  16. At this point below, simply use the defaults, change if you know what you’re doing….
  17. #./install.sh
  18. Now, lets create an AMI user using FreePBX’s
  19. Note, use the module Asterisk Manager Users and its a recommended way to add AMI users
  20. Create a new manager user called monastfpbx with a secret like this “mysecret123”, select ALL for read, and ALL for write

    Example below
    image
  21. Submit and apply
  22. If you do not have/use this module, create you own user like this in [freepbx users] /etc/asterisk/manager_custom.conf or rest of the world /etc/asterisk/manager.conf

    [monastfpbx]
    secret = mysecret123
    deny=0.0.0.0/0.0.0.0
    permit=127.0.0.1/255.255.255.0
    read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
    write = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
  23. Then reload the manager module #asterisk –rx “manager reload”
  24. Now, edit the monast config file
  25. #nano /etc/monast.conf
  26. Look for the following and change per suggested here (basic setup, change others if you know what you’re doing)

    auth_required = true

    [server: Server_1] # Server name can not contains space
    hostname = 127.0.0.1
    hostport = 5038
    username = monastfpbx
    password = mysecret123

    default_context = from-internal
    transfer_context = from-internal-xfer

    [user: admin]
    secret  = secret12345
    roles   = originate,queue,command,spy
    servers = ALL
  27. Save and exit
  28. Now, lets test start monast
    #/opt/monast/monast.py
    You should see this at minimum (ignore server_2 errors)
    [Fri Jun 20 19:17:05 2014] NOTICE   :: Initializing Monast AMI Interface...
    [Fri Jun 20 19:17:05 2014] NOTICE   :: Parsing config file /etc/monast.conf
    [Fri Jun 20 19:17:05 2014] NOTICE   :: Server Server_1 :: AMI Connected...
  29. Now, ctrl-c to stop that and run this monast as a daemon instead (runs in background)
    #/opt/monast/monast.py --daemon
    You should see something like this:
    Monast daemonized with pid 6738
  30. That’s about it, now log on to the webUI
  31. http(s)://<yourIP>/html/monast with username admin and password secret12345
  32. Remember, you can right click and do stuff to the tabs you see there such as originate calls…
    image 
    image 
    image
    image
  33. The init.d should be automatically added and should auto start in daemon mode, but do verify yourself
  34. Shout out to Diego Aguirre! awesome software mate :-)
  35. Thanks and as usual do give us feedback

 

Happy weekend folks!

Tuesday, May 13, 2014

OPUS codec with transcoding on Asterisk 11.5.x (or higher, 11.6,11.7,11.8,11.9) with(out) FreePBX

Hi all, this is just a quick and dirty guide to get OPUS and VP8 running on Asterisk 11.9.0 on your Debian box.

  • All credits for the Asterisk patch to meetecho and forked by netaskd for Asterisk 11.5.x or higher support.
  • This guide is intended for Debian 6 - 64bit platform only. Of course, with a little research, you could do it for other platforms as well.
  • Want to know more about why i am so gung-ho about OPUS, see here.
  • If you want a quick and easy access to a fully running Asterisk 11.5.x. From this image, follow the guide below to get it update to Asterisk 11.9 and get OPUS/VP8 enabled and running
  • IMPORTANT: There are some legal implications using OPUS on Asterisk code, read all about it here. REMEMBER, this is for educational use only.

Ok, let’s get down to business.

  1. Get “autoconf”, “automake” “pkg-config”
    # apt-get install autoconf automake pkg-config
  2. Get the latest libopus
    # cd /usr/src
    # wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz && tar –zxvf opus-1.1.tar.gz && cd opus-1.1
    # ./configure
    # make all && make install
  3. That should get your opus ready for asterisk installation. Since vp8 is merely passthru, it will not require and libraries.
  4. Now, go to the asterisk source installation directory (if you don’t have it, simply download it from here). If you are running my image, you could overwrite the 11.5 by simply follow the guide below.
  5. Now, lets get started on asterisk side
    # cd /usr/src/asterisk-11.9.0
    # wget https://raw.githubusercontent.com/netaskd/asterisk-opus/master/asterisk-11.5.0_opus+vp8.diff -O asterisk_opus+vp8.diff --no-check-certificate
    # patch –p1 –u < asterisk_opus+vp8.diff
    You should see everything working well so far like below.
    image
    # ./bootstrap.sh
    # make clean && ./configure --with-crypto --with-ssl --with-srtp=/usr/local/lib --prefix=/usr
    IMPORTANT: If you do not have libsrtp, leave only with “--prefix=/usr”, remove the rest in that line. Libcryto and ssl are used for SRTP (for WebRTC mainly)
    # make menuselect
    IMPORANT: Please be sure to select 1) Codec Opus in Codec Translations, 2) Format VP8 in Format Interpreters and for best compatibility, 3) all sounds that’s SLIN16 (not selected by default) in Core Sound Packages, MOH Packages and Extra Sound..
    IMPORANT: If you can’t select Opus something went wrong in your libopus installation!, otherwise it should be preselected for you, but do check nontheless
    FREEPBX USERS! IMPORTANT: FreePBX users, be sure to select format_mp3, res_config_mysql, app_mysql, app_saycountpl and cdr_mysql in Add-ons
    # save and exit
    FREEPBX USERS! IMPORTANT: Run this # contrib/scripts/get_mp3_source.sh
    # make && make install
  6. Now if you use freepbx, simple run #amportal kill && amportal start
  7. Otherwise, simply kill and start back Asterisk
  8. You should see opus in the translation list
    # asterisk -rx "core show translation"
  9. Also, if you go into asterisk cli, you could type opus <tab> and set debug…that all means the patch worked great, now to test!
  10. Be sure to set allow=opus in your sip general setting or per peer/user. For FreePBX users, go to FPBX UX and select Asterisk SIP settings, set allow opus/vp8 like below right at the bottom of that page.
     image
  11. Use a phone that supports OPUS (on Windows you’ve got Phoner, MicroSIP, on mobile you’ve got CCIPSimple or BRIA) and dial away to test
  12. Here’s my BRIA on my Android with Opus at 48Khz, dialing the echo test on FreePBX *43
    ss

Next, i am going to try this on WebRTC with passthru support for VP8 and full transcoding with OPUS!

Cheers and have a good week ahead, do send your feedbacks to sanjay---at@---astiostech.com

Thursday, May 1, 2014

The personal & secret telephone menu – with Asterisk/FreePBX

Have you ever wanted to do some crazy telephony stuff such as call a long distant number using your office PaBX, or call you back and bridge an open channel (so you can call anywhere) or do just about anything with your own Direct Inward Number (or PSTN number) that only you know how to activate?

Here’s in summary what i wanted to achieve

  1. Use back my existing number, e.g. my own DID
  2. Let it do the same thing as before, i.e. ring my extension, forward to my mobile
  3. BUT, enable a “secret” menu option that only i know that can execute different functions of the PaBX such as dial a long distance number

I wanted to do something like this without affecting my existing number when everyone else dials. But the trick is to not let anyone know its an IVR that’s actually “answering” the call. So, its essentially, my own private little menu system that when i dial my own number, i can activate by activating (dialing) the IVR option!

I believe this is a cool feature to enable users to do a multitude of stuff within their Asterisk/FreePBX system;

In an organization, this could be use to;

  1. Check your voicemail from a pstn number
  2. Check calendar appointments (using ICS/Exchange module)
  3. Initiate a call back
  4. Initiate another call (bridging)
  5. Send a voiceblast, …etc.etc.etc

The real trick isn’t a big mystery actually, its actually pretty trivial, here are the steps

  1. Create an IVR, use a ring-ring dialtone as the announcement (like as though it is really ringing but actually its playing an “ivr” message giving you time to key in your “secret” code for different functions”). Use this file here if you don’t have one. Fake ringtone http://goo.gl/AnHpPI
  2. Set different destinations as ivr menu responses using the beautiful web UI brought to you by FreePBX to do loads of stuff. See sample below;
    Be sure to:
    a) Set the announcement to the fake ringtone you just uploaded (using Admin/System Recordings)
    b) Set direct dial to disable
    c) Set timeout to however long you need to dial your secret codes (ensure its no longer than the fakeringtone)
    d) Set both invalid and timeout destination to your actual extension without a retry recording i.e. none
    e) Set invalid and timeout retries to zero
    f) In conclusion, follow like below verbatim, except for relevant changes for you
    image
  3. Create an inbound route to go to that IVR you just created! 
    image
  4. Save and apply configs!
  5. Do two tests, 1 dial and enter 2020 and it will “DialGirlFriend”
  6. Second test, dial without pressing anything…it will sound like a normal ring and eventually call your extension

And there you go, thanks to the intuitive design of FreePBX and of course the backend Asterisk super engine, you can do so much of fun stuff, with just one number :)

Happy Labor Day Folks!

 

Sanjay@astiostech