Αναρτήσεις

Προβολή αναρτήσεων από Μάρτιος, 2015

Getting a SIP call whenever an IFTTT recipe is triggered

In my previous post I explained how to run a custom script triggered by an IFTTT reipe. In this post I will explain how to get a SIP call when an IFTTT action is triggered. I assume you have created the recipe, linked Dropbox and configured incrontab as explained here . Requirements: -A cli SIP client, pjsua (from the pjsip library) is perfect for this job -expect package (in order to "talk" to pjsua with spawn) -festival package (this includes text2wave for text-to-speech) I didn't find pjsip as a package for Debian, so I had to download it from  http://www.pjsip.org and compile it manually, it's straightforward (configure-make dep-make). pjsua is located inside the /pjsip-apps folder so you may either copy it somewhere convenient or create a soflink in order to run it. Create your pjsip conf file (this may depend on your SIP provider) and paste: --null-audio --registrar sip:your.sip.provider.com --realm=* --id sip:sipuser@your.sip.provider.com --us...

Using IFTTT recipe to run a shell script

Requirements: -an IFTTT account -a Dropbpx account linked to your IFTTT account -a server running linux (mine runs Debian linux). - incrontab package, available on most linux distros. First of all, install Dropbox on your linux box. You may find instructions here: https://www.dropbox.com/install?os=lnx Run Dropbox and create a folder named IFTTT on your home Dropbox folder. mkdir ~/Dropbox/IFTTT Then, you have to create your IFTTT recipe at ifttt.com. You may use whatever "this" statement you wish. On "that" statement you chose Dropbox, and create a file. Give a name to your file, for my example I use "runme". In the content you may put whatever you want. In Dropbox folder path you use IFTTT. Create your script file on your home folder named "script.sh" and make it executable: chmod  +x script.sh. Make sure your script executes properly: ./script.sh Add the user that has both rights to run the script and to write into the Drop...