Changeset 4629

Show
Ignore:
Timestamp:
08/02/07 14:17:53 (6 years ago)
Author:
p_lindheimer
Message:

added xml attribute needsenginedb, #2185 make MoH settings inheritable and add inherittable MOHCLASS to dids/directdids with MoH

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/core/agi-bin/dialparties.agi

    r4559 r4629  
    9999  $AGI->exec_sipaddheader($fields[0], $fields[1]); 
    100100} 
     101 
     102/* TODO: this does not work but should, moved to macro-dial for now 
     103 * 
     104$mohclass = get_var( $AGI, "MOHCLASS" ); 
     105if ($mohclass) { 
     106  debug("Setting MoH Class:  $mohclass", 4); 
     107  $AGI->set_music(true, $mohclass);            
     108} 
     109 */ 
    101110 
    102111$pr_dialstatus  = get_var( $AGI, "PR_DIALSTATUS" ); 
  • modules/branches/2.3/core/etc/extensions.conf

    r4547 r4629  
    6262;  Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...) 
    6363[macro-dial] 
    64 exten => s,1,AGI(dialparties.agi) 
    65 exten => s,2,NoOp(Returned from dialparties with no extensions to call) 
    66 exten => s,3,NoOp(DIALSTATUS is '${DIALSTATUS}') 
     64exten => s,1,GotoIf($["${MOHCLASS}" = ""]?dial) 
     65exten => s,2,SetMusicOnHold(${MOHCLASS}) 
     66exten => s,3(dial),AGI(dialparties.agi) 
     67exten => s,4,NoOp(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS}) 
    6768 
    6869exten => s,10,Dial(${ds})                               ; dialparties will set the priority to 10 if $ds is not null 
  • modules/branches/2.3/core/functions.inc.php

    r4385 r4629  
    202202 
    203203          if (!empty($item['mohclass']) && trim($item['mohclass']) != 'default') { 
    204               $ext->add($context, $exten, '', new ext_setmusiconhold($item['mohclass'])); 
     204            $ext->add($context, $exten, '', new ext_setmusiconhold($item['mohclass'])); 
     205            $ext->add($context, $exten, '', new ext_setvar('__MOHCLASS',$item['mohclass'])); 
    205206          } 
    206207 
     
    332333          if (!empty($item['mohclass']) && trim($item['mohclass']) != 'default') { 
    333334            $ext->add($context, $exten, '', new ext_setmusiconhold($item['mohclass'])); 
     335            $ext->add($context, $exten, '', new ext_setvar('__MOHCLASS',$item['mohclass'])); 
    334336          } 
    335337           
     
    863865  global $amp_conf; 
    864866 
    865   checkAstMan(); 
    866867  $sql = "SELECT * FROM devices"; 
    867868  $devresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC); 
     
    896897      } 
    897898    } 
     899    return true; 
    898900  } else { 
    899     echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]
     901    return false
    900902  } 
    901903} 
     
    907909  global $astman; 
    908910 
    909   checkAstMan(); 
    910911  $sql = "SELECT * FROM users"; 
    911912  $userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC); 
     
    924925      $astman->database_put("AMPUSER",$extension."/voicemail","\"".$voicemail."\""); 
    925926    }  
     927    return true; 
    926928  } else { 
    927     echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]
     929    return false
    928930  } 
    929931 
     
    931933//  return $astman->disconnect(); 
    932934//  is "true" the correct value...? 
    933   return true; 
    934935} 
    935936 
     
    979980  // Very bad 
    980981  $sipfields[] = array($account,'account',$account);   
    981   $sipfields[] = array($account,'callerid',($_REQUEST['description'])?$_REQUEST['description']." <".$account.'>':'device'." <".$account.'>'); 
     982  $sipfields[] = array($account,'callerid',(isset($_REQUEST['description']) && $_REQUEST['description'])?$_REQUEST['description']." <".$account.'>':'device'." <".$account.'>'); 
    982983   
    983984  // Where is this in the interface ?????? 
     
    28012802   
    28022803  //make sure we can connect to Asterisk Manager 
    2803   checkAstMan(); 
     2804  if (!checkAstMan()) { 
     2805    return false; 
     2806  } 
    28042807 
    28052808  //check if the extension is within range for this user 
     
    28392842    } 
    28402843  } 
     2844  return true; 
    28412845} 
    28422846 
     
    30593063 
    30603064  //make sure we can connect to Asterisk Manager 
    3061   checkAstMan(); 
     3065  if (!checkAstMan()) { 
     3066    return false; 
     3067  } 
    30623068   
    30633069  //create vars from the request 
     
    31083114      break; 
    31093115  } 
     3116  return true; 
    31103117} 
    31113118 
  • modules/branches/2.3/core/module.xml

    r4560 r4629  
    44  <category>Basic</category> 
    55  <name>Core</name> 
    6   <version>2.3.0beta2.2</version> 
     6  <version>2.3.0beta2.3</version> 
    77  <candisable>no</candisable> 
    88  <canuninstall>no</canuninstall> 
    99  <changelog> 
     10    *2.3.0beta2.3* added xml attribute needsenginedb, #2185 make MoH settings inheritable and add inherittable  MOHCLASS to dids/directdids with MoH 
    1011    *2.3.0beta2.2* #1907 don't send ringing, #2055 language in *99 recording, #2168 dialparties to set sip header from SIPADDHEADER channel var 
    1112    *2.3.0beta2.1* #2155 correct trunk tooltip, #2046 workaround for Asterisk bug that breaks VmX on some systems 
     
    3334  </requirements> 
    3435  <menuitems> 
    35     <extensions>Extensions</extensions> 
    36     <users>Users</users> 
    37     <devices>Devices</devices> 
     36    <extensions needsenginedb="yes">Extensions</extensions> 
     37    <users needsenginedb="yes">Users</users> 
     38    <devices needsenginedb="yes">Devices</devices> 
    3839    <did category="Inbound Call Control" sort="-5">Inbound Routes</did> 
    3940    <routing>Outbound Routes</routing>