Category Archives: Uncategorized

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

Hey All!

When I first set up RogerThePhoneGuy.com, I had no idea how easy it was to host WordPress on my own site. Fast forward through a crazy era of JollyRogerTelephone.com, 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.

Roger

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.

https://rcpmag.com/articles/2017/07/24/microsoft-support-for-sbcs.aspx

Thanks all!

Roger

 

 

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 “sanity.sh” 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/av.pl /home/ARES/randerson/avaya/sanity/la.pbx /home/roger/avaya/sanity/commands.txt >$file
perl /home/roger/avaya/sanity/sanity.pl $file

Once you save the file, make it executable with

chmod +x sanity.sh

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 av.pl 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
lo.la.station.8348.offpbx EC500=>2135552978, OPS=>8348
lo.la.station.8348.status Anderson, Roger (ip=10.10.60.138;reg=3;ver=3.260A;gk=10.2.86.180)

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 sanity.pl takes the raw output from the Communication Manager and converts it to these key/value pairs above. Here is a link to sanity.pl. 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 sanity.pl

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 roger@rogerthephoneguy.com 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

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 JollyRogerTelephone.com and subscribe to the service. You will love telemarketer calls when you use my bots.

http://www.businessinsider.com/telecom-guy-uses-bots-to-foil-microsoft-support-scammers-2017-2

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…

Roger

 

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 CallsByCloud.com. 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.

cbc-script-commands

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.

cbc-history

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.

cbc-qa-schedule

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!

Roger

 

PPM / Feature Buttons not working on Avaya SIP phones

This one was very frustrating. My SIP phones could log into the SBC-E and got dialtone fine, but wouldn’t pull PPM. The Avaya One-X Communicator for iPhone could do it though. Whaaaaa??

I have my phones configured to pull a config file from a web server – it’s the only manual setting required in the phone. All other settings are in the config file on the web. Well, it turns out that the phone didn’t like the SET CONFIG_SERVER w.x.y.z parameter. Once I removed that, then PPM flowed just fine.

By the way, if you have trouble with feature buttons, the other issue I had was the entity link between Session Manager and the SBC. If your’re using TLS connections between the phone and the SBC, then you also need to use TLS on the entity link between the SBC and the Session Manager, and the Session Manager to the Communication Manager. In other words, all connections from the endpoint to the CM need to be TLS. If any of them go back to unencrypted TCP or UDP, then the PPM breaks. At least it did for me!

Unable to log into the Avaya Utility Server as cust or admin on System Platform

I recently had a strange issue with my utility servers. I have four of them on System Platform on the S8300D servers. But I was unable to log into any of them as cust nor admin. I could log into my standalone utility servers, but not the ones on system platform.

It turns our the ldap config was corrupted on the servers and Avaya needed to fix it. Once complete, the tech sent me a nice summary:

If this were to happen again, you can verify if the account works by attempting login to SSH of Dom0 or Cdom or webconsole of Cdom.  If it works there, then we know that LDAP configuration is corrupted and needs to be corrected.  If it happens again, have a ticket open stating that LDAP is corrupted on VUS and that /etc/ldap.conf and /etc/nsswitch.conf need to be fixed.

no VNS resource administered

Here’s one of those times when I’m in the Avaya Communication Manager and I get an error. Happens to me all the time. What do you do when you get an error? Google it? Me too!

In my case, I wanted to see if I could get a report of packet loss from one of my network regions. Sure enough, there’s a packet loss report. You can perform this “list measurements” command:

list measurements ip voice-stats hourly pktloss 6





















No VNS resource administered
Command:

Hmm, no VNS resource. So I type that into google with quotes and there are no results! How can there be no results? I opened a ticket with Avaya and their expert systems didn’t return anything either. Later I was looking through some documentation and I recalled that you sometimes have to tell Communication Manager what you want to measure. Sure enough, if you “change measured selection network region”, you can add the network regions you want monitored.

Now when I type “list measurements ip voice-stats hourly pkloss 6” I get an empty report. Hopefully tomorrow I’ll have some stats. Do you ever wish you could automate this report? More on that later.

Thanks all!

 

What happens if you try to “traceSM” when the Avaya Session Manager hasn’t fully booted?

If you try to “traceSM” before the Avaya session manager is completely booted up, you get this. But only when you “start” the trace.

The complete log files are located:
        SIP messages: /var/log/Avaya/trace/tracer_asset.log*
        Call Processing: /var/log/Avaya/trace/call_proc.log*
        PPM: /var/log/Avaya/trace/trace_ppm.log*
Error enabling SM100 trace.

Preparing SCRUCH network filter num SD address:0
Preparing SCRUSH network filter num SH address:0
*** in client update res=28 ***


[cust@nj-pbx-sm02 ~]$