• Asterisk and Mitel 5340 myth Demystified

    by  • November 12, 2008 • Cool Stuff • 12 Comments

    We have our pbx in a flash server (Asterisk) running with a bunch of softphones (because they’re free), and it works great but what is a sip based pbx if you can’t use it with a real sip based hard phone?

    With that said all we had available to us were a bunch of Mitel dual mode 5340 phones sitting on our desk running the Minet protocol. We figured why not take advantage of the fact that we had some really cool sip based phones at our disposal. And that’s just what we did, we got the 5340 phone working with our asterisk server. (really cool stuff)

    Now your probably wondering how we did it? Well in searching for answers across the internet we found very little information, but lucky for you we figured it out. We know knowledge transfer is one of our civic duties, so sit back and let us show you how to get your mitel phones working on your Asterisk system.

    Disclaimer: Unfortunantely we were only able to test this on the Mitel 5340 model phone running firmware version R7.0.01.02.01.08 but we believe this will run for most of the newer model phones running version 7.0 and up.

    Step 1.

    Setup your dhcp server (we used a microsoft dhcp server but you can use whatever you like) with the following options

    Typical DHCP Options

    Option 003 Router – IP address of your default gateway

    Option 006 DNS Servers – IP address of your dns servers

    Mitel Dependent Options

    Option 042 NTP Servers – ip address of your ntp servers

    Option 066 Boot Server Host name – ip address of your asterisk server

    Option 128 Asterisk Tftp server – ip address of your asterisk server or wherever your hosting tftp files.

    Option 138 Mitel Sip ID – 200

    After you’ve completed your dhcp settings its on to learning a bit about configuring the mitel 5340 phones.

    For those of you that aren’t using dhcp and want to set static values for your phone all you have to do is hold down on the super key (the blue key on the Mitel 5340) while your phone is powering up. Make sure you follow the onscreen prompts and don’t forget to add your proxy (asterisk) server and the tftp server. Without these your phone will never register.

    Step 2.

    In order to change the Mitel 5340 to use sip you have to hold down the * 7 (that would be the star and number 7 keys at the same time) while the phone is powering on. Hold down on those two keys until the change is confirmed.

    Now reboot it to confirm that it is in sip mode. You can either do this by holding down the *7 keys and wait for the message that says “already in sip mode” or wait until the phone boots and says “Starting Sip…”

    Once you’ve confirmed its running in sip mode all you technically need is a user that is setup on your asterisk server. Just enter your user id when the phone prompts you to login. Here’s the not so nice part about it, because Mitel doesn’t allow you to enter the password for the extension or user that you have setup your phone will never register properly. Lucky for you there is an easy fix, all you need to do is log into the web admin interface of the phone. Type in the ip address of the phone in any standard browser and enter “admin” as the username and “5340” as the password. (This can be changed at anytime through the browser or your config file) Click on “Users and Passcodes” and change the passcode there. Now click on “Registration” and hit Re-register. You should now see your phone registered to the asterisk server and be able to make and receive calls on it.

    Simple right!!

    Now on to the even cooler stuff. Its up to you at this point if you want to go any further. The next section will tell you how to setup config files and firmware so you can deploy multiple phones all at the same time.

    Unfortunately we cannot download firmware from Mitel’s site because we are not a partner so unless you are a Mitel partner you’ll have to use the existing firmware on your phone.

    If you plan on upgrading phones and applying configurations to individual phones you’ll need to upload the firmware and create the individual config files for your phones to use.

    Mitel config files are pretty cool in that they are easy to use and understand because of the xml based structure.

    Step 3.

    Here are the files that you will need create or just download from here:

    Download “MC_(Mac_Address).cfg.zip” MN_Mac_Address.cfg_.zip – Downloaded 733 times – 508 B

    Download “MN_(User).cfg.zip” MN_User.cfg_.zip – Downloaded 571 times – 494 B

    Download “MN_Generic.cfg.zip” MN_Generic.cfg_.zip – Downloaded 620 times – 483 B

    Complete xml config file example: 

    Download “Sample_Complete_MN_Generic.cfg.zip” Sample_Complete_MN_Generic.cfg_.zip – Downloaded 657 times – 3 KB

    Note: The phone will boot and look for those configuration files in that exact order.

    We found that a good base to start with is configure a complete NM_Generic.cfg file that will allow to setup and configure all of the buttons, and all the necessary options to get the phone up and running. Then create a MN_<Mac Address>.cfg file for each individual phone that will contain all display name and line information.

    And thats all there is to it. You should be on your way to rolling out hundreds of mitel phones on your asterisk system in no time.

    About

    12 Responses to Asterisk and Mitel 5340 myth Demystified

    1. Dan Marshall
      September 30, 2010 at 3:18 PM

      Hi Guys,

      Good write up. I have aquired a NOS Mitel 5330 and wish to use it in a SIP mode for my home buisness lines. Unfortunately I can’t get it too boot into SIP mode, think it is due to old firmware? 01.01.00.09!!

      Any chance you have firmware files for the 53XX seris or can pull one from a phone you have?

      Seems a shame to waste such a well put together piece of kit!

      ATB

      • admin
        October 4, 2010 at 3:20 PM

        You should be able to boot it into sip mode the same way. The 5330 and 5340 are nearly identical and both support sip. Do you get anything when you try to hold down on the key combination when the phone is powering up? Try looking for a menu item called “Protocol”. If you do see that select it and see if it gives you the option to select SIP.

    2. kenny
      November 2, 2010 at 5:52 PM

      I have Mitel 5220 and 5224 phones and they work for a while and if left idle for some set time, incoming calls do not make it to the phone. But outgoing calls from the phone works just fine. The error message is that the “user is not available to take the call, please leave a message”.
      did you experince that?

      • admin
        November 26, 2010 at 11:08 AM

        I can’t say I have ever experienced this issue. So I’m assuming you are using an asterisk box and you have this issue?

    3. Dan Marshall
      November 24, 2010 at 5:42 PM

      Yeah it boots into the config menu’s but at the Protocol level there is only *one* option and that is MiNET!! I have obtained the SIP firmwares for the phone but am really struggling on updating the phone without a 3300cx, how and what did you use to set-up your dhcp and tftp? I managed to get a dhcp running on ubuntu live usb but struggled with the tftp, a windows solution would be easier for me to do the updates.

      • admin
        November 26, 2010 at 11:11 AM

        You can use a windows server to setup a dhcp server and you can download any free tftp server software and use it on the same machine. As for dhcp, I was running a windows server 2003 with dhcp, and the tftp server was tftp desktop.

        If you cant access a windows server 2003 box you can install http://www.softcab.com/dhcp-server/index.php on a windows xp/07 box.

    4. February 14, 2011 at 6:01 PM

      Nice article, but this won’t appear to be compatible with my router ip address, any ideas?

    5. March 8, 2011 at 12:41 AM

      I really find this a interesting subject. Never looked over this subject in this manner. If you are going to write some more articles relating to this subject, I definitely will be back in the near future!

    6. August 7, 2011 at 9:28 PM

      This is really interesting, You are a very skilled blogger. I’ve joined your feed and look forward to seeking more of your great post. Also, I’ve shared your web site in my social networks!

    7. Paul
      August 25, 2011 at 9:18 PM

      Getting an:
      “Assertion Failed” sip_apps_tsp.cpp@1380 “Unsupported set type in call to TSP_GetLampInfo”==0

      With a 5320 in SIP mode.

      Any ideas?

    8. June 14, 2012 at 11:58 PM

      Thank You for the tips on getting the Mitel Phones to reg to an Asterisk server. I am curious how I can program the Voice Mail key to dial *97 for voicemail. I don’t see that in the config files. Thanks.

      Defraz

    9. Martin
      February 27, 2013 at 5:06 PM

      UNFORTUNATELY, there does not seem to be a web GUI for the 5340 only a TFTP upload ability, the mitel 5212, 5224, and 5235’s are soooooooooooooo simple to configure because you can log into their web user interface !! I have searched for hours and hours on how to do it with the 5340 but to no avail ! SO at the point where you say simply log on to the web interface ! i get stuck ! any further information would be GREATLY appreciated 🙂

    Leave a Reply