What is that timestamp? – Dial-Peers – Last Setup/Disconnect Time

Reading Time: 5 minutes

Being the geek I am, I was troubleshooting an issue one day where I wanted to see what dial-peer a certain digit string was hitting on a gateway. I saw something that simply intrigued my mind that took focus away until I figured it out. This “thing” I saw was irrelevant to what I was troubleshooting but once the problem was resolved I simply had to figure it out. I’m sure many of you experience that same thing throughout your days. So, this is what I’ve discovered. *Please note that this is not an official explanation of the item/output, it is simply my interpretation from time spent figuring out what it really meant.

Alright, enough small talk. So what is it? It’s the “Last Setup Time” and “Last Disconnect Time” in the Cisco “show dialplan number” command. Initially I ignored the output because I simply wanted to see what dialpeer was matched. However, when I started typing my next show command I looked up a couple of lines and saw these ridiculous strings of digits associated with the above labels. What are they? What do they mean?

First lets start with a sample of the output so you can see it. I’ve obviously faked the phone number I entered in the command and the router name, however the rest of the output is real output from my debugging session.

ROUTER-1#show dialplan number 915559871234
Macro Exp.: 915559871234

VoiceEncapPeer6
        peer type = voice, system default peer = FALSE, information type = voice,
        description = `LD Calls',
        tag = 6, destination-pattern = `91..........',
        voice reg type = 0, corresponding tag = 0,
        allow watch = FALSE
        answer-address = `', preference=0,
        CLID Restriction = None
        CLID Network Number = `'
        CLID Second Number sent 
        CLID Override RDNIS = disabled,
        rtp-ssrc mux = system
        source carrier-id = `', target carrier-id = `',
        source trunk-group-label = `',  target trunk-group-label = `',
        numbering Type = `unknown'
        group = 6, Admin state is up, Operation state is up,
        Outbound state is up,
        incoming called-number = `', connections/maximum = 0/unlimited,
        DTMF Relay = disabled,
        URI classes:
            Destination = 
        huntstop = disabled,
        in bound application associated: 'DEFAULT'
        out bound application associated: ''
        dnis-map = 
        permission :both
        incoming COR list:maximum capability
        outgoing COR list:minimum requirement
        Translation profile (Incoming):
        Translation profile (Outgoing):
        incoming call blocking:
        translation-profile = `'
        disconnect-cause = `no-service'
        advertise 0x40 capacity_update_timer 25 addrFamily 4 oldAddrFamily 4
        mailbox selection policy: none
        trunk-group:
        id = `PSTN', preference = `'
        type = pots, prefix = `',
        forward-digits 11
        session-target = `', voice-port = `',
        direct-inward-dial = disabled,
        digit_strip = enabled,
        register E.164 number with H323 GK and/or SIP Registrar = TRUE
        fax rate = system,   payload size =  20 bytes
        supported-language = ''
        preemption level = `routine'
        bandwidth:
            maximum = 64 KBits/sec, minimum = 64 KBits/sec
        voice class called-number:
            inbound = `', outbound = `'
        dial tone generation after remote onhook = enabled
        mobility=0, snr=, snr_noan=, snr_delay=0, snr_timeout=0
        snr calling-number local=disabled, snr ring-stop=disabled, snr answer-too-soon timer=0
        Time elapsed since last clearing of voice call statistics never
        Connect Time = 48270601, Charged Units = 0,
        Successful Calls = 117507, Failed Calls = 25202, Incomplete Calls = 22152
        Accepted Calls = 0, Refused Calls = 0,
        Last Disconnect Cause is "11  ",
        Last Disconnect Text is "user busy (17)",
        Last Setup Time = 1283340034.
        Last Disconnect Time = 1282988743.
Matched: 915559871234   Digits: 2
Target:

With the above output I’m going to focus on the Last Setup Time. If you look at this string many people familiar with I.T. might jump to the conclusion I did when I first looked at it. That conclusion is “maybe it’s epoch time”. Well, lets see.

If I go to a quick online epoch time convert the string “1283340034” is the equivalent to GMT: Wed, 01 Sep 2010 11:20:34 GMT. Or in my time zone: September 1, 2010 at 7:20:34 AM EDT. Considering I am writing this post on Sept 15, 2015 that doesn’t quite add up. At this point I took a quick look at the uptime on the router to see if maybe it was correlating to that.

ROUTER-1#show ver | i uptime
ROUTER-1 uptime is 21 weeks, 1 day, 12 hours, 51 minutes
ROUTER-1#show clock
10:39:30.255 EDT Tue Sep 15 2015

Alright, so the router has been up for 21 weeks and some change. So does that string correlate from seconds to weeks? Let’s see. Knowing that 1 week is equal to 604800 seconds if we convert 1283340034 as seconds into weeks we get: 2121.924659392 weeks. Um….No?!

Maybe it’s in microseconds. 1 week is equal to 1.6534e-12 micro seconds so 1283340034 is the equivalent to 0.002121924659392 weeks. Yup, no way, that’s not it.

At this point it just ended up me just trying things until I figured out this random thing. If I dropped the last two digits, and starting converting the string down to weeks, take the leftover and convert it to days, take the leftovers from that and convert it to hours, and finally minutes, it turned out that it was extremely close to the uptime of the router. What this meant is that if I did this calculation on the digit string, subtracted it from the uptime, and took the difference off the current clock on the router, I would get the rough time that the dialpeer was last setup. Crazy! I’ll run through the calculation on this string below.

Take the Last SetupTime and drop the last two digits.
1283340034 = 12833400

Convert this number as seconds to weeks. (1 week = 604800 seconds)
This is 21.219246032
Write down the whole number as weeks.
21 weeks

Take the remaining decimal (.219246032) and convert it as weeks to days (1 week = 7 days)
This is 1.534722224
Write down the whole number as days
1 Day

Take the remaining decimal (.534722224) and convert it as days to hours (1 day = 24 Hours)
This is 12.833333376
Write down the whole number as hours
12 Hours

Convert the remaining decimal (.833333376) as hours to minutes (1 hours = 60 minutes)
This is 50.00000256
Write down the whole number as minutes
50 Minutes

This gives us 21 Weeks, 1 Day, 12 Hours, 50 Minutes as the last time this dial peer was Last Used for Setup

Find the difference between the uptime and the Last Setup Time we just calculated
1 Minutes in this case. (21 weeks, 1 day, 12 hours, 51 minutes minus 21 Weeks, 1 Day, 12 Hours, 50 Minutes)

Take the show clock and subtract the result of the difference
10:39:30.255 EDT Tue Sep 15 2015 minus 1 minute = the Last Setup Time as 10:38:30.255 On Tuesday Sep 15, 2015

I cannot find any documentation anywhere that indicated this calculation (or maybe even an easier way to do it) for this time stamp in the “show dialplan number #” output. I find it strange to need to drop the last two digits although they may represent 1/10s of a second. Anyone willing to prove that please do and let me know. Also interesting to me is the “.” at the end of the string. Only these timestamps have it making it either a curious artifact or a programmer that simply wanted to indicate an end to the line.

On another note, I kind of hate my brain for making be want to know the answer to this.

This same calculation would work for the last disconnect time. If you are going to do this calculation I recommend doing the “show dialplan..” “show ver | i uptime” and “show clock” as closely as possible.

 

Share this article:

Permanent link to this article: https://www.packetpilot.com/what-is-that-timestamp-dial-peers-last-setupdisconnect-time/