Friday, February 8, 2019

MITEL 6940 6930 and 6920 handsets on asterisk

As of the time of writing (2019), there wasn't alot of information about these phones running SIP mode, specifically working with an Asterisk pbx system.  

 Hopefully the information I've gathered will be of help to you.


To work with a SIP server, such as asterisk, these phones need to be running the MITEL "SIP". firmware (not the Mitel MIvoice firmware )

UPDATE:
Commentor WhiteLionWeb provided a link with the SIP firmware for the 6940/30/20 handsets on DropBox or alternatively Google drive.

Update: Dec 2023
Mitel has put some SIP files into open source.
6900 Series
6800 Series
6700 Series

NOTE:
As of this writing, I have only made this to work with SIP, not "PJSIP".  So alter your ports to reflect SIP ports for your configuration situation.  I'm using default 5060.

NOTE:

When attempting to register these phones, the registration would occur, but would immediately de-registered.  Outbound calls with the phone worked, but inbound would not. (all circuits busy/voicemail)

As a work around, in the extension menu in the FreePBX gui I changed "HOST" from dynamic and hardcoded the LAN IP of the Mitel phone.  

Bam! Registered.  Calls in and out, proper caller ID, voicemail, queues, multiple lines.

Steps to make it work

Step 1
Convert phone from MiNET to SIP
(
SKIP to step 2 if you are already on SIP firmware installed).  You can tell, if your phone, when you go into "ADVANCED" mode uses 73738, its the miVOICE firmware.  If its 22222 then its SIP firmware.

Setup your TFTP server.  I'm using TFTPD64 on windows, but most any TFTP server should work.
Put in the 69XX.ST file into the folder assigned by your TFTPD app.

Boot the phone up.  
As its booting up, press the "GEAR" icon in the lower left part of the phone keypad.

On the main screen I hit the config button (its the picture of a gear on the phones physical buttons)

Pressed ADVANCED
Then entered the password which is 73738  If this doesn't work and the password 22222 does, then you have the SIP firmware already.

Swiped over to RESTORE DEFAULTS and set the phone to factory default option.  Phone reboots


It will come up and ask you how you want to configure your phone.  Select "Manual Upgrade"

Enter in your TFTP server IP and port and save.



Phone should reboot, and provided you have TFTP configured correctly it should get the file automatically and apply it


Once the firmware is done, you'll see the following screen.  The default screen (can take 5 minutes or so for the process to complete)



Step 2
Factory reset the phone config 

Skip this step if you are working on a fresh firmware install.

You can get to these phones by HTTP to their IP and then using the default user/pass of admin/22222
That is the default credentials anyway

Factory reset the phone.  You can do this step if you aren't sure if the config is default.  This might be if you have existing SIP info on here already (you didn't need to apply a firmware update)

Once you've done this, it will ask you to do a restart.

Step 3
Login into the phone (SIP firmware installed)

Log in to the phone GUI 

You can get to these phones by HTTP to their IP and then using the default user/pass of admin/22222
That is the default credentials anyway

and your phone will look something like this:


Step 4 (Configure the SIP info in the phone)

Go into LINE 1 of the configuration

What is circled is what I messed with.  1000 is my extension, so I filled it in there.
Then I put the password in.  This password is the one FreePBX gui generated for me in my asterisk deployment.

I filled in the primary servers and the port and I pressed SAVE SETTINGS
For those using asterisk with PJSIP and SIP mixture, it still works, just set your extension as a SIP extension in asterisk and use the SIP port configured for your asterisk system.  
In my pbx, PJSIP used 5060, and SIP used 5061, so all my configs reflect 5061 for the port.

In this example, the phone is connecting from a remote home location to an PBX via the internet.  The PBX is listening on SIP 5061.


Step 5 (Configure Asterisk)

Bring up the configuration for your SIP extension

HOST = IP of the phone your are registering (or the WAN side IP of the home users router if remote.

Changed TYPE to "PEER" 


These are the only changes needed.  

Save, apply and test your configuration

I hope this helps.  If you figure out some improved deployment methods please share!  As I test the deployments further and become more knowledgeable about these phones I'll share it here.


Phone below registered to "ISSABEL" Contact Center PBX distribution and part of the queue



51 comments:

  1. Hello. We are using Aastra Sip Phones on internal asterisk PBX. We are very happy. One of our customers liked our setup but as Aastra was acquired by Mitel we proposed Mitel phonesets and the customer selected the 6940. We purchased them from a distributor and we tried to install them on an asterisk box. No luck, the documentation is unclear about SIP support that we believed still be open but indeed the 6940 is delivered with MiVoice firmware. We contacted Mitel, we contacted Mitel partners, we were ready to pay to get the firmware for using open SIP, months of discussion, we never got it and the distributor is refusing to restock the phones even if only one box was opened. Result : several 6940 brand-new in their box … not usable at all. Can you please share the firmware you are using ? we will not sell these phones but at least try to used them internally and replace some very old Aastra where LCD display is dying. Thanks a lot in advance. Marc

    ReplyDelete
  2. "6940.st" linked in the description in the document.

    ReplyDelete
  3. Can you provide the SIP firmware for 6930 please?

    ReplyDelete
    Replies
    1. Unfortunately, that was all the firmware I was ever provided.

      Delete
    2. I've updated the blogpost about these phones with newer firmware provided to me that issues say work better.

      Delete
  4. Hello, I'm trying to do the same with a 6940 here, I have successfully installed the firmware you have provided and reset it to defaults (through the screen of the phone) but this phone doesn't seem to have a web interface and when I browse to it's IP address I get the error "connection refused". I don't know if it's relevant, but upon boot up, the phone prompts for a MiVoice Gateway IP address. Have you seen this before?

    ReplyDelete
    Replies
    1. Ok so I've had some luck. I did a port scan on the phone and found a web interface running on port 8080 and with the login root/73738 I was able to login and then it became apparent that it was still running the MiVoice firmware and had not upgraded as I thought. On the first run of attempting the firmware upgrade earlier, it grabbed the file (TFTP logs confirmed this) and it had the progress bar to say it was installing it, then rebooted at the end but it seemed it had not installed after all. These are the versions reported on the web interface:
      ota_BCM911107_MINET_6940_voice_v6_5_jffs2.bin
      Mon Aug 20 00:44:39 2018
      Firmware Version: 01.04.00.074

      My only thought is, I wonder whether the current MiVoice firmware could be newer than the SIP firmware in your guide and maybe it hadn't upgraded for that reason?

      These are my TFTP logs for subsequent reboots ("no upgrade required"):
      Connection received from 192.168.100.232 on port 43676 [05/02 12:56:32.281]
      Read request for file . Mode octet [05/02 12:56:32.281]
      File : error 2 in system call CreateFile The system cannot find the file specified. [05/02 12:56:32.281]
      Connection received from 192.168.100.232 on port 53383 [05/02 12:56:33.293]
      Read request for file . Mode octet [05/02 12:56:33.293]
      File : error 2 in system call CreateFile The system cannot find the file specified. [05/02 12:56:33.293]
      Connection received from 192.168.100.232 on port 47912 [05/02 12:56:33.309]
      Read request for file . Mode octet [05/02 12:56:33.310]
      File : error 2 in system call CreateFile The system cannot find the file specified. [05/02 12:56:33.310]
      Connection received from 192.168.100.232 on port 52591 [05/02 12:56:33.330]
      Read request for file <6940.st>. Mode octet [05/02 12:56:33.330]
      Using local port 51252 [05/02 12:56:33.331]
      Peer returns ERROR -> aborting transfer [05/02 12:56:33.412]

      Delete
    2. Sorry the site seems to have stripped some of that last line, it should read:
      Peer returns ERROR (No Upgrade Required) -> aborting transfer [05/02 12:56:33.412]

      Delete
    3. Did you make any headway on your upgrade?

      Delete
    4. Unfortunately not, I've tried contacting a few Mitel partners as well to try and obtain a new release of the firmware but none of those will respond to me anyway.

      For better or worse, I have also purchased another handset from the same seller who had them cheap so I will try upgrading another one and see how it goes

      Delete
    5. I'll grab a phone this week and go through the motions again to see if I can recreate the scenario you are having.

      Delete
    6. Hi again thanks for following up, I tried again with the second phone that I've got and had the same result, however I have tried using the firmware provided by WhiteLionWeb in the comments below which installed successfully now so it seems that the firmware you had previously uploaded has an issue with my handsets (I wonder if mine are a different hardware revision or something? I don't know their origin)

      Delete
    7. In case this helps future viewers, I had a phone that was stuck on the latest MINET firmware (version 5 ish) and wouldn't let me upgrade. It provided no real prompt for a TFTP server. What I did to get around this, was create a DHCP server that I could create "SCOPE OPTIONS" and set "Option 66" with my TFTP server IP address.
      When the phone booted, and got a DHCP address, the TFTP options were then provided to the phone. It then reached into my TFTP server (TFPTD64 on Windows) and downloaded the 69XX.st firmware file and it got to SIP.

      Delete
  5. i have the firmware for the 6930 and 6920, will upload for your self.

    any way that these would work external? as for the end point surely they would go to the external IP of the phone and then port fowarded in the router? which is something i would rather try avoid

    ReplyDelete
    Replies
    1. I'll test the nuances of trying to make it work external. My solution in this post wasn't ideal, it worked around the problems I had trying to get these to register. I'm guessing that if I knew the phones WAN side IP (assuming user worked from home) it would work. But these can change a lot (ISP dependent) and might be challenging to keep running.

      Delete
    2. I had the exact same issue, i tried with without issabel, and i have manged to get it working, just not external, not sure if its going to end up being a VPN sort of thing. i dont know.

      Delete
    3. With mine I'm trying to use them with an external service, from yay.com who host our work phones but it only works so far for outgoing calls and doesn't show as registered either on the phone, or on the yay.com dashboard. If it helps with diagnosis, the error shown on mine is 606 which corresponds to "606 Not Acceptable
      The user's agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable."

      I have emailed my provider to see if they can see anything server-side which may be helpful.

      When you say about using the WAN IP, is this a setting in the phone itself that needs changing or on the PBX side? We use all static IPs for WAN and LAN in our place, and I could even assign a WAN IP directly to the phone although I'm guessing that wouldn't be a great idea for security

      Delete
    4. You might not be able to do it because your PBX is hosted (at least in the solution I cobbled together). I'm the PBX admin so I have root level access to the pbx configuration and was able to do it.

      Delete
    5. I have root level acess to our server, but the main thing i would need is incomming, not outgoing :/

      Delete
    6. UPDATE: Works over WAN on my testing. I upgraded some notes on the post. I have a 6940 working at home office. The same procedure works, I put my WAN side IP of my home router into the config in Asterisk. DynamicDNS name works as well. So far the testing seems solid. Calls in and out and stable.

      Delete
    7. No extra port fowarding needed?

      Delete
    8. Nope. Shouldn't (usually) need to port forward anything. At least in my experience its really rare, with asterisk anyway. When the phone establishes a connection, the users local firewall will pass the connection to the asterisk server, the asterisk box checks the phone every 60 seconds, keeps the port the firewall open. Thats my experience anyway.

      Delete
    9. Thanks for your persistence in trying to get these working well :)

      I'm still playing with mine, I've setup a syslog server to catch the logs from the phone (as the links to log files in the web interface didn't seem functional), here's my log of a reboot, we can see that when it tries to register it shows the message "REGISTER BLOCKED", but I'm unsure if this is coming from the phone side or the provider side. Logs: https://pastebin.com/ycrz0mZd

      I'm speaking to our provider and they're generally very helpful so I'll post any updates on here

      Delete
  6. https://www.dropbox.com/s/14vdwylvui06cdz/5.1.0.3069.zip?dl=0

    is the link should anyone else need the firmware, this includes the 6920, 6930 and 6940 fimrware files

    ReplyDelete
    Replies
    1. Thanks so much for providing this I really appreciate it. The firmware installed fine to my phone with your copy :)

      Delete
    2. Yes thanks for posting this. Honestly I'm not sure the difference at this time. My files came directly from Mitel rep, and worked on phones received from the same rep but perhaps my files are old. Is it ok if I include your DB URL on my page WhiteLionWeb?

      Delete
    3. Mine was from a mitel rep, managed to buy the phones from someone who kept EVERY file he used with them. thank god they are the SIP firmware and not MiNet.

      Delete
  7. Here is a link to the latest SIP firmware: http://upgrade01.sky.shoretel.com/phones/5.2.1.2120/6940.st

    ReplyDelete
    Replies
    1. Thanks for sharing this, every bit of firmware helps!

      Delete
    2. There is something interesting with this firmware... When the phone boots up, it will deply a pre- defined configuration. During boot you need to skip this auto deploy procedure and if you do that you have more settings in the config- screen! These settings are needed to make it work! A reboot without skipping this auto- deploy will destroy your config and telephone will not register. Until now it isn't clear for me how to delete the auto- deploy part. It seems it comes from a file called Aastra.cfg or something but i need to find out where it is located and if it could be deleted...

      Delete
    3. That's an interesting observation, I didn't notice that with my one. Do you have a picture of the screen at all? And once skipped does it register correctly with a non-Mitel sip server?

      Delete
    4. Here is a PDF with screenshots and description:
      https://www.flightillusion.com/wp-content/uploads/2021/05/Mitel-6940.pdf

      Delete
  8. And also, does that need skipping upon every reboot or just the first one following a factory reset?

    ReplyDelete
  9. Nope... When the phone reboots without skipping the auto provisioning the phone is "corrupt" and reset to factory defaults is necessary, followed by a reboot WITH skipping the auto provisioning and. configure it again :-(

    ReplyDelete
    Replies
    1. That's strange, it's as if there is some sort of provider config file within your firmware that is triggering it, or maybe a zero-touch provisioning option. I'm currently using the firmware linked in the main post above and I can see both pages of settings and it doesn't present the Skip option shown in your screenshots. I notice that with Kevin's firmware above, the URL appears to relate to the provider called Sky so I wonder if that may introduce the provisioning step that you mention (I haven't tried that version of firmware yet).

      Sadly, I still didn't get mine working with my cloud-hosted provider yay.com, I ran out of time to play with it but some day I hope it will be possible as I really like these handsets

      Delete
  10. I use the phone in combination with a Fritzbox moden wich have their build- in SIP server. During next week i got a 2nd 6940 device and i will try it with yaw.com before i install it on my Fritzbox. I will post the results here. Maybe i will skip the Fritzbox SIP server and install a asterisk on a raspberry for my environment. This will give me more functionality…

    ReplyDelete
  11. I have been working with Both Mitel and Aastra phones for many years (since about 2005 for aastra and since 99 for Mitel). the mitel 68xx series phones are their Open platform phones.. they bought out Aastra a few years back thus why tyou may find 68xx phones marked as Aastra or Mitel, I have been deploying 67xx and 68xx series sets for years.. the 69xx phones run a very similar version of firmware but these are not "open" sets.. their configuration files are the same as are the features.. however since versiuon 5.x these phones are designed even in SIP mode yo only work with a MiVoice server. the reason you see them go registered and then unregistered in Asterisk is because asterisk doesnt not reply with the correct Header in it's 200 OK message for the phone to operate, so the phone unregisters from asterisk.. when you get them working on asterisk with an IP in host= it is because you arent registering the phone at all.. asterisk is treating it as a static host and the phone can be set to not register at all.. its not necessary. these phones have several configuration methods.. when you boot them up they look for 'option 66' from DHCP which can be set up to tell the phones where to get their provision files.. the phone will first try to acquire aastra.cfg and / or startup.cfg and then will try to acquire mac.cfg where mac is the MAC address of the phone. if you make a config file with the directive 'upgrade file name: 6940i.st' the phone will download that file from your TFTP server, optionally your option 66 can specify an Http server to download the firmware. im Guessing Mitel will eventually patch them so that the static config hack will no longer work.. they have patched many "loopholes" in their various phones over the past few years, raised their prices and made devices harder to get.. these are beautiful phones I have written them into my product line to be plug and play but there are many alternative phones out there with very reach features which are not limited to a proprietary server. the latest firmware i have downloaded from mitel (im a partner) is from 5.1.7031, later versions do not function correctly at all in SIP mode. 5.1 will work as i explained above

    ReplyDelete
    Replies
    1. Thanks so much for your detailed explanation, that makes a lot of sense what you're saying. Are there any 68xx series that support the bluetooth handset that the 6940 has? I was quite keen on the bluetooth abilities when I bought these so hopefully there is a reasonably equivalent 68xx version I can swap them with

      Delete
    2. So are you saying even with the SIP firmware, the phone still only wants to work with MiVoice? Or only anything 5.2 or higher fails but 5.1 should work fine?

      I got my 6940 up and running with the SIP software, but trying 2 different external SIP providers I seem to be getting errors regardless, either 408's or 606's, even with authentication, proxy server, and the audio protocols set correctly. All work OK on my older Cisco SIP phone, so I'm wondering if this just plain doesn't work.

      I currently have 5.1.0.3069 firmware which is giving me these errors, about to give up on the thing which is unfortunate as it is really nice hardware.

      Delete
    3. Thanks for this information DJ Santa! Great help!

      Delete
  12. For the next poor soul to arrive here looking to make a 6900 series phone work with generic SIP, there is a way! DJ Santa Lights above is correct in that Mitel restricts SIP registration to their own products, however if you have a means of spoofing the user agent field on your PBX or SBC, you can trick the phones into registering happily. I am using an Anynode SBC, and was able to spoof all SIP messages to use "Mitel-3300-ICP" as the user agent, and this instantly resolved the auto unregistration problem. This was tested on firmware version 5.1 and 6.0 on a Mitel 6940 and firmware version 5.1 on a Mitel 6920. Hope this helps someone somewhere.

    ReplyDelete
    Replies
    1. Great tip thanks for confirming that!

      Delete
    2. this can easily be done in asterisk in sip.conf by using the useragent= parameter in the general section. its a global setting and not per peer, although it wouldnt be hard to write as per peer in asterisk. im not familiar with other call managers as all my work has been in asterisk (and mitel.. we still install a mitel now and then and service a whole bunch of them).. the big caveat with the bluetooth handsets is mixing them up.. Hotel managers want 6940s for their front desk phones on our asterisk based solution but the handsets are easily mixed up at the front desk unless you put stickers or other ID on them.. hanging it up on the wriong base it will still be paired to its original

      Delete
    3. I tried to do it in another PBX that I have here (non-Asterisk) but without success. I set Product-ID to Mitel-3300-ICP, but the Mitel 6940 show SIP error 606. I suspect that reason is that the PBX answer the Register with the field "Server: Mitel-3300-ICP" and not "User-Agent: Mitel-3300-ICP.

      Delete
  13. https://www.mitel.com/open-solutions/

    ReplyDelete
    Replies
    1. Oh, I posted before read this commnet here. The "problem" was solved :)

      Delete
  14. Hello, For some reason on my 6930 in the TFTP server in the logs it keeps telling me that there is an error. "error 2 in system call CreateFile The system cannot find the specified file" Any help??

    ReplyDelete
  15. This post should probably be updated again. There is now "SIP" firmware publicly available from Mitel. You can download the .ST files from https://www.mitel.com/open-solutions/ . I was able to download the 6940.st files for version 6.3.0.1020. It also seems that PJSIP now works, at least as far as my limited testing shows, which is great considering regular SIP has pretty much been completely removed from FreePBX.

    ReplyDelete
  16. Thanks for the posts. I have my 6940 up and running with FreePBX. It works great. I would love to be able to brand the wallpaper and screensaver though. I read that it could be done via a file on the MiVoice server originally. I wonder if that would be the same on a TFTP server?

    ReplyDelete