Category Archives: Uncategorized

Troubleshooting Signaling Manipulation (SigMa) Scripts in Avaya Aura SBC

This is pretty obscure and I’m probably only talking to three people on the Internet right now, but if you have ever tried to troubleshoot SigMa scripts in the Avaya Aura Session Border Controller, you probably wish it had better logging. Actually, if you have ever gotten logging to work, please let me know. I had given up. However – I recently discovered a nice easy way to troubleshoot signaling manipulation, and consequently also discovered just how cumbersome this process really is.

The easy way to log is to set your own custom header in the SigMa script, then inspect the INVITE from the Session Manager’s point of view. For example, I added this SigMa script:

    act on request where %DIRECTION="INBOUND" and %ENTRY_POINT="PRE_ROUTING" {
        if(%HEADERS["To"][1].URI.USER.regex_match("2025556199"))then {
            %HEADERS["roger-debug"][1] = %HEADERS["From"][1].URI.USER; 
            append(%HEADERS["roger-debug"][1],"<");
            append(%HEADERS["roger-debug"][1],"2135551212");
            append(%HEADERS["roger-debug"][1],"@roger.corp>");
        }
    }

This SigMa script checks for calls to 202-555-6199 and creates a new header. Then, within Session Manager, you can look at the full header and see this info:

INVITE sip:2027216199@ares.corp SIP/2.0 
From: "PHONEGUY ROGER " <sip:6265554799@ares.corp>;tag=6698455617080545_c1b09.2.2.1404967301186.0_7074379_15030130 
To: <sip:2025556199@telco.corp> 
CSeq: 2 INVITE 
Call-ID: 9959340302389262@12.11.18.20 
Contact: <sip:10.10.20.71:5060;transport=tcp> 
Record-Route: <sip:10.10.20.71:5060;ipcs-line=63646;lr;transport=tcp> 
Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK 
Max-Forwards: 64 
Via: SIP/2.0/TCP 10.16.26.71:5060;branch=z9hG4bK-s1632-000279738415-1--s1632- 
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed 
P-Asserted-Identity: "PHONEGUY ROGER " <sip:6265554799@telco.corp> 
Content-Disposition: session; handling=required 
Content-Type: application/sdp 
roger-debug: roger-debug: 6265554799< 
roger-debug: roger-debug: 62655547992135551212 
roger-debug: roger-debug: 6265554799@roger.corp> 
Content-Length: 241 
 
v=0 
o=Sonus_UAC 11647 11015 IN IP4 10.16.26.71 
s=SIP 
c=IN IP4 10.16.26.71 
t=0 0 
m=audio 19234 RTP/AVP 18 0 100 
a=rtpmap:18 G729/8000 
a=rtpmap:0 PCMU/8000 
a=rtpmap:100 telephone-event/8000 
a=fmtp:100 0-15 
a=sendrecv 
a=maxptime:30

For quick one-liners, this is pretty handy. However, you can see my attempt at creating ONE header with a new p-asserted-identity completely failed. I can generate a new header, but my attempts to append to it only created another header. I really hope the new version of software adds some better manipulation features. In the meantime, I’ll keep hacking away at it.

If anyone out there knows SigMa, please let me know!

So, how’d you end up managing telecom?

Broadly speaking, those who manage telephone systems come from either a voice background or a data background.

It is quite common for data engineers to be responsible for the company’s voice and data systems. It is very rare that voice engineers get the same privilege. It’s kind of a strange turn of events. I remember saying in the mid 90s “voice guys can learn data easier than data guys can learn voice.” It was true then, but data has gotten more complex. And you know what’s crazy? Voice systems are mostly data now. Most of my troubleshooting and end user support is related to VoIP, routing, dhcp, vlans, PoE, or a hardware problem at the endpoint. The same thing applies to design and installation. It’s all about VoIP assessments, address assignments, and routing. Modern PBXs need to join domains and often have dedicated Ethernet switches, routes, firewall rules. The PBXs are simply servers in the data cabinet. It’s enough to make any old-school voice engineer cringe. I’ve started seeing PBXs installed with patch panels instead of punchblocks. No punchblocks!

The tools of the trade used to be a test phone, punch tool, and toner. Now a laptop is almost all I need. I can learn more from a traceroute or a diagnostic utility within the pbx than I can from visiting the station. And if i do end up visiting the station, the telephone’s diagnostics often tells me the rest. It’s been quite a transition; and in retrospect, it has been all the industry promised us.

So if you come from voice, you are probably seeing some amazing changes to the pbx and peripheral equipment. If you come from data, you’re starting to see a bunch of unfamiliar equipment plugged into your network. At first, those are black boxes the vendors and just a couple people in your company know about. I will help you to break into those black boxes and see what is inside.

How to convert and play a wav file in an Avaya Modular Messaging Caller Application

One of my clients uses  Avaya Modular Messaging (aka Messaging Application Server). I recently needed to write a caller application to just hold a channel open for a few minutes. I was working in a quiet environment and didn’t want to sit in a cube and speak “blah blah testing 1 2 3 testing hello nothing to hear keep moving” into the phone for 30 seconds or more, so I figured I would use a wav file I had of some open source music. It’s not obvious, but Avaya Modular Messaging supports drag-and-drop of a wav file onto the “record a prompt” screen.

Drop the wav file onto the media controls

The problem is, the docs are pretty vague on the exact encoding that MAS supports for these files. Surprisingly, I couldn’t get Audacity to export a file in the right format. Nor could I use a variety of other GUI utilities.

I finally decided to try sox. This is a great open source utility that I typically use with Asterisk sound files. In the end, the following command converted the file to a format that MAS liked:

sox source_music_file.wav -eu-law -b8 -c1 -r8000 music4mas.wav

When I deployed the app, the audio was a little too loud, causing static and distortion on the channel. If you need to lower the volume, you can add a volume adjustment to the sox command line (on the input file!) with:

sox -v-0.1 music.wav -eu-law -b8 -c1 -r8000 music1v.wav

That did it for me. Happy caller-apping everyone.

 

“It all started with the smoke signal…”

I just finished a great book titled “The Deal of the Century – The Breakup of AT&T”. During final negotiations between the Justice Department and AT&T, a judge named Vincent Buinno started a two-hour-long diatribe with “It all started with the smoke signal…” Wow, you’re in for a long wait when a judge begins that way.

I owe my career to the breakup of the Bell System. It was a tough time in AT&T’s history, and even thirty years later there are arguments either way. But personally I love being a phone guy and I wouldn’t have the chance if Ma Bell owned and controlled everything.

Phone Guy Blog

I’m a “phone guy” who has made a successful transition to “IT Guy”. Between the 1990s and now, phone guys had to adapt or die. I have adapted. To the PBX administrator who has transitioned to VoIP, or the networking/LAN/WAN administrators who have to support the telecommunications network, this blog is for you.

And of course, being a pretty good telecom guy and computer programmer doesn’t necessarily mean I’m very good at WordPress.