Getting Paging working with Mitel Phones

Mitel provided some of their phones to the freepbx team. One question of interest was how to get paging/intercom (auto-answer) working. Mitel supports a couple variants for the ‘ring-answer’ behavior. The one that I used is the broadwords compatible mode that uses a slightly different version of the Call-Info header than normally comes with freepbx. Here is a patch that can be applied to /var/www/html/admin/modules/paging/ In a future version of paging, we will either make changes so you can specify this in amportal.conf or better yet, get closer to the improved devices mode that will set the correct options once it knows the phone is a Mitel.

— 2006-12-07 22:19:25.000000000 -0800
+++ /var/www/html/admin/modules/paging/ 2007-05-02 17:41:49.000000000 -0700
@@ -88,7 +88,7 @@
$ext->add(‘ext-paging’, “PAGE${xtn}”, ‘SKIPCHECK’, new ext_noop(‘Seems to be available (state = ${AVAILSTATUS}’));

    if (!$skipheaders) {
  •     $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__SIPADDHEADER', 'Call-Info: \;answer-after=0'));
  •     $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__SIPADDHEADER', 'Call-Info: <>\;answer-after=0'));
        $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__ALERT_INFO', 'Ring Answer'));
        $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__SIP_URI_OPTIONS', 'intercom=true'));

@@ -134,7 +134,7 @@
$ext->add(‘ext-intercom’, ‘’.$code.’.’, ‘’, new ext_dbget(‘user-intercom’,‘AMPUSER/${dialnumber}/intercom’));
$ext->add(‘ext-intercom’, '
’.$code.’.’, ‘’, new ext_gotoif(’$["${user-intercom}" = “disabled” ]’, ‘nointercom’));

  •   $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('__SIPADDHEADER', 'Call-Info: \;answer-after=0'));
  •   $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('__SIPADDHEADER', 'Call-Info: <>\;answer-after=0'));
      $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('__ALERT_INFO', 'Ring Answer'));
      $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('__SIP_URI_OPTIONS', 'intercom=true'));


Thanks for your reply. You are right, its the intercom that causes the problem not the paging group.
However, I having been playing with it a bit today and i was testing the new firmware version (version 7 - not officially released by Mitel yet) and the intercom now also works. Well, it doesn’t lock up the phone anyway. It puts the current call on hold then auto answers the incoming page on line 2. You can then go back to the original call on line 1 again after you have heard the intercom. Probably not ideal - would be better to get a busy or service not available message when you try to intercom with someone who is already on the phone, but it is a whole lot better than a lockup and reboot :slight_smile:
Thanks again

I haven’t checked on the firmware in a while, so they have version 7 out in beta now? Is it available for download somewhere or will I need to contact the Mitel Project Manager to get access? It would be really interesting to see if they have done anything to support any sort of BLF with the new firmware - any insight there?

Version 7 is on the Mitel FTP site ( which someone at Mitel sipinterop kindly gave me a username/password for after i had problems downloading ver5.21 firmware, so you may have to contact Mitel or if not pm me and i can email you or give you my login details.
As for BLF, sadly it would appear not though I have emailed sipinterop to ask them about it. There are no new catergories to choose from when trying to program a key. So the nearest thing to BLF is the “Shared Line” feature which it seems only works with Broadsoft & Sylantro.
Looks like a long wait till version 8 maybe unless someone can create a patch for hints to support broadsoft/sylantro working but I guess this would probably be rather complex. So still no BLF…Sigh

the paging module shoud try to detect if the phone is active and not try to page it unless you have the force page checkbox marked. If it is still paging it - then there could be an issue with the ability of asterisk to detect that the other line is in use. And if the phone has registrations with different servers, then it won’t be able to detect it.

If the issue you are having is a result of intercom - then that is known but has not been addressed yet, the intercom code is currently not checking the status of the phone before trying. The intercom code is really in a beta state, and overall the paging/intercom module is slated for some bigger changes but has not made it up to the top of the list yet to be addressed (thus the reason you had to patch the file for the Mitel vs. something a bit more ‘friendly’)

Thanks for this code. I patched the paging file and now paging and intercom features work. However, i have come accross a problem. If you page an extension that is already on another call (eg line 1), the page is automatically answered (line 2). This leads to having 2 active lines on the handset simultaneously, which it doesn’t like and it locks up then reboots.
Perhaps i didn’t apply the patch correctly? Not sure…Any advice would be appreciated

I’d like to have a look at V7 - mainly because I have a 5220 that hangs during boot just as it strobes the LEDs before going online and I suspect that the SIP firmware is corrupt… I have tried reloading V6 but since it’s already at that version it won’t take it.

Can we arrange a file transfer or just let me know how to contact the right people at Mitel?


I’m assuming FreePBX 2.3 and higher have this feature built-in already, but the Mitel 5212 phones I have aren’t picking up the page.

They’re running R7. firmware

Maybe it’s the firmware? What was tested?


2.4 should work with the Mitel phones, 2.3 would need the patch.

Which models/firmware were tested with this?

User Agents:


On 2.4, you can also add user agent specific header info to be sent to the phones for the common alert-info, call-info and uri header stuff.

It’s missing the “” text in the Call-Info header. Go to this page instead:

Works like a charm! Thanks for your help, Philippe!

It looks like I closed that ticket in error before actually adding the code. The paging module install script should have the following added to it. I’ll go and add it in, so that the next time that module is published this will be addressed:

Index: install.php
--- install.php (revision 5765)
+++ install.php (working copy)
@@ -101,6 +101,8 @@
 $result = $db->query($sql);
 $sql = "INSERT INTO paging_autoanswer (useragent, var, setting) VALUES ('default', 'SIPURI', 'intercom=true')";
 $result = $db->query($sql);
+$sql = "INSERT INTO paging_autoanswer (useragent, var, setting) VALUES ('Mitel', 'CALLINFO', 'Call-Info: <>\\\\;answer-after=0')";
+$result = $db->query($sql);
 // Add dulex field

The way this works is that it will use this value for any sip user agent that starts with Mitel which all of the above ones I posted do, and the default for everything else.


Kevin, I am currently trying to locate the R7 version of the Mitel firmware for a couple of 5220 and 5224 sets I have here. Can you let me know who you spoke with at Mitel’s SIP interop department so I can get a copy of this firmware?