Perl for Telco Projects

Australian Firm Calls on Perl for Telco Projects

Add telco services to the growing list of legacy systems that Perl can connect to, thanks in part to a software firm based in the farthest corner of the South Pacific.

Australia’s SkunkWorks focused on Perl and Linux to build its affordable appdev toolkit and engine for building and deploying telecom services.

SkunkWorks’ Whirlwind toolkit, which comes with the Telco Perl appdev engine, enables developers to use traditional Perl scripting skills to deliver a variety of enterprise-caliber telco services, including: voicemail play/record, fax, conference, text to speech, speech recognition, and even complex voice protocol conversions. The Perl-based system also supports all major providers of SS7 and VoIP solutions. Whirlwind also includes S.100 and VoiceXML interfaces. CPAN.org provides many plug-in modules for Perl to connect to third party and legacy systems. Examples of these modules are SMPP for SMS, DBI for database and LWP for web connectivity.

Telco Perl scripts are 100% native Perl enhanced by the Whirlwind engine to allow total control over media resources. In specific, Telco Perl provides a Perl API and uses 100% native Perl scripts to connect a variety of legacy and Open Source databases, telephone network interfaces, billing systems and other applications. Whirlwind provides an abstraction of the low-level components, such as hardware and media resources, allowing developers to focus on constructing the target application.

The result: Open Source Perl and Linux are combining to drive driving down the cost for enterprise phone services, and driving up the opportunity for developers to break into this new sector.

Telco Perl launch has already attracted positive attention from telecom resellers and systems integrators, according to SkunkWorks’ execs. “Most telephony products use proprietary languages so when customers want new features they are caught in a continuous cycle of time delays and labor costs,” says SkunkWorks sales director Bill Oborn. “Using Telco Perl, you can leverage from millions of Perl developers and thousands of existing Perl modules that you can freely download. Also there’s no need to train staff in proprietary languages, just grab a Perl user off the street. The savings in time and money are enormous.”

One Whirlwind distributor in Europe used Telco Perl to tie in a MySQL database into a telco messaging application. “[Our] customer said he needed the messaging service to communicate with MySQL rather than PostgreSQL,” Oborn said. “He downloaded the MySQL Perl module from he Internet, and within two hours had it running and tested.”

Inside Telco Perl at Work — Code Samples
Current Perl developers will find Telco Perl scripting simple and familiar, SkunkWorks says. The only difference, SkunkWorks says, is that all Telco Perl commands start with “ww” to indicate they are Whirlwind enabled.

As an example, here is a simple TelcoPerl script for handling an incoming call by answering it, playing a simple message and then hanging up.



eval {

    wwTrace('on');

    wwTraceFile('aph.pl.trace');

};



# get the necessary resources, fail with busy tone if no resources

exit if (wwResourceGet("vox", "player") < 0);


# let the call ring for 3 seconds then answer it

wwStartRinging();

sleep(3);

wwAnswerCall();


# play some audio

wwPlay("common/welcome");

wwPlay("aph/terminate");


# hangup the call

exit;

as



        wwANSWER();

        wwPLAY("welcome");

All Telco Perl commands start with “ww” to indicate they are Whirlwind enabled.



   eval {

        wwTrace('on');

        wwTraceFile('mytrace.txt');

    };

    $hangup = sub {

            if($child){

                    wwSendMsg($child, "goodbye", 0);

            }

            exit; 

    };

    $goodbye = sub {

            exit;

    };

    wwSetHandler($hangup, "hangup");

    wwSetHandler($goodbye, "goodbye");

    $child = wwStartService("demo", "out", "81234567", "81009000", "telstra", 1); 

        if($child <= 0){

        exit;

    }

    while(1){

        $msg = wwRecvMsg();

        if($msg eq "ringing") {

            wwGroupConnect($child);

        }

        if($msg eq "connected"){

            sleep(60);

            wwSendMsg("goodbye", $child);

            exit;

        }

        if($msg eq "busy" || $msg eq "fail"){

            exit;

        }

    }

How Telco Perl Stacks Up
Thanks to the use of Perl, SkunkWorks engineers say Telco Perl provides far greater flexibility and control of applications compared to Speech Application Language Tags (SALT) and VoiceXML. SALT and VoiceXML are standards ratified by forums to extend the use of HTML and XML for speech recognition services. Perl, on the other hand, works with HTML and XML and can be readily embedded into other environments.

Telco Perl will work with the 500+ third-party modules available from the Comprehensive Perl Archive Network.

Telco Perl executes 100% native Perl 5.8.0 scripts. Here is a list of other key Telco Perl features:

  • Telephony functions (answer, switch, play, record, set up conference, send fax, voicemail to email, fax to email, text-to-speech, etc.)
  • Caching of scripts
  • Intelligent distributed database connectivity
  • Call accounting
  • Fail-over, high availability architecture
  • Inter application communications
  • Purpose designed for high density
  • Application hierarchy
  • Multi-tasking
  • Just-in-time compiling
  • Real-time application provisioning
  • Multi-threading
  • Smart debugging

.