Category Archives: Uncategorized

Super Sigma Scripting

Hello all!

A while back, I posted a “Sigma Cookbook” with some sample Sigma code for the Avaya Aura SBC. Recently a reader told me about a document written by John Waber at ConvergeOne called “Super Sigma Scripting” I had the pleasure of corresponding with John who gave me permission to post his document. I will copy/paste some of the text for easy Google indexing. But click this link for the actual document.

Thank you John! This is great stuff!

And good luck to all of you. I am now immersed full-time in the world of Cisco, but if your job is anything like mine, in September 2021, you are dealing with capacity, routing, and remote workforce issues due to COVID-19. This has been a chance for all of us in telecom to step up and help our customers, employers, and colleagues communicate through our favorite network – the PSTN!

Thanks all and good luck! – Roger

Here are some excerpts from the document (for the Google bots!)

Having the ability to create a script that performs sophisticated manipulation of SIP and SDP messages is a super power of Avaya’s Session Border Controller Enterprise (SBCE). Signaling Manipulation (SigMa) scripting gets its power by borrowing concepts from Regular Expressions (RegEx), a sophisticated pattern matching tool invented in the 1950s.

This guide begins with an overview of SigMa and finishes with examples that illustrate using Avaya’s proprietary SigMa scripts to solve common compatibility issues. SigMa is granular enough to work its magic on just Requests, just Responses, or both types of messages. It is designed to manipulate Session Description Protocol (SDP) as well.

The script can be created externally as a regular text file using a utility like WordPad and imported in the Signaling Manipulation screen. Alternatively, the script can be written directly in the SBCE using the embedded Sigma Editor

Simple words can help launch a career

I just found this letter in our storage unit. When I was 22 years old, I was hacking away at a telephone system at Sears in Antioch, CA while working as the building engineer. For some reason, I was really drawn to that ROLM telephone system and I somehow captured the attention of a local IBM rep. I think she was amused by my enthusiasm – by this time, I had “socially engineered” my way into getting the system password for the PBX. I had already performed a ton of optimizations to it, such as matching all telephone extensions to the department number, building speed-dials to all neighboring Sears stores, and replacing the old Automotive Department telephones with digital multi-line telephones. A few days after our meeting, she sent this letter to the store. She probably had no idea how influential it would be.

In this letter, this IBM account rep called me “innovative”. I was just 22 years old. I was just a kid with an affinity for that big orange telephone system. And this account rep with IBM, who I respected and admired, took the time to write this.

The confidence boost from this letter propelled me into a very rewarding career in telecommunications. I used it to score my next two jobs – one with a Northern Telecom reseller in 95, and the next with a large institutional investment firm in 97.

Over the next thirty years, I have attempted to boost others in the same way. We have no idea what letter of recommendation or encouragement will do for someone. I’m not sure a linked-in recommendation or “good job” comment on Facebook has the same impact today. I suppose today it’s all about the “likes” and the “shares”. But if you have a chance to help someone just starting out in life with a letter like this, I highly recommend it. You have no idea what a few written words of encouragement can do for someone.

Kim Beaudette, if you’re out there somewhere, I thank you for taking the time to write this note back in 1992. You changed my life.

How to relay Emojis through Flowroute SMS API with Perl

This post will probably only help me. I don’t know if anyone out there is using Flowroute for SMS. And if you are, you’re probably not using Perl. So this is another post that is meant for my future self and maybe one other person on the Internet.

If you’re looking for SMS integration, I highly recommend Flowroute.

I am writing a game to be played at an upcoming TEDx event. The game is played simultaneously over voice and SMS and when the game is over, I wanted to allow players to send messages to each other – proxied through the game engine so the users do not know each other’s mobile numbers.

Naturally, I wanted to support Emojis (and any Unicode) through this messaging, but I was really struggling to get them to work. The messages would look like this:

It ended up being the way Perl was encoding JSON. Using the standard JSON encode command did not work:

use JSON;
my $json = encode_json \%data;

I then found a great article comparing Mojo::JSON and Cpanel::JSON::XS. It turns out I had the same problem with Mojo::JSON

use Mojo::JSON;
my $json = Mojo::JSON::encode_json(\%data);

But then I tried Cpanel::JSON::XS and hooray!

my $json = Cpanel::JSON::XS->new()->encode(\%data);

Anyway, if you’re struggling with UTF-8 and Unicode and Emojis when it comes to messaging APIs, sometimes the JSON encoding package you use can make all the difference in the world!


At least we have our telephones during this quarantine

Here is an interesting image being passed around the Internet. I haven’t found the source of this, but I assume it’s an advertisement during the 1918 Spanish Flu pandemic. I also found the same image with Rocky Mountain Bell as the advertiser, so I assume the Bell System passed this around for any subsidiary to use.

This is a very interesting and surprisingly busy time for telephone engineers. In my day job, I work for a large healthcare company and we have been shifting traffic and installing a lot of hands-free devices so nurses do not have to touch the phone, thus saving gloves.Our team is hard at work to make sure the phones can handle the traffic. Perhaps you have similar stories of having to support a large mobile workforce?

Whew! Long time since last posting, but I’m still telecomming!

Hey All!

When I first set up, I had no idea how easy it was to host WordPress on my own site. Fast forward through a crazy era of, and I finally got around to migrating this site to my servers at Digital Ocean.

I have a lot to share with you about the last couple years. I also have some amazing scripts and tips for you. Oh, and I took a “telecom research trip” this summer and learned a lot of interesting stuff that I cannot find anywhere else on the Internet. I’m looking forward to sharing that with you too.

Anyway, I hope all of you are enjoying your telephone systems! I love them all and I hope you do too! Stay tuned and I look forward to interacting with you soon.


Microsoft dropping support of PBXs through SBCs?

I saw this headline and thought it was big news. But Microsoft says it only affects a small number of customers? I suppose there are several types of Skype for Business installations:

  1. Full SFB with cloud everything and Microsoft is your carrier
  2. SFB using MS Outlook as your voicemail, but your own trunks to Telco (and maybe tie lines to a legacy PBX or two)
  3. SFB tied to your legacy PBX and legacy voicemail?

Aren’t all large SFB installations also connected to an SBC? Anyway, it looks like there are some channel partners willing to help. It’s funny to think of Microsoft’s voice solutions being so old that they’re dropping support of certain architectures.

Anyway, here’s the article from Redmond Channel Partners. It looks like a great opportunity for VARs to rekindle the discussions about Microsoft and voice services. I’m not really in this space, but I’d be curious to hear from any of you who are.

Thanks all!




How to parse Avaya Communication Manager output into useful csv or database tables

Hello all!

This is a follow-up to my post about extracting data from Avaya Communication Manager. In that post, I showed you how to extract any “list”, “display”, or “status” from Avaya Communication Manager to a text file. First, I would like to show you my bash shell script that extracts this data. And then I’ll show you my perl script that converts the output to a text file that you can open with Excel or import into a database.

What information should you pull from Communication Manager? Well, in my case, I have a text file called ‘commands.txt’ that contains these lines:

display time
list ips
list surv
list med
status cdr
status trunk 1
status trunk 2
status trunk 8
status trunk 11
status trunk 16
status trunk 21
status trunk 79
list station
list reg
status station 2291
status station 2292
status station 2293
status station 2294
list call-forwarding
list off s
display time

So those are the various pieces of information that I care about. Looking at that info, those are my active trunk groups, and I want to know the status of four particular extensions (those happen to be the digital ports of my fax server). Also, I have a port network, so I want the status of IPSIs. Anyway, think about all the stuff you care about when you log into your PBX in the morning. And stick them in that “commands.txt” file. I put a “display time” at the beginning and end so I can look at the file later and tell how long it took to run the file.

So we want to run these commands automatically. So let’s create a file called “” and put this in the file:

file=/home/roger/avaya/sanity/data/sanitycheck_`date +"{0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}Y-{0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}m-{0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}d-{0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}H-{0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}M"`.txt
perl /home/roger/avaya/sanity/ /home/ARES/randerson/avaya/sanity/la.pbx /home/roger/avaya/sanity/commands.txt >$file
perl /home/roger/avaya/sanity/ $file

Once you save the file, make it executable with

chmod +x

Let’s go over this script line-by-line, okay?

  1. The first line creates a variable for the file that will contain the data. There’s a little linux trick to embed a timestamp in the filename.
  2. The second line runs the file that I shared with you in a previous post about this script. It’s magical. I cannot take all the credit, but I have modified it for our purposes.
  3. The third line runs a file that parses the output of all the commands. This is a very useful script and I can take full credit for this one. It generates a list of “key/value” pairs to a text file.

My thought process with this script is to create a unique key for every piece of useful data. For example, I want the name, IP address, firmware version, gatekeeper, and network region for every station. I also want the EC500 mapping. And I would like the port number for analog stations. Oh! I also want a sense of low or high priority (Is it bad if the data changes?) and I need to include a site identifier in case I have the same extension in multiple sites. That’s a lot of information to display. And, if I have 1000 stations, it’s too much to display all this information on separate lines. That’s like 7000 lines of data for my stations. Fine for machines to read, but it seemed like too much for humans. I want to put them into one (and in the case of ec500, two) lines of data. I do this by assigning a “Key name” for my stations like this:

Key Name Key Value EC500=>2135552978, OPS=>8348 Anderson, Roger (ip=;reg=3;ver=3.260A;gk=

See how much data I squeezed into that? And note that very few stations will have off-pbx information. Most stations will just have that station.status key. The script called takes the raw output from the Communication Manager and converts it to these key/value pairs above. Here is a link to You’ll need to rename it to a ‘.pl’ file. This should compile just fine. When you copy it to your linux server, try

perl -c

That -c just means to check the syntax and don’t run it. It hopefully says “syntax okay”. Actually, I’m sorry but you’ll need to edit the file and change line 45 to the path where you want your ‘keyvalues.txt’ file, which will contain all your data. This should use a command line param, but it doesn’t. Sorry.

You might consider looking in more detail at this file. It’s where the magic happens and it’s a good framework for parsing other data. If you’re interested, here is a summary of how it works:

  • Starting in line 56, we check the raw text file line-by-line looking for the header for each ‘list’ or ‘display’ or ‘status’ section. For example, when we see the text ‘REGISTERED IP STATIONS’, then we know we are expecting to see the result of a ‘list reg’ (by setting our variable of type to 7).
  • Then on line 183 we actually process the registration status of stations. If type=7, then we are in the ‘list reg’ mode and if a line contains registration information for a station, then we capture the data.
  • Each section has some customization, but you’ll notice that (almost) each section performs a ‘set_data’ of the keys and values appropriate for that section.
  • At the end, the trunk group and station summary is generated and the keys are reported alphabetically.

Here are some examples of what the script does:

  • The script parses ‘list station’ and assumes all stations are unregistered.
  • The script parses ‘list reg’ and fills in the registration status for all stations (anything not parsed in this section has a status of ‘unregistered’)
  • The script parses ‘status trunk xxx’ and simply counts the trunks that are in service (ignoring the “idle/in use” values. We just count trunk members in service
  • The script parses ‘status cdr’ and simply stores the percent full of the buffers
  • The script parses ‘list off s’ and stores the off pbx mappings for all stations
  • The script parses various critical fields for IPSIs, media gateways, and survivable servers
  • The script parses ‘list call-forwarding’ and generates a list of all stations that are call forwarded.

At this point, if you ran the bash script, you would have an awesome list of keys and values in a text file called keyvalues.txt. You probably don’t need to know anything about Perl to get this working for you. But if you do know a bit of Perl, you’ll be able to do amazing things with it.

There’s more!

This data is useless unless you’re looking at it. In a future post, I will show you how to schedule this script with cron, push the data into a database, read it with a simple ‘web site in a single file’ php script, filter the data (including historical values!), and get alerts when the values change.

And then I have something REALLY amazing to show you!

Thanks for reading, everyone! Feel free to contact me at or post a comment here. If you need help getting this code working, or you want to tweak it a bit, let me know!


Roger in Business Insider about my plans to destroy the inbound Windows Support scam

Not to mix business and pleasure, but my “hobby” made the news this week. I was in the top 10 on reddit/r/technology and Business Insider wrote a nice article. Besides my career as a telecommunications consultant, I also build robots that talk to telemarketers. I told the story in a recent TEDx talk, but just last week I got a popup saying that I had a virus on my computer and I needed to call Microsoft support. So I called them back 600 times on 20 simultaneous channels. After about 300 calls, they shut off the number. One down…

Anyway, the article is linked below. If you’re inclined, you can go to and subscribe to the service. You will love telemarketer calls when you use my bots.

I know I owe you all some scripts to parse the output from Avaya phone systems. Sorry I’m so distracted by this Jolly Roger thing…



How to load-test your telephone system, IVR, or DID number port

When you work on telephone systems, at some point you need to make some test calls into your trunks. And sometimes it’s not realistic to use the same phone at your desk, since the call may not truly leave your PBX or your carrier’s network. So you end up using your mobile phone,or if you’re remote, then your home phone. However,

  • What if you need to make dozens of calls?
  • What if you need to load up a trunk group?
  • What if you need to test a number port of hundreds of individual DIDs?
  • What if you need to simulate calls from different areas of the country?
  • What if you need to dial an extremely specific sequence of digits once connected, and you need to do this over-and-over-and-over?

About a year ago, I found a great tool called This is an automated testing framework – completely self service using your browser. I liked it so much I became a business partner recommend it highly to all of you telecom administrators. I even recorded the training videos for them.

It’s very straight-forward to use. You build a “test scenario” that contain simple “scripts” that are use cases for each type of call. If you’re testing a call center IVR, this could be “make payment” or “renew contract” or “queue for customer service”. And if you’re just testing a trunk group, you can dial into your PBX and “hold” the channel for x seconds. This lets you load the trunk group and test overflow.


Once the tests are complete, you can see the call history, channel usage, a spectrogram of the call, and you can listen to or download the audio.


Once you set up a test, you can schedule it to run at a recurring time and alert you if there are any problems with the call.


There are other advanced features such as

  • Caller-id manipulation to simulate geographic routing.
  • Detailed logs of the call processing.
  • Number pooling for testing multiple numbers.
  • The ability to set a “disposition” or “goto” a different spot in the script based upon the timing of noise, silence, or DTMF in the channel.
  • The ability to export call records for the tests.

It’s flexible, cost effective, and has made my job so much easier. I recommend it highly to all of you. If you sign up and use the promotion code ‘roger2015’, you’ll get $10 in credit when you sign up and a 20{0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0} discount on the per-minute rate.

Check out the training videos and let me know what you think!

Thanks for watching!