Thursday, October 3, 2019

Asterisk Balancing outbound calls across multiple random trunks

This code will send calls out trunks via a random generator

HOW IT WORKS
It adds a random generator and then will send calls across multiple trunks
(GUI) PBX -> Outbound Routes
Open the route you want to apply this random trunk
1: Under "Trunk Sequence" you want the first route to be the one if the time limit is NOT exceeded
2: The next route is the one ff the time IS exceeded. (you can have as many more as you want)
Make sure those changes are saved
Now open up /etc/asterisk/extensions_additional.conf
Find your route in the dialplan. it will look SOMETHING like the one below. Yours maybe different heading and number of trunks, so just use mine as an example only, modify your file.
This is mine, and i have TWO Destinations

[outrt-2] ; randomtrunk
include => outrt-2-custom
exten => _.,1,Macro(user-callerid,LIMIT,EXTERNAL,)
exten => _.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _.,n,Set(_NODEST=)
exten => _.,n,Gosub(sub-record-check,s,1(out,${EXTEN},))
exten => _.,n,Macro(dialout-trunk,1,${EXTEN},,off)
exten => _.,n,Macro(dialout-trunk,2,${EXTEN},,off)
exten => _.,n,Macro(outisbusy,)
;--== end of [outrt-2] ==--;

Copy and paste the entire section
open up /etc/asterisk/extensions_override_issabelpbx.conf  (if you are using a different deployment "extensions_custom.conf" should work as well
Go to the bottom of the file, and PASTE it

Now under the line with "GOSUB" put this value in

exten => _.,n,Set(randomtrunk=${RAND(1,2)});

The 1 and 2 signify the low and high number.  So if you have 2 trunks, it would be 1 & 2.  If you had 4, it would be 1 & 4.

These are the trunks are called. 
In my example two trunks are called, and if they do not work, "outisbusy" is run which is "all circuits are busy" message. You'll notice in my example it has "..trunk, 1, $ ..." and followed by "... trunk, 2, $ ...".
exten => _.,n,Macro(dialout-trunk,1,${EXTEN},,off)
exten => _.,n,Macro(dialout-trunk,2,${EXTEN},,off)
exten => _.,n,Macro(outisbusy,)
;--== end of [outrt-2] ==--;

It IS possible that, although mine are in numeric order, yours may not be. So just make note of that when you see the modification example
Change the first line to look like this instead. Just note if your 1 or 2 values ​​are in a different order and adjust accordingly.

execif($["${randomtrunk}" = "X"]?......

exten => _.,n,execif($["${randomtrunk}" = "1"]?macro(dialout-trunk,1,${EXTEN},,off))
exten => _.,n,execif($["${randomtrunk}" = "2"]?macro(dialout-trunk,2,${EXTEN},,off))


Just change the "X" value to be the match to one of your randomly generated values.

Heres what it will look like when you are done.

[outrt-2] ; randomtrunk
include => outrt-2-custom
exten => _.,1,Macro(user-callerid,LIMIT,EXTERNAL,)
exten => _.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _.,n,Set(_NODEST=)
exten => _.,n,Gosub(sub-record-check,s,1(out,${EXTEN},))

exten => _.,n,Set(randomtrunk=${RAND(1,2)});
exten => _.,n,execif($["${randomtrunk}" = "1"]?macro(dialout-trunk,1,${EXTEN},,off))
exten => _.,n,execif($["${randomtrunk}" = "2"]?macro(dialout-trunk,2,${EXTEN},,off))

exten => _.,n,Macro(outisbusy,)
;--== end of [outrt-2] ==--;

From the command line type
asterisk -rx 'core reload'
Test and try!
Please note that once this code is in place, you can't change the trunk order in the GUI for this outbound route. This code will over-ride the GUI for that. So if you DO need to make changes, you can make the change the GUI, but you will need to re-perform these custom modifications for it to work.
Anyone who is trying this, and you should only do this in a test server if you aren't familiar, but if you DO have problems and its messing up your PBX, in the "extensions_override_issabelpbx.conf" file. You can just erase these changes and save / reload the file and your pBX will revert to its original config for this rule.

Asterisk - limit total time usage of a trunk

Here's how you can limit the amount of time used on a particular trunk by looking up the time in SQL.
I tested this in the ISSABEL deployment of asterisk, but should work in any.

Once the time is exceeded on a trunk, the dialplan will skip to subsequent trunks.
(scroll to the bottom for advanced users for the completed code, the next bit I'm showing how to make the code change for users unfamiliar with dialplan changes)

HOW IT WORKS
The way this works is upon making a call that would use a particular trunk, the system does an SQL query on total outbound seconds used for the last 30 days.  It selects it by looking at the trunk name and adding up the values.
Then depending if you've reached your maximum or not, it will send the call to trunks accordingly.
(GUI) PBX -> Outbound Routes
Open the route you want to apply this "time limit" rule and verify at least these TWO conditions
1: Under "Trunk Sequence" you want the first route to be the one if the time limit is NOT exceeded
2: The next route is the one ff the time IS exceeded. (you can have as many more as you want)
Make sure those changes are saved
Now open up /etc/asterisk/extensions_additional.conf
Find your route in the dialplan. it will look SOMETHING like the one below. Yours maybe different heading and number of trunks, so just use mine as an example only, modify your file.
This is mine, and i have TWO Destinations
[outrt-2] ; 1000minlimitroute
include => outrt-2-custom
exten => _.,1,Macro(user-callerid,LIMIT,EXTERNAL,)
exten => _.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _.,n,Set(_NODEST=)
exten => _.,n,Gosub(sub-record-check,s,1(out,${EXTEN},))
exten => _.,n,Macro(dialout-trunk,1,${EXTEN},,off)
exten => _.,n,Macro(dialout-trunk,2,${EXTEN},,off)
exten => _.,n,Macro(outisbusy,)
;--== end of [outrt-2] ==--;
Copy and paste the entire section
open up /etc/asterisk/extensions_override_issabelpbx.conf  (if you are using a different deployment "extensions_custom.conf" should work as well
Go to the bottom of the file, and PASTE it
Now we'll modify this file.
First we'll add the database lookup, insert this code. Change USERNAME and PASSWORD to be your database:
Change TRUNKNAME to be the trunk name you want to check against.
Change "30" to be the number of days you want to look back on
Change 60000 to be the number of seconds you want to limit to
exten => _.,n,MYSQL(Connect connid localhost USERNAME PASSWORD asteriskcdrdb)
exten => _.,n,MYSQL(Query resultid ${connid} SELECT if(sum(duration) < 60000, 1, 0) FROM cdr WHERE DATE(calldate) >= DATE(NOW()) - INTERVAL 30 DAY and dstchannel like '%TRUNKNAME%')
exten => _.,n,MYSQL(Fetch fetchid ${resultid} dynroute)
exten => _.,n,MYSQL(Clear ${resultid})
exten => _.,n,MYSQL(Disconnect ${connid})
Put it under the GOSUB statement in the base dialplan code:
It will look like this:
[outrt-2] ; 1000minlimitroute
include => outrt-2-custom
exten => _.,1,Macro(user-callerid,LIMIT,EXTERNAL,)
exten => _.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _.,n,Set(_NODEST=)
exten => _.,n,Gosub(sub-record-check,s,1(out,${EXTEN},))

exten => _.,n,MYSQL(Connect connid localhost user password asteriskcdrdb)
exten => _.,n,MYSQL(Query resultid ${connid} SELECT if(sum(duration) < 60000, 1, 0) FROM cdr WHERE DATE(calldate) >= DATE(NOW()) - INTERVAL 30 DAY and dstchannel like '%trunkname%')
exten => _.,n,MYSQL(Fetch fetchid ${resultid} dynroute)
exten => _.,n,MYSQL(Clear ${resultid})
exten => _.,n,MYSQL(Disconnect ${connid})
Now, we'll modify the trunk to be dialed. Your code will look like something like this.
These are the trunks are called. In my example two trunks are called, and if they do not work, "outisbusy" is run which is "all circuits are busy" message. You'll notice in my example it has "..trunk, 1, $ ..." and followed by "... trunk, 2, $ ...".
exten => _.,n,Macro(dialout-trunk,1,${EXTEN},,off)
exten => _.,n,Macro(dialout-trunk,2,${EXTEN},,off)
exten => _.,n,Macro(outisbusy,)
;--== end of [outrt-2] ==--;
It IS possible that, although mine are in numeric order, yours may not be. So just make note of that when you see the modification example
Change the first line to look like this instead. Just note if your 1 or 2 values ​​are in a different order and adjust accordingly.
exten => _.,n,execif($["${dynroute}" = "0"]?macro(dialout-trunk,1,${EXTEN},,off))
This will tell the dialplan that IF the total time in SQL is NOT 1000 minutes (60000 seconds) then use the first trunk.
IF the dialplan is told by SQL IS more than 1000 minutes, the dialplan will execute the remaining trunk (s) in the order you have them.
Now your code will look something like this when completed:
username / password are you MYsql credentials
TRUNKNAME = trunk name in GUI (can be partial).
Change "30" to be the number of days you want to look back on
Change 60000 to be the number of seconds you want to limit to
[outrt-2] ; 1000minlimitroute
include => outrt-2-custom
exten => _.,1,Macro(user-callerid,LIMIT,EXTERNAL,)
exten => _.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _.,n,Set(_NODEST=)
exten => _.,n,Gosub(sub-record-check,s,1(out,${EXTEN},))

exten => _.,n,MYSQL(Connect connid localhost username password asteriskcdrdb)
exten => _.,n,MYSQL(Query resultid ${connid} SELECT if(sum(duration) < 60000, 1, 0) FROM cdr WHERE DATE(calldate) >= DATE(NOW()) - INTERVAL 30 DAY and dstchannel like '%trunkname%')
exten => _.,n,MYSQL(Fetch fetchid ${resultid} dynroute)
exten => _.,n,MYSQL(Clear ${resultid})
exten => _.,n,MYSQL(Disconnect ${connid})

exten => _.,n,execif($["${dynroute}" = "0"]?macro(dialout-trunk,1,${EXTEN},,off))

exten => _.,n,Macro(dialout-trunk,2,${EXTEN},,off)   
exten => _.,n,Macro(outisbusy,)
;--== end of [outrt-2] ==--;
From the command line type
asterisk -rx 'core reload'
Test and try!
Please note that once this code is in place, you can't change the trunk order in the GUI for this outbound route. This code will over-ride the GUI for that. So if you DO need to make changes, you can make the change the GUI, but you will need to re-perform these custom modifications for it to work.
Anyone who is trying this, and you should only do this in a test server if you aren't familiar, but if you DO have problems and its messing up your PBX, in the "extensions_override_issabelpbx.conf" file. You can just erase these changes and save / reload the file and your pBX will revert to its original config for this rule.

Thursday, September 5, 2019

Modify Asterisk Queue members via SQL

It is possible to add static agents to a queue via a SQL statement.
Here you see the static members of a queue 
https://imgur.com/a/vzEgDLv
In the table "queues_details" in the database "asterisk" this select will show you all your configured queues.
MariaDB [asterisk]> select * from queues_details;
+------+-----------------------------+---------------------------+-------+
| id   | keyword                     | data                      | flags |
+------+-----------------------------+---------------------------+-------+
| 2001 | member                      | Local/1005@from-queue/n,0 |     3 |
| 2001 | member                      | Local/1006@from-queue/n,0 |     4 |
| 2001 | member                      | Local/1004@from-queue/n,0 |     2 |
| 2001 | member                      | Local/1002@from-queue/n,0 |     1 |
| 2001 | member                      | Local/1001@from-queue/n,0 |     0 |
| 2001 | answered_elsewhere          | 0                         |     0 |
| 2001 | penaltymemberslimit         | 0                         |     0 |
| 2001 | timeoutpriority             | app                       |     0 |
My example shows Queue (ID) 2001 with static members 1001-1006 (1003 is missing)
You can add a member (which will show up in the GUI if you edit it too) using this command. I'm adding extension "1003" into queue 2001.
MariaDB [asterisk]> insert into `queues_details` (`id`,`keyword`,`data`,`flags`) values (2001,'member','Local/1003@from-queue/n,0',100);
Query OK, 1 row affected (0.00 sec)

MariaDB [asterisk]> select * from queues_details;
+------+-----------------------------+---------------------------+-------+
| id   | keyword                     | data                      | flags |
+------+-----------------------------+---------------------------+-------+
| 2001 | member                      | Local/1005@from-queue/n,0 |     3 |
| 2001 | member                      | Local/1006@from-queue/n,0 |     4 |
| 2001 | member                      | Local/1004@from-queue/n,0 |     2 |
| 2001 | member                      | Local/1002@from-queue/n,0 |     1 |
| 2001 | member                      | Local/1001@from-queue/n,0 |     0 |
| 2001 | answered_elsewhere          | 0                         |     0 |
| 2001 | maxlen                      | 0                         |     0 |
| 2001 | member                      | Local/1003@from-queue/n,0 |   100 |
+------+-----------------------------+---------------------------+-------+
42 rows in set (0.00 sec)
What you have to do is set the "FLAG" value to a high value (higher than any current) when you enter it, and you have increment it. My example uses 100.
If you look in the GUI, you'll see it shows up there as well now.

Wednesday, September 4, 2019

Modify FreePBX IVR via commandline

Sometimes you need to modify your IVR by another application.  Maybe you need to remove or add features on the fly, pin numbers, change destinations.  Sometimes its just not convenient to do via the GUI, and you want to do it through a command line or some other method.  Heres two ways.


1 -> Dialplan
2 -> MySQL Database

EXAMPLE 1:

DIALPLAN
Create the ivr in PBX GUI

Open "extensions_additional.conf"
and find your IVR. It will start with a name like
[ivr-X]

Example IVR i created. When you open your file you see very similar code. Copy the entire code in your .conf file and paste it into the bottom of /etc/asterisk/extensions_custom.conf

[ivr-4] ; testivr
include => ivr-4-custom
exten => s,1,Set(TIMEOUT_LOOPCOUNT=0)
exten => s,n,Set(INVALID_LOOPCOUNT=0)
exten => s,n,Set(_IVR_CONTEXT_${CONTEXT}=${IVR_CONTEXT})
exten => s,n,Set(_IVR_CONTEXT=${CONTEXT})
exten => s,n,Set(__IVR_RETVM=)
exten => s,n,GotoIf($["${CDR(disposition)}" = "ANSWERED"]?skip)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n(skip),Set(IVR_MSG=)
exten => s,n(start),Set(TIMEOUT(digit)=3)
exten => s,n,ExecIf($["${IVR_MSG}" != ""]?Background(${IVR_MSG}))
exten => s,n,WaitExten(10,)

exten => 3,1,Set(__IVR_DIGIT_PRESSED=3)
exten => 3,n(ivrsel-3),Goto(app-blackhole,hangup,1)

exten => 2,1,Set(__IVR_DIGIT_PRESSED=2)
exten => 2,n(ivrsel-2),Goto(app-blackhole,hangup,1)

exten => 1,1,Set(__IVR_DIGIT_PRESSED=1)
exten => 1,n(ivrsel-1),Goto(app-blackhole,hangup,1)

exten => h,1,Hangup

exten => hang,1,Playback(vm-goodbye)
exten => hang,n,Hangup

;--== end of [ivr-4] ==--;
copy and paste into /etc/asterisk/extensions.conf

now you can manually edit the file here through code. BUT you can't edit in the GUI. Changes will NOT reflect on the PBX that are done in the GUI.

Example, i've added option # 4 and #5 in the code. (my example IVR had option 1-3)

exten => 4,1,Set(__IVR_DIGIT_PRESSED=3)
exten => 4,n(ivrsel-3),Goto(app-blackhole,hangup,1)

exten => 5,1,Set(__IVR_DIGIT_PRESSED=3)
exten => 5,n(ivrsel-3),Goto(app-blackhole,hangup,1)

exten => 3,1,Set(__IVR_DIGIT_PRESSED=3)
exten => 3,n(ivrsel-3),Goto(app-blackhole,hangup,1)

exten => 2,1,Set(__IVR_DIGIT_PRESSED=2)
exten => 2,n(ivrsel-2),Goto(app-blackhole,hangup,1)
  
exten => 1,1,Set(__IVR_DIGIT_PRESSED=1)
exten => 1,n(ivrsel-1),Goto(app-blackhole,hangup,1)


EXAMPLE 2

SQL commands

You can update/modify using SQL.
If you open up the database table "asterisk" and look at the table called "ivr_entries"

My IVR has 3 entries in the GUI



MariaDB [asterisk]> select * from ivr_entries;
+--------+-----------+------------------------+---------+
| ivr_id | selection | dest                   | ivr_ret |
+--------+-----------+------------------------+---------+
|      5 | 3         | app-blackhole,hangup,1 |       0 |
|      5 | 2         | ivr-3,s,1              |       0 |
|      5 | 1         | from-did-direct,1000,1 |       0 |
+--------+-----------+------------------------+---------+

3 rows in set (0.00 sec)

This IVR you see i created in the GUI. Now you want to add an option? Just update this table, maintain the "IVR_ID" to keep the right IVR and you should be good. This example, i'm going to add option 4, and have it goto extension 2105

MariaDB [asterisk]> insert into ivr_entries (ivr_id,selection,dest,ivr_ret) values (5,4,'from-did-direct,2105,1',0);
Query OK, 1 row affected (0.00 sec)
MariaDB [asterisk]> select * from ivr_entries;
+--------+-----------+------------------------+---------+
| ivr_id | selection | dest                   | ivr_ret |
+--------+-----------+------------------------+---------+
|      5 | 4         | from-did-direct,2104,1 |       0 |
|      5 | 3         | app-blackhole,hangup,1 |       0 |
|      5 | 2         | ivr-3,s,1              |       0 |
|      5 | 1         | from-did-direct,1000,1 |       0 |
+--------+-----------+------------------------+---------+
4 rows in set (0.00 sec)
MariaDB [asterisk]>

Now you've added the entry to the database, if you were to look at this IVR in the GUI, you will see option "4" is now showing.

EXAMPLE 3

Call center uses an IVR to verify customer PIN numbers.  They can manually enter them in via the GUI, but in some cases, during an onboarding processess, they want it to be somewhat automated.
Each customer PIN number is just an IVR entry, and points to a queue if entered properly.
Insted of just using digits 0-9 you can use pretty much any digit length you want.
IVR - "Please enter your pin number"
0 = go to operator
558939 = customer #1 support
443223 = customer #2 support
993828 = customer #83 support
746236 = customer #154 support
After 3 failed tries it hangsup.
FreePBX stores all PBX GUI related information in the MySQL database name "asterisk".
All IVR data is stored in the table "ivr_entries".
In the example below, this shows the IVR entries.
0= play phonebooook
12244 = Customer #12244 send call to queue#2001 (support gold queue)
MariaDB [asterisk]> select * from ivr_entries;
+--------+-----------+-------------------------------+---------+
| ivr_id | selection | dest                          | ivr_ret |
+--------+-----------+-------------------------------+---------+
|      3 | 0         | app-pbdirectory,pbdirectory,1 |       0 |
|      3 | 12244     | ext-queues,2001,1             |       0 |
+--------+-----------+-------------------------------+---------+
2 rows in set (0.00 sec)

If you wanted to automate adding customers, you could do it with a MYSQL command below.
This will add the customer pin 45657 into the IVR id#3 and send it to queue# 2001
Syntax
insert into TABLENAME (Column 1 name,Column 2 name,Column 3 name,Column 4 name) values (IVRID,CustomerPIN,'DESTINATION',"RETURN-IVR");
So adding a customer number of "45657" would look like this:
insert into `ivr_entries` (`ivr_id`,`selection`,`dest`,`ivr_ret`) values (3,45657,'ext-queues,2001,1',0);
EXAMPLE;
 MariaDB [asterisk]> insert into `ivr_entries` (`ivr_id`,`selection`,`dest`,`vr_ret`) values (3,45657,'ext-queues,2001,1',0);
 Query OK, 1 row affected (0.00 sec)

 MariaDB [asterisk]> select * from ivr_entries;                              
 +--------+-----------+-------------------------------+---------+
 | ivr_id | selection | dest                          | ivr_ret |
 +--------+-----------+-------------------------------+---------+
 |      3 | 45657     | ext-queues,2001,1             |       0 |
 |      3 | 0         | app-pbdirectory,pbdirectory,1 |       0 |
 |      3 | 12244     | ext-queues,2001,1             |       0 |
 +--------+-----------+-------------------------------+---------+
 3 rows in set (0.00 sec)
The above example shows entering that data in from a sql statement.
Customer 45657 is now entered into the IVR
This will also update in the PBX GUI if you look at it with your web browser.

Monday, June 17, 2019

Hyundai Tuscon 2.7 2007 Alternator replacement

Here's some steps to removal/replacement of an alternator from a Hyundai Tuscon 2.7 V6 2007 2wd

This alternator is a challenging one to get out.

The alternator is located on the bottom left passenger side of the engine.  I've seen videos pictures of these being removed without disconnecting any drive line components, but in my case, there was NO WAY that alternator was coming out with out disconnecting the passenger side CV join.  Its not so bad, it might sounds intimidating if you've never done it before, but really its not that hard.

You'll need some basic metric wrenches between 10mm -17mm
Some basic handtools, like screwdriver and pliers.
Pickle Fork (you need to remove the front CV joint)
Proper jack and jack stands.  NEVER get under a car without a proper jack stand supporting the car.
Hammer, and possibly and bigger hammer if the first one doesn't work.


The process is
  1. Disconnect the battery
  2. Remove the top plastic engine cover to give a little more access to the belt
  3. Chock the tires to make sure the car doesn't roll on you.
  4. Loosen the passenger side tire wheel nuts (don't remove them, its just safer to loosen before jacking)
  5. Jack the passenger side of the car up
  6. Use a proper jackstand to support the car.  DO NOT WORK UNDER A VEHCILE SUPPORTED BY A JACK!
  7. Remove the passenger tire
  8. Remove the brake caliper
  9. Remove the brake caliper mount
  10. Remove the brake disk
  11. Disconnect the tire rod end
  12. Remove the two bolts at the bottom of the strut
  13. Remove the plastic cover that is behind the wheel to give room to access the alternator
  14. Remove the belt from the alternator
  15. Remove the 14mm nut from the alternator.  The bolt does not need to be removed.  The mount it is in is notched to let alternator come out with bolt remaining in place.
  16. There is a 12mm bolt at the top of the alternator.
  17. The alternator will slide UP and to the LEFT.  (This will let the alternator move and gives you some more room to get at the sensor and power cable)
  18. Remove the sensor wire, on the back side of the connector squeeze the tab on the back side of the connector and pull and it will come off
  19. Remove the nut holding the positive power cable to the alternator and remove cable.
  20. Disconnect the CV joint where it connects to the transmission.
  21. Now with that removed there is room to remove the alternator out.

    Now repeat the steps in reverse to put the whole thing back together.  Some additional searches will reveal the proper torque specs.

Thursday, May 9, 2019

Ford onboard dashboard diagnostics


Ford onboard diagnostics dashboard test mode

Enter the Ford HEC Dealer Test Mode

  1. With the truck off, press and hold the SELECT/RESET button on the instrument cluster.
  2. Turn the ignition switch to the on position while the button is pressed
  3. Continue pressing, "test" will appear on the odometer.
  4. Start the truck (keep the dash button down)
  5. Released the button to remain in the dash test mode.
  6. Pressing the SELECT/RESET button now will advance through the parameters.
Display Descriptions

Here's the odometer function followed by a description.  Not every display listed may be on your truck.  05-07 added values that 03 / 04 didn’t have

GAGE= Sweep of all gauges (then present current gauge values).  Also carries out the checksum tests on ROM and EE. If the gauge sweep is inoperative, INSTALL a new instrument cluster.

BLUB= Illuminates all micro-controlled indicators and LEDs. Install a new indicator or LED as necessary. 

R####= Returns to normal operation of all micro-controlled indicators and LEDs and displays hexadecimal value for ROM level. If alternating flashes for FAIL and ROM level are displayed, INSTALL a new instrument cluster. 

EE= Displays the hexadecimal value for EE level . If alternating flashes of FAIL and EE level are displayed replace instrument cluster. 

DT= Displays hexadecimal coding of final manufacturing test date .

DTC = Displays continuous DTC's in hexadecimal format. Pressing the SELECT/RESET button will display any DTCs stored before proceeding to the next step. See index below for description of trouble codes. 

###C  Gas engines display last temperature gauge input value from SCP, temperature gauge will indicate present temperature. Diesel engine displays present temperature analog/digital input in decimal as a ratio, temperature gauge will indicate present temperature.
  
ENG= Displays the English speed in MPH. Speedometer will indicate present speed within tolerances. Display will show 0 if input in not received. If input is invalid for one second or more, or if speed is 0. 

M= Displays the metric speed data in kph. Speedometer will indicate present speed within tolerances. Display will show 0 if input in not received. If input is invalid for one second or more, or if speed is 0. 

TAC= Displays the tachometer data received from the PCM via the SCP network within tolerances. Tachometer will indicate present RPM. Display will show 0 if input is no received, if input received is invalid for one second or more, or if engine RPM is 0. 

BR
Displays the brake fluid level in an analog/digital ratio value.
  
FUEL= Displays the code (0-255) for the fuel sender input to the HEC. The fuel gauge will display a filtered fuel level value. This filter will keep the pointer from moving suddenly or erratically. 
255= open send +/- 0 
232= full stop +/- 0 
215= Full mark +/- 10 
178= 3/4 mark +/- 8 
138= 1/2 mark +/- 7 
93= 1/4 mark +/- 5 
41= E mark +/- 4 
54= Low Fuel (0-59) 
0-18= short (0-20 max) 

OIL= Displays the code (0-250) for the oil pressure switch input to the HEC.
Oil pressure gauge will indicate present oil pressure. Normal oil pressure (greater than 6psi) will display a value between 000 and 176. A low oil pressure or an inoperative engine oil pressure switch (less than 6 psi) will display a value greater than 176. 

dEG'C= Display of engine temperature in Degrees C input from cylinder head temperature sensor.  49 C= "C" mark 
60 C= Normal band start 
120 C= Normal band end 
-40 C= No SCP message for 5 seconds 

BAT battery voltage Displays the code (0-255) for the battery voltage input to the HEC. Battery voltage gauge will indicate present battery voltage.

bAt ##.#
Displays present battery analog/digital voltage.

Some trucks show it as a value between 0-255
93-102 6.2-9.1 volts low voltage  
115-124= 8.5-10.7 volts (Normal band start)
215-225= 15.8-18 volts, (Norm band end)
230-241= 16.9-19.1 volts, high voltage 

rhEo= Displays the present decimal rheostat dimming input, 0-255  

rhi, rhS, rho
Alternating 1 second display of pulse width modulation (PWM) input duty cycle, SCP hexadecimal dimming step, output driver counts in hexadecimal.
  
CR= Displays the current RUN/START sense input. Display will show -h for high input with the ignition switch in the START position and -L for low input with the ignition switch in the RUN position. 

PA, Pb, PC, and Pd
Displays 8-bit hexadecimal value for the Port A, B, C, and D readings (used when requesting information from the hotline).

PE0-PE7
Displays 8-bit hexadecimal value for the Port E0-Port E7 in analog/digital readings

GAGE= Repeats the display cycle