twitter feed0xdecafbad.com

Telephony

Telephony related items, with emphasis on VoIP. I develop and use FREESwitch and most of the VoIP platform specific things I do will be for FREESwitch. I also do other non-specific applications.

Cluster capable event scheduler for FreeSWITCH

by on Oct.23, 2009, under Telephony

As some of you are aware I dabble in FreeSWITCH development. Last night in a fit of insomnia, I wrote an event scheduler in LUA for FreeSWITCH that is capable of allowing multiple nodes to process the events without duplication. This speaks to the power of FreeSWITCH that something trivial can add such functionality.  This means that you can have a cluster that can all process the events without assigning specific events to each switch.

Potential applications for this include “hotel style wake up calls”, “blind date rescue calls” and even the infamous “get out of a boring meeting fast call”.  You just need to insert a small row in a MySQL database which includes the API command to run (such as originate) and the timestamp to run it at.  (continue reading…)

2 Comments more...

Learn morse code by telephone – FREE!

by on Sep.12, 2009, under Radio, Telephony

Out of sheer boredom I created a morse code training application in FreeSWITCH.  You call 218-339-8073 and  it will ask you how fast you want the symbols sent (1-50 wpm) and how many symbols in a group.

It will then play morse symbols, selected at random, and then a human equivalent using a TTS generated voice to read the phonetic alphabet equivalent to you.  This way you can verify your decoding accuracy.

Now when you are waiting for the bus/train to take you to work, you can use some of those unlimited mobile phone minutes and learn morse code, or just brush up on it.

(continue reading…)

1 Comment more...

FreeSWITCH has a radio endpoint!!

by on Sep.03, 2009, under Radio, Telephony

I finished the initial version of my  perl script that will link FreeSWITCH to a radio device.  While I am primarily doing this with amateur radio in mind, you could use this to connect a FRS, GMRS, or other similar type of radio.

Using the FT-897 PTT control circuit, you can control PTT by connecting the various connectors to virtually any radio.  Some will not be compatible, some will require hardware modification (removal of the mic/speaker and replacing them with headphone wires and connecting the PTT button to the serial port).  I will not be discussing how to do that here.  If you can’t figure that out you probably shouldn’t be doing it.

An in depth installation and configuration guide can be found on the FreeSWITCH wiki.

Leave a Comment more...

Magic Jack SIP auth proxy

by on Aug.22, 2009, under Telephony

Magicjack has changed the way they authenticate SIP calls in an effort to break 3rd party devices.  Sometimes its not the best thing to have a computer running, sometimes you want to use something other than Windows, sometimes you just want to use different software.  Whatever the case, this proxy will let you have choice and options.

I wrote MagicCrack specifically to address this problem.  MagicCrack is a proxy written in Perl, and uses iptables to modify the packets so that the authentication can occur.  This lets you forward packets to whatever proxy you configure in your device.  Because MagicJack uses port 5070 that means you can have most sip traffic untouched and only do this to MagicJack traffic. The Perl script works as a transparent proxy allowing you to quickly and easily configure your gateway without having to reconfigure any other systems that may exist on your network.

(continue reading…)

55 Comments more...

Google Voice Command Line Script

by on Jul.28, 2009, under Telephony

UPDATE: Aug-20-2009 I added the ability to use a ~/.netrc file (if Net::Netrc is installed, if its not it will not use that :)  I also fixed the meta following problem.  Fixed a couple other bugs – like the username/pass incorrect not reporting that error properly.  You should upgrade to the new version now.

UPDATE: Sept-10-2009 I added the ability to send calls/sms messages to named contacts.  It will use your google voice contact data, so if you want to use this feature you have to create a contact in google voice and use the nickname that you gave them.  I changed the way arguments are passed, run the program for usage information.  If you were already using this you will have to adjust how you call the program.

I wrote a perl script that lets you interface with your Google Voice account.  You can place a call, cancel a call, and send a SMS message easily.  This is ideal for people that want to send SMS messages for system alerts, or for other reasons.

In order to use this script you must first download it.  Then edit the username, password and default number variables near the top of the script.  Install any missing perl modules based on whatever distribution you have, if you run the script it will tell you what it is missing.  Invalid args or no args will give you a help screen.

(continue reading…)

64 Comments more...

Better XML-CDR processing for FreeSWITCH

by on Apr.18, 2009, under Telephony

As some of you may know I wrote a xml-cdr curl processing class in PHP for FreeSWITCH.  This was required because PHP4 did not have a native XML processor.  PHP5 is old enough that it should be installed everywhere now, and that usually provides a simple xml parsing library.  I like the simplexml stuff in PHP5 better than I do the stuff I wrote, so I will explain how to use it.

<?php

if(isset($_POST['cdr'])) {

$cdr = simplexml_load_string($_POST['cdr']);

// do your validation code here

// This is just an example, you would probably want to store this in a database instead

$fh = fopen(“/tmp/cdr.xml.”.uniqid(), ‘wb’);

fwrite($fh,”Channel created at ” . $cdr->callflow->times->created_time . “\n”);
fwrite($fh, $_POST['cdr'] . “\n\nprint_r\n\n”);
fwrite($fh,print_r($cdr,true).”\n\n”);
fclose($fh);

}
?>

That is all there is to it, much easier to use, although there is a slightly different way to access variables from what I had previously written.  You may notice the $cdr->callflow->times->created_time variable.  How this works is you have an XML file, callflow is a child of the root node, times is a child of callflow and created_time is a child of times.  It is fairly straight forward to process.  If you have multiple entries for example application nodes in the app_log node, you would access it as $cdr->app_log->application[0] and so on.

3 Comments more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!