]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_history: Add a module that provides PJSIP history for debugging 49/1849/6
authorMatt Jordan <mjordan@digium.com>
Sun, 13 Dec 2015 19:09:42 +0000 (13:09 -0600)
committerMatt Jordan <mjordan@digium.com>
Sat, 26 Dec 2015 17:50:03 +0000 (11:50 -0600)
commitdde7f3c1c4c013dc7975c818ee36978e6944faa3
treed60b1ed88515494aceee1c08cf07d6f7f5f7b618
parent1e24a0ca8ae075af2814668fc99ecfabb47423b3
res_pjsip_history: Add a module that provides PJSIP history for debugging

This patch adds a new module, res_pjsip_history, that provides a slightly
better way of debugging SIP message traffic on a busy Asterisk system. The
existing mechanisms all rely on passively dumping a SIP message to the CLI.
While this is perfectly fine for logging purposes and well controlled
environments, on many installations, the amount of SIP messages Asterisk
receives will quickly swamp the CLI. This makes it difficult to view/capture
those messages that you want to diagnose in real time.

This patch provides another way of handling this. When enabled, the module
will store SIP message traffic in memory. This traffic can then be queried
at leisure.

In order to make the querying useful, a CLI command has been implemented,
'pjsip show history', that supports a basic expression syntax similar to
SQL or other query languages. A small number of useful fields have been
added in this initial patch; additional fields can easily be added in
later improvements. Those fields are:
 - number: The entry index in the history
 - timestamp: The time the message was recieved
 - addr: The source/destination address of the message
 - sip.msg.request.method: The request method
 - sip.msg.call-id: The Call-ID header

Note - this is a resurrection of the module initially proposed on Review Board
here: https://reviewboard.asterisk.org/r/4053/

Change-Id: I39bd74ce998e99ad5ebc0aab3e84df3a150f8e36
CHANGES
res/res_pjsip_history.c [new file with mode: 0644]