Ticket #1939 (closed Patches: fixed)

Opened 6 years ago

Last modified 5 years ago

patch to enable paging/intercom on Mitel phones

Reported by: p_lindheimer Assigned to:
Priority: minor Milestone: 2.4
Component: Paging & Intercom Version: SVN-HEAD
Keywords: Mitel Cc:
Confirmation: Confirmed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

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/functions.inc.php. 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.

--- functions.inc.php 2006-12-07 22:19:25.000000000 -0800
+++ /var/www/html/admin/modules/paging/functions.inc.php  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: <sip:broadworks.net>\;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: <sip:broadworks.net>\;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'));

Change History

06/09/07 05:44:18 changed by p_lindheimer

  • version changed from 2.2.1 to 2.3-branch.

10/27/07 22:50:39 changed by p_lindheimer

  • confirmation set to Confirmed.

Updated patch for 2.3:

--- functions.inc.php 2007-10-27 19:46:11.000000000 -0700
+++ mitel.functions.inc.php 2007-10-27 19:52:03.000000000 -0700
@@ -26,7 +26,7 @@
        $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('dialnumber', '${EXTEN:'.strlen($code).'}'));
        $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: <sip:broadworks.net>\;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'));
        $ext->add('ext-intercom', '_'.$code.'.', '', new ext_macro('user-callerid'));
@@ -104,7 +104,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_sipaddheader('Call-Info','\;answer-after=0'));
+         $ext->add('ext-paging', "PAGE${xtn}", '', new ext_sipaddheader('Call-Info','<sip:broadworks.net>\;answer-after=0'));
          $ext->add('ext-paging', "PAGE${xtn}", '', new ext_alertinfo('Ring Answer'));
          $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__SIP_URI_OPTIONS', 'intercom=true'));
        }

11/13/07 15:42:06 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

added Mitel detection and support to 2.4 version of paging

11/13/07 15:43:02 changed by p_lindheimer

  • version changed from 2.3-branch to SVN-HEAD.
  • milestone changed from 2.3 to 2.4.

06/06/08 13:50:17 changed by p_lindheimer

r5770 - will be out next time published, this should have been done when this ticket was closed.