Mitel 5330 - Finally working Correctly with BLF. here's how!

Hey all…
After days and days of pulling my hair out and forum searching and experimentation i have finally got BLF working on a Mitel 5330… Yes you heard it… a 5330!.. I wrote this guide for the Elastix forum (as thats the bloatware distro i use, however i have seen most questions on this related to freePBX… it applies equally here i believe).

It seems i had a number of problems getting the BLF to work. Both a function not mentioned often in the user-context of the Mitels SIP configuration file (i have no GUI as it’s a BT branded Mitel and they dont want us playing with it!). Also the DEVSTATE in elastix 2.5.0 seems to be disabled as default so was not generating hints. so i will try to explain how i got it working to save others with these handsets trawling google for days! I am assuming you want to set up using ENDPOINT config rather than the phones GUI, which is good. Because as said. Mine was setup successfully with out a GUI.

Lets begin by making sure elastix is working with hints… jump into ssh / console and type:
/var/lib/asterisk/bin/freepbx_setting USEDEVSTATE 1
and then
amportal a r
this should force the (now hidden in 2.5.0) USEDEVSTATE to be true and then reload amportal. this will generate our hints.

to check our hints use
asterisk -r

then in asterisk CLI>core show hints
In my case i get this (you wont see any watchers… my setup is already working!):

-= Registered Asterisk Dial Plan Hints =- 100@ext-local : SIP/100&Custom:DND10 State:Idle Watchers 1 *76199@ext-dnd-hints : Custom:DEVDND199 State:Idle Watchers 0 *45100*600@ext-queues : Custom:QUEUE100*600 State:InUse Watchers 1 *740100@ext-cf-hints : Custom:DEVCF100 State:Idle Watchers 0 *46*100*600@ext-queues : qpause:600:Local/100 State:Unavailable Watchers 0 *47*100@ext-queues : Queue:600 State:Unavailable Watchers 0 *45199*600@ext-queues : Custom:QUEUE199*600 State:Idle Watchers 0 *47*100*600@ext-queues : Queue:600 State:Unavailable Watchers 0 *46*100@ext-queues : qpause:600:Local/100 State:Unavailable Watchers 0 1@park-hints : park:1@parkedcalls State:Idle Watchers 0 3@park-hints : park:3@parkedcalls State:Idle Watchers 0 2@park-hints : park:2@parkedcalls State:Idle Watchers 0 *740199@ext-cf-hints : Custom:DEVCF199 State:Idle Watchers 0 *21199@ext-findmefollow : Custom:FOLLOWME199 State:Idle Watchers 0 *85199@park-hints : Custom:PARK199 State:Idle Watchers 0 *76100@ext-dnd-hints : Custom:DEVDND100 State:Idle Watchers 0 199@ext-local : IAX2/199&Custom:DND1 State:Idle Watchers 0 *45*100@ext-queues : Custom:QUEUE100*600 State:InUse Watchers 0 *85100@park-hints : Custom:PARK100 State:Idle Watchers 0 *21100@ext-findmefollow : Custom:FOLLOWME100 State:InUse Watchers 1 *85@park-hints : park:@parkedcalls&pa State:Idle Watchers 0
now ctrl+c will exit Asterisk CLI

Now jump into queues (i’m assuming you have a queue already setup) and look for the box:
Generate Device Hints
Tick this, submit and apply… This will now generate hints for the queues. Follow me will have done this automatically for follow me extensions.

Now for the phone
First things first, you need to get the 5330/5340 into SIP mode Simply power on the handset holding in the * and # keys together and it should start asking you a few questions… Set it to sip mode and off we go.

One of the questions will most likely be TFTP server address (in my case the elastix server is 192.168.1.52)… You will need to put your elastix/freepbx servers address in here. If you dont see that dont worry, you can always enter it later by going to the phones ip in you browser.

Once you have the phone booted in SIP mode, we can start on the config file.

I notice i can’t attach any files to this so i will attach my complete config for the handset as code at the end of the post. You will obviously need to make changes to suit your setup.

This handset is configured for 4 lines using one extension (100) and i have configured a queue (600) and follow me. My extension (100) is a dynamic client for queue (600) for the sake of testing. I will infact later be deleting this and being a static agent, this was just to prove it can be done!

So to get the basic sip registration with voicemail button etc We need to find the SIP user section of the configuration file and edit this to suit our setup. We will also include the BLF codes that we want to use later on the handset like so:

<User State="1" ID="100" DispName="Mike Hayward" Pwd="MikesPassword" AuthName="100" Realm="" RegSvr="192.168.1.52" RegPort="5060" RegScheme="2" ProxySvr="192.168.1.52" ProxyPort="5060" ProxyScheme="2" VMSvr="*[email protected]" VMPort="5060" VMScheme="2" OutSvr="192.168.1.52" OutPort="5060" OutCtr="0" Ring="1" Line="0" EventSvr="" EventPort="5060" EventScheme="2" BlfGroup="100,*21100,*45100*600"></User>

Now that the user is setup. to get BLF working we will need to edit the Keys on the handset. If you google a mitel document called DK115611_16.xls you will get a detailed description of what keys correspond to what on screen.

Now the 2 BLF keys i want to create will be numbers 33 and 34 so i will add the Follow me toggle to 33 and Queue log in / out toggle on 34 like so:

<Key Line="33" Fea="27" Des="Follow Me" Addr="*21100" Mode="1" UserID="*21100"></Key> <Key Line="34" Fea="27" Des="Main Queue" Addr="*45100*600" Mode="1" UserID="*45100*600"></Key>
note follow me is *21<extension> and queue toggle is *45<extension>*<queue>

The stuff above is just changes you will need to make to the overall config file i post at the end of this… I have done it this way round for those of you who got the Mitels Working, but couldn’t get BLF to function as it should!

Now… For those of you who couldn’t get the phone to work at all… You will need to jump to the bottom of this post and copy / paste my entire config changing the bits that suit you (if you have the 5340 just change the to or depending on your phone model) You will need to save this file as MN_<mac_address>.cfg (my phones config file is called MN_08000F597558.cfg)

Now you need to download an SFTP client to your PC and place this new config file in the /tftpboot/ directory in the root of your elastix box. (i use Win SCP, its free and portable).

You should now be able to simply browse to your phones IP address (or use the phones configuration setup by doing power on holding # * &) and point it at your elastix box’s TFTP server.

If you know the phones ip address just browse to the phones ip in you browserand put the tftp server address in the little box that comes up.

Right… Now here’s my phones current config:

<Parameter Model="5330">
   <pkDescription>
      <Key Line="25" Fea="6" Des="Line 1" Addr="" Mode="1" UserID="100"></Key>
      <Key Line="26" Fea="7" Des="Line 2" Addr="" Mode="1" UserID="100"></Key>
      <Key Line="27" Fea="8" Des="Line 3" Addr="" Mode="1" UserID="100"></Key>
      <Key Line="28" Fea="9" Des="Line 4" Addr="" Mode="1" UserID="100"></Key>
      <Key Line="29" Fea="2" Des="Call logs" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="30" Fea="19" Des="Weather" Addr="http://open.live.bbc.co.uk/weather/feeds/en/2640194/3dayforecast.rss" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="31" Fea="15" Des="Phone Book" Addr="" Mode="1" UserID=""></Key>
      <Key Line="32" Fea="1" Des="Corrine" Addr="########" Mode="1" UserID=""></Key>
      <Key Line="33" Fea="27" Des="Follow Me" Addr="*21100" Mode="1" UserID="*21100"></Key>
      <Key Line="34" Fea="27" Des="Main Queue" Addr="*45100*600" Mode="1" UserID="*45100*600"></Key>
      <Key Line="35" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="36" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="37" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="38" Fea="3" Des="Advisory            " Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="39" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="40" Fea="0" Des="" Addr="" Mode="1" UserID=""></Key>
      <Key Line="41" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="42" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="43" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="44" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="45" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="46" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="47" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="48" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="49" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="50" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="51" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="52" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="53" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="54" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="55" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="56" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="57" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="58" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="59" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="60" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="61" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="62" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="63" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="64" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="65" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="66" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="67" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="68" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="69" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="70" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="71" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
      <Key Line="72" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
   </pkDescription>
   <user_list>
      <User State="1" ID="100" DispName="Mike Hayward" Pwd="MYPASSWORD" AuthName="100" Realm="" RegSvr="192.168.1.52" RegPort="5060" RegScheme="2" ProxySvr="192.168.1.52" ProxyPort="5060" ProxyScheme="2" VMSvr="*[email protected]" VMPort="5060" VMScheme="2" OutSvr="192.168.1.52" OutPort="5060" OutCtr="0" Ring="1" Line="0" EventSvr="" EventPort="5060" EventScheme="2" BlfGroup="100,*21100,*45100*600"></User>
   </user_list>
<register_expire>7200</register_expire>
<rss_feed>http://feeds.bbci.co.uk/news/rss.xml#</rss_feed>
<time_zone>0</time_zone>
   <beep_on_hold>1</beep_on_hold>
   <on_hold_alert>60</on_hold_alert>
   <tftp>192.168.1.52</tftp>
   <downloadtype>1</downloadtype>
   <cw_tone>1</cw_tone>
   <missedcallsctl>0</missedcallsctl>
   <callforwardctl>1</callforwardctl>
   <lcdbacklightctl>1</lcdbacklightctl>
   <time_format>0</time_format>
   <voicemail_key>*97</voicemail_key>
   <htmlpuseraccess>1</htmlpuseraccess>
   <pbName1>Mikes Mobile</pbName1>
   <pbaddr1>######</pbaddr1>
   <pbName2>Corrines Mobile</pbName2>
   <pbaddr2>###########</pbaddr2>
   <pbName3></pbName3>
   <pbaddr3></pbaddr3>
   <pbName4></pbName4>
   <pbaddr4></pbaddr4>
   <pbName5></pbName5>
   <pbaddr5></pbaddr5>
   <pbName6></pbName6>
   <pbaddr6></pbaddr6>
   <pbName7></pbName7>
   <pbaddr7></pbaddr7>
   <pbName8></pbName8>
   <pbaddr8></pbaddr8>
   <pbName9></pbName9>
   <pbaddr9></pbaddr9>
   <pbName10></pbName10>
   <pbaddr10></pbaddr10>
   <pbName11></pbName11>
   <pbaddr11></pbaddr11>
   <pbName12></pbName12>
   <pbaddr12></pbaddr12>
   <pbName13></pbName13>
   <pbaddr13></pbaddr13>
   <pbName14></pbName14>
   <pbaddr14></pbaddr14>
   <pbName15></pbName15>
   <pbaddr15></pbaddr15>
   <pbName16></pbName16>
   <pbaddr16></pbaddr16>
   <pbName17></pbName17>
   <pbaddr17></pbaddr17>
   <pbName18></pbName18>
   <pbaddr18></pbaddr18>
   <pbName19></pbName19>
   <pbaddr19></pbaddr19>
   <pbName20></pbName20>
   <pbaddr20></pbaddr20>
   <pbName21></pbName21>
   <pbaddr21></pbaddr21>
   <pbName22></pbName22>
   <pbaddr22></pbaddr22>
   <pbName23></pbName23>
   <pbaddr23></pbaddr23>
   <pbName24></pbName24>
   <pbaddr24></pbaddr24>
   <pbName25></pbName25>
   <pbaddr25></pbaddr25>
   <pbName26></pbName26>
   <pbaddr26></pbaddr26>
   <pbName27></pbName27>
   <pbaddr27></pbaddr27>
   <pbName28></pbName28>
   <pbaddr28></pbaddr28>
   <pbName29></pbName29>
   <pbaddr29></pbaddr29>
   <pbName30></pbName30>
   <pbaddr30></pbaddr30>
   <pbName31></pbName31>
   <pbaddr31></pbaddr31>
   <pbName32></pbName32>
   <pbaddr32></pbaddr32>
   <pbName33></pbName33>
   <pbaddr33></pbaddr33>
   <pbName34></pbName34>
   <pbaddr34></pbaddr34>
   <pbName35></pbName35>
   <pbaddr35></pbaddr35>
   <pbName36></pbName36>
   <pbaddr36></pbaddr36>
   <pbName37></pbName37>
   <pbaddr37></pbaddr37>
   <pbName38></pbName38>
   <pbaddr38></pbaddr38>
   <pbName39></pbName39>
   <pbaddr39></pbaddr39>
   <pbName40></pbName40>
   <pbaddr40></pbaddr40>
   <pbName41></pbName41>
   <pbaddr41></pbaddr41>
   <pbName42></pbName42>
   <pbaddr42></pbaddr42>
   <pbName43></pbName43>
   <pbaddr43></pbaddr43>
   <pbName44></pbName44>
   <pbaddr44></pbaddr44>
   <pbName45></pbName45>
   <pbaddr45></pbaddr45>
   <pbName46></pbName46>
   <pbaddr46></pbaddr46>
   <pbName47></pbName47>
   <pbaddr47></pbaddr47>
   <pbName48></pbName48>
   <pbaddr48></pbaddr48>
   <pbName49></pbName49>
   <pbaddr49></pbaddr49>
   <pbName50></pbName50>
   <pbaddr50></pbaddr50>
   <pbName51></pbName51>
   <pbaddr51></pbaddr51>
   <pbName52></pbName52>
   <pbaddr52></pbaddr52>
   <pbName53></pbName53>
   <pbaddr53></pbaddr53>
   <pbName54></pbName54>
   <pbaddr54></pbaddr54>
   <pbName55></pbName55>
   <pbaddr55></pbaddr55>
   <pbName56></pbName56>
   <pbaddr56></pbaddr56>
   <pbName57></pbName57>
   <pbaddr57></pbaddr57>
   <pbName58></pbName58>
   <pbaddr58></pbaddr58>
   <pbName59></pbName59>
   <pbaddr59></pbaddr59>
   <pbName60></pbName60>
   <pbaddr60></pbaddr60>

</Parameter>

I hope this basic little guide Serves you well and saves days of googling things like MITEL BLF and BLF NOT WORKING MITEL etc etc!!!

I know it’s not a fully comprehensive guide, and sorry if i’m teaching some of you to suck eggs. I am just aware that Elastix has a wide range of skill levels.

if you have any enhancements, improvements or helpful links which might improve this bit some more, please do!

Thanks :slight_smile:

Mike

1 Like

Thanks for this post
I’m trying to connect Mitel 5320 to FreePBX and you really helped me.

One quick question, what Mitel firmware your using on your phones ?

Thanks

Hi. Glad I could help.

I’m using a BT branded (Quantum II) Mitel, with mitel IP5330_40_1.6.0.13 firmware installed.
There is no web GUI on mine so that’s why it was all done config based.

The BLF works fine, exept it doesn’t flash on ringing for other extensions…. This appears to just be that Mitel Doesn’t support all the SIP Device states in this version.

I don’t have the handset on my right now, it’s installed in a clients server room. I have upgraded my own handsets to grandstream GXP2160’s that just work out of the box!! :slight_smile:

I do still have access to the handset though if needed, just not immediately :slight_smile:

If I can help any more please let me know :slight_smile:

Thanks…

Mike

Hi I am using an asterisk based PBX appliance Grandstream that is pretty good. I have several Mitel 53xx phones that I want to use in SIP mode. The problem is that I cannot use the Mitel GUI as it does not fully load. I need to input the SIP password ID and extension nbr for the phone to register so I think your solution is the only way. I also need to identify the basic key functions.

My question is where did you find the generic script data and how to program each field

thanks

2017 and I got 5330 and 5340 working on Grandstream Asterisk PBX using your notes :wink: Thanks for sharing

But do they randomly reboot? I have many 5340’s working on FreePBX but they reboot even during an active call. It’s driving me crazy.