Dectrace is unable to decode certain ISDN trace logs

Symptom

When using the "dectrace" utility to decode an ISDN trace log (e.g. agtrace 803073 or 801000), some log files may return an empty decoded file.

Reason for the issue

The agtrace log files (agpierror.log or oammon.log) contain a timestamp for each trace data; the timestamp is the time elapsed in seconds since the board was booted up.  The issue can occur when a log file has large timestamps such as the following:

OMN:0 10373099.01 dir=I S=>d, code=E nai= 1 group= 1 sapi= 0 add= 1 id= 1 27 8 2 7A D0 5 4 3 80 90 A2 18 3 A9 83 91 6C C 0 80 38 30 33 37 34 34 35 31 30 30 70 8 80 32 37 36 34 35 36 36

The supplied compiled dectrace tool is unable to handle such large timestamps so the decoded file is completely empty.

Fix / Solution

Since the source code for dectrace is shipped with the Dialogic Natural Access™ software, the source code can be modified to fix the issue.  

The source code can be found in the \nms\ctaccess\demos\dectrace directory, in the dectrace.c file; search for "10s" and there are 3 places containing this string.  

The fix is to increase the 10s to 12s as shown here:

/* OMNITEL buffer format for ISDN 1.4x and above with code < 128 */ if ( sscanf(isdnbuffer, "%x %12s dir=%*c %c=>%c, code=%c nai=%2x group=%2x " "sapi=%*2x add=%2x id=%*2x %6x", &board, timestring, /*&dir,*/ &ent1, &ent2, &code, &nai, &group, &add, &numbytes) == 9) {} /* OMNITEL buffer format for ISDN 1.4x and above with code >= 128 */ else if ( sscanf(isdnbuffer, "%x %12s dir=%*c %c=>%c, code=0x%2x nai=%2x group=%2x " "sapi=%*2x add=%2x id=%*2x %6x", &board, timestring, /*&dir,*/ &ent1, &ent2, &c, /* Use 'int c' instead of 'uchar code' */ &nai, &group, &add, &numbytes) == 9) { code = c & 0xFF ; } /* OMNITEL buffer format for ISDN 1.3x and before */ else if ( sscanf(isdnbuffer, "%x %12s dir=%*c %c=>%c, code=%c nai=%2x " "sapi=%*2x add=%2x inf=%*4x,%*x %6x", &board, timestring, /*&dir,*/ &ent1, &ent2, &code, &nai, &add, &numbytes) == 8) { group = nai; } /* Invalid OMNITEL buffer format */ else { continue;}

 

Then recompile the tool and the new dectrace will be able to decode trace logs with large timestamps.

Workaround

If possible, one may reboot the board thus restting the agtrace timestamps as a workaround.

Product List

All Dialogic CG-series boards.

 

Return to Documentation Home I Return to Sangoma Support