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 {0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}DIRECTION="INBOUND" and {0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}ENTRY_POINT="PRE_ROUTING" {
if({0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}HEADERS["To"][1].URI.USER.regex_match("2025556199"))then {
{0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}HEADERS["roger-debug"][1] = {0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}HEADERS["From"][1].URI.USER;
append({0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}HEADERS["roger-debug"][1],"<");
append({0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}HEADERS["roger-debug"][1],"2135551212");
append({0ed28e3470e974017c124b0897303dd14e34b5245564abb28916e7d48d9b07c0}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!