Skip to content

spicyramen/trace_analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Freeswitch log parser

Instructions:

Enable Freeswitch SIP traces.

fs_cli

fsctl loglevel 3

sofia tracelevel 3

sofia profile external siptrace on

Running:

Collect freeswitch logs: For simple log file, just extract latest freeswitch.log Otherwise extract freeswitch.log.* and concatenate all the files. Latest file is freeswitch.log

cat freeswitch.log.* > freeswitch.log.all

Run script

###python sip_parser.py <freeswitch.log filename>

Example: ###python sip_parser.py freeswitch.log.all

Functions:

  • readFile(): Reads file and returns SIP Messages
  • printSipMessages(sipMessage arr*): Prints all SIP messages, including SDP.
  • sipCalls(): Reads SIP messages array and return SIP Call dictionary using SIP call_id as key and value SIP messages array.
  • analyzeSipCalls(): Performs processing/parsing. Like extracting SIP logs.

I have tested file with 100K calls ~600MB.

About

Parse Freeswitch SIP traces

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages