Log reason phrase with SIP response codes for failures

Discuss any topic about Brekeke PBX.

Moderator: Brekeke Support Team

Post Reply
dudley.aoi
Posts: 31
Joined: Wed Oct 17, 2018 2:21 pm

Log reason phrase with SIP response codes for failures

Post by dudley.aoi »

1. Brekeke Product Name and Version:
Brekeke SIP Server 3.8.6.4/501

2. Java version:
Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 10.0.1

3. OS type and the version:
CentOS Linux release 7.5.1804 (Core) kernel 3.10.0-862.14.4.el7.x86_64

4. UA (phone), gateway or other hardware/software involved:
Avaya Communication Manager

5. Your problem:
Often when determining root cause for an issue, our Avaya team wants specifics for the reason phrase in addition to the SIP response code. I would rather not leave debug logging on all the time, for performance, as per the Brekeke wiki documentation. Is there any method for logging the reason phrase with the response code, but only for 4xx, 5xx, and 6xx SIP responses? Or is it possible to set debug logging for only specific dialplan rules?
Mohney
Posts: 79
Joined: Tue Nov 20, 2007 12:05 pm

Post by Mohney »

You don't have to enable debug logging just for getting responses code and their reasons.

Please go to Brekeke PBX's [Diagnostics]->[Debug Logs] page and click [Download] button.

After you unzip the downloaded file, you will find "callxxx.log" under pbx/logs/2019/02

The log format is:

Code: Select all

session-id, call-uri, side, talk-length, invite-start-time, talk-start-time, end-time, result, error-code
SIP status code will be shown as error-code if it is 4xx, 5xx, or 6xx.
This log file will be generated automatically without enabling any debug logging categories.
dudley.aoi
Posts: 31
Joined: Wed Oct 17, 2018 2:21 pm

Post by dudley.aoi »

Yes, but that only shows the SIP response code, not the actual reason phrase. What I really want is a way to capture the reason phrase that the Avaya is sending, without having to resort to debug logging or packet captures.

As an example, let us assume the Avaya responds to an INVITE with a SIP response code of 403 Forbidden. There are different Avaya 403 responses, which are given in the reason phrase. A response of "403 Forbidden (Unknown Far-End)" has a completely different root cause than a response of "403 Forbidden (Invalid Domain)", even though both are SIP response code 403 Forbidden.

In the Brekeke logs, both of these examples would appear as 403 Forbidden responses, with no reason phrase. Actually, the Avaya is providing critical root cause details in the reason phrase of its response.
dudley.aoi
Posts: 31
Joined: Wed Oct 17, 2018 2:21 pm

Post by dudley.aoi »

Perhaps what I am really looking for is a detailed list of what the logging levels provide.

For example, if I set

Code: Select all

net.sip.loglevel.file = 26
to include Status level, would that include the reason phrase in the log?

What specifically is logged at the status and detail levels, different than full debug level logging?
Mohney
Posts: 79
Joined: Tue Nov 20, 2007 12:05 pm

Post by Mohney »

FYI:
https://docs.brekeke.com/sip/brekeke-log-level

> to include Status level, would that include the reason phrase in the log?

It will be: net.sip.loglevel.file = 16
dudley.aoi
Posts: 31
Joined: Wed Oct 17, 2018 2:21 pm

Post by dudley.aoi »

I tried net.sip.loglevel.file = 16 but that only logs the response code, not the response phrase. After testing, it seems the only way I can reliably capture the response phrase in the logs for non-error responses is by turning on debug logging with net.sip.loglevel.file = 64.

For errors, such as 404 Not Found, the response phrase is in the error log. For non-error responses, such as 403 Forbidden, the response phrase only appears in debug logging.

What I really wanted was a way to increase verbosity in the session logs to include the response phrase, and not just the response code. :(
janP
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by janP »

It can be done by custom session plugin or CDR plugin.
Post Reply