Ticket #2168 (closed Bugs: fixed)

Opened 1 year ago

Last modified 1 year ago

Intercom dysfunctional with 1.4 backend as SIP settings are not inherited.

Reported by: habile Assigned to:
Priority: minor Milestone: 2.3
Component: Paging & Intercom Version: 2.3-branch
Keywords: Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: Asterisk 1.4.x Backend Engine Version: 1.4.9

Description

Need to fix dialparties.agi and paging/functions.inc.php as follows:

Index: dialparties.agi
===================================================================
--- dialparties.agi     (revision 4547)
+++ dialparties.agi     (working copy)
@@ -86,12 +86,19 @@
 $dialopts      = get_var( $AGI, "ARG2" );
 $rgmethod      = get_var( $AGI, "RingGroupMethod" );
 
-$alertinfo = get_var( $AGI, "ALERT_INFO");
+$alertinfo = get_var( $AGI, "ALERT_INFO" );
 if ($alertinfo) {
        debug("Setting Alert-Info:  $alertinfo", 4);
        $AGI->set_alertinfo($alertinfo);
 }
 
+$sippheader = get_var( $AGI, "SIPADDHEADER" );
+if ($sippheader) {
+       $fields = explode(':',$sippheader,2);
+       debug("Setting sipheader ".$fields[0].": ".$fields[1], 4);
+       $AGI->exec_sipaddheader($fields[0], $fields[1]);
+}
+
 $pr_dialstatus = get_var( $AGI, "PR_DIALSTATUS" );
 
 $fmgrp  = get_var( $AGI, "FMGRP" ); 

and

Index: functions.inc.php
===================================================================
--- functions.inc.php   (revision 4522)
+++ functions.inc.php   (working copy)
@@ -131,15 +131,16 @@
                        $code = $fcc->getCodeActive();
                        unset($fcc);
 
+                       // Since these are going down channel local, set ALERT_INFO and SIPADDHEADER which will be set in dialparties.agi
+                       // no point in even setting the headers here they will get lost in channel local
+                       //
                        if (!empty($code)) {
                                $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_sipaddheader('Call-Info','\;answer-after=0'));
-                               $ext->add('ext-intercom', '_'.$code.'.', '', new ext_alertinfo('Ring Answer'));
+                               $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'));
-
                                $ext->add('ext-intercom', '_'.$code.'.', '', new ext_dial('Local/${dialnumber}@from-internal/n','',''));
                                $ext->add('ext-intercom', '_'.$code.'.', '', new ext_busy());
                                $ext->add('ext-intercom', '_'.$code.'.', '', new ext_macro('hangupcall')); 

Change History

07/27/07 09:41:04 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from 3.0 to 2.3.

r4557, r4559

thanks for bringing it to our attention and testing the fix

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads