Tags:
create new tag
, view all tags

Download the Asterisk SIP Debug Graphing Utility

sip_grapher.pl is a perl script that can parse an Asterisk SIP debug enabled log file and produce nicely formatted SIP sequence graphs for a selected call.

You can search by phone number ( all or part of a phone number ) or Call-ID if you have one.

It's pretty fast, even with large log files. I was able to parse and pull calls from a 2.5 GB log file on my VPS in ~ 40 seconds.

The script supports auto updating if a new version is available.

For more details, see my blog entry:

Asterisk SIP Debug Log Grapher

Current version is 2.6 ( 05/04/2010 ).

DOWNLOAD HERE

#####################################################################################################
#
# sip_grapher
#
# This program is used to scrape Asterisk log files and build graphs displaying the SIP session for a
# given call using SIP debug messages.
#
# Search by phone number or Call-ID
#
# Version 2.6
#
# Date: 05/04/2010
#
# Author:
#
#       Jeffrey Weitz
#       jeffdoubleyou@gmail.com
#       jeffdoubleyou.com
#
#
# Changelog:
#
#       2.0 - 03/06/2010
#
#               1. Initial re-write of sip_grapher.pl version 1.0
#
#       2.1 - 03/08/2010
#
#               1. Fixed CANCEL transaction
#               2. Automated version check and upgrading
#               3. Help and usage fixes
#
#       2.2 - 03/13/2010
#
#               1. Fixed issue with non phone calls ( registration, options, etc. ) were being used
#                  when searching for matching calls.
#
#               2. Fixed multiple call selection - only one graph was produced due to backwards
#                  matching of call ID vs list.
#
#               3. If there are no matching calls, it won't ask you to select a call.
#
#               4. Fixed SIP messages with / such as Call Leg/Transaction does not exist - where
#                  previously it would only show Call Leg.
#
#       2.3 - 03/19/2010
#
#               1. Added date / time in each SIP message for ease of reading
#
#       2.4 - 03/31/2010
#
#               1. Fixed certain types of SIP packets not being read ( Thanks Monica! )
#
#       2.5 - 04/06/2010
#
#               1. Now supports E.164 formatted phone numbers in packets
#
#       2.6 - 05/04/2010
#
#               1. Fixed issue with selecting log file path ( forgot to allow input )
#
#               2. Fixed log file selection numbers where there would always be two extra entries.
#
#               3. Cleaned up STDIN input for mode / call-id / number input
#
######################################################################################################

[root@box2 SIPGrapher]# perl ./sip_grapher_rc.pl --help

sip_grapher_rc.pl Version 2.6 ( 05/04/2010 )

        Author: Jeffrey Weitz
        jeffdoubleyou@gmail.com
        http://www.jeffdoubleyou.com


Usage: sip_grapher_rc.pl [options]

        --verbose       Display verbose messages
        --debug         Display debug messages
        --priority      Do not attempt to lower process priority ( Run at default nice level )
        --proxy         Use specified proxy for outbound http connections ( Not yet implemented )
        --ignore-xdid   Do not attempt to determine the number dialed using X-DID header field
        --logpath       Location of log file ( Example: ./sip_grapher_rc.pl --logpath /var/log/asterisk/full )


-- JeffreyWeitz - 2010-03-10

#####################################################################################################
#
# sip_grapher
#
# This program is used to scrape Asterisk log files and build graphs displaying the SIP session for a
# given call using SIP debug messages.
#
# Search by phone number or Call-ID
#
# Version 2.1
#
# Date: 03/08/2010
#
# Author:
#
# Jeffrey Weitz
# jeffdoubleyou@gmail.com
# jeffdoubleyou.com
#
#
# Changelog:
#
# 2.0 - 03/06/2010
#
# 1. Initial re-write of sip_grapher.pl version 1.0
#
# 2.1 - 03/08/2010
#
# 1. Fixed CANCEL transaction
# 2. Automated version check and upgrading
# 3. Help and usage fixes
#
# 2.2 - ??/??/????
#
# 1. Not yet
#
######################################################################################################

Topic revision: r8 - 2010-05-05 - 02:41:50 - JeffreyWeitz

feed RSS Feed

 

Search Site:

Copyright © by Jeffrey Weitz - AKA jeffdoubleyou - AKA Jeff Weitz. All material on this site is the property of the contributing authors.