Anda di halaman 1dari 29

Examples GSM call setup time is usually defined as the time between the RR channel request message (which

is the first message that is sent after the caller presses the green button on the mobile) and the CC alert message (sent as the receiving mobile starts ringing). To calculate the call setup time, we need to find the CC alert message in the stream and "look back" to the earlier RR channel request message. We access the messages through the stream, which presents the messages in chronological sequence. This means we can't "look forward" from the RR channel request to the CC alert message, because at that point we can't predict when the CC alert message will occur.

The prev_time_where function enables us to look back in the stream to an earlier message at which a particular expression is true and get that message's time relative to the start of the stream. In this example, we will use an expression that tests for an RR channel request message using the GSM_Um_Msg_Type attribute. This stores a numeric value that indicates the message type. (When necessary, a format group is used to translate the numeric value into a text, but in the expression we need to test for the raw numeric value.) The following table shows the values for the two message types in which we are interested in this example. Value Type 1791 RR channel request 769 CC alert Here is the expression that calculates the call setup time:
Time - prev_time_where(GSM_Um_Msg_Type == 1791)

This example uses the prev_time_where function to return the time of the previous RR channel request message and subtracts this from the time of the current message (which is retrieved from the Time attribute). Both of these times are measured in milliseconds relative to the start of the stream and so the example gives us the time between the two messages in milliseconds. Provided the current message is a CC alert message, this is the call set up time. In order to ensure that the current message is of the CC alert type, you would need to use a conditional expression such as:
GSM_Um_Msg_Type == 769

For example, if we were creating a statistic for a crosstab query, we would add this expression as a filter. For example:

Related Topics Message-Based Functions

Send feedback on this topic

For super stream

Anda mungkin juga menyukai