Changeset 4629
- Timestamp:
- 08/02/07 14:17:53 (6 years ago)
- Files:
-
- modules/branches/2.3/core/agi-bin/dialparties.agi (modified) (1 diff)
- modules/branches/2.3/core/etc/extensions.conf (modified) (1 diff)
- modules/branches/2.3/core/functions.inc.php (modified) (12 diffs)
- modules/branches/2.3/core/module.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.3/core/agi-bin/dialparties.agi
r4559 r4629 99 99 $AGI->exec_sipaddheader($fields[0], $fields[1]); 100 100 } 101 102 /* TODO: this does not work but should, moved to macro-dial for now 103 * 104 $mohclass = get_var( $AGI, "MOHCLASS" ); 105 if ($mohclass) { 106 debug("Setting MoH Class: $mohclass", 4); 107 $AGI->set_music(true, $mohclass); 108 } 109 */ 101 110 102 111 $pr_dialstatus = get_var( $AGI, "PR_DIALSTATUS" ); modules/branches/2.3/core/etc/extensions.conf
r4547 r4629 62 62 ; Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...) 63 63 [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}') 64 exten => s,1,GotoIf($["${MOHCLASS}" = ""]?dial) 65 exten => s,2,SetMusicOnHold(${MOHCLASS}) 66 exten => s,3(dial),AGI(dialparties.agi) 67 exten => s,4,NoOp(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS}) 67 68 68 69 exten => 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 202 202 203 203 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'])); 205 206 } 206 207 … … 332 333 if (!empty($item['mohclass']) && trim($item['mohclass']) != 'default') { 333 334 $ext->add($context, $exten, '', new ext_setmusiconhold($item['mohclass'])); 335 $ext->add($context, $exten, '', new ext_setvar('__MOHCLASS',$item['mohclass'])); 334 336 } 335 337 … … 863 865 global $amp_conf; 864 866 865 checkAstMan();866 867 $sql = "SELECT * FROM devices"; 867 868 $devresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC); … … 896 897 } 897 898 } 899 return true; 898 900 } else { 899 echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"];901 return false; 900 902 } 901 903 } … … 907 909 global $astman; 908 910 909 checkAstMan();910 911 $sql = "SELECT * FROM users"; 911 912 $userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC); … … 924 925 $astman->database_put("AMPUSER",$extension."/voicemail","\"".$voicemail."\""); 925 926 } 927 return true; 926 928 } else { 927 echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"];929 return false; 928 930 } 929 931 … … 931 933 // return $astman->disconnect(); 932 934 // is "true" the correct value...? 933 return true;934 935 } 935 936 … … 979 980 // Very bad 980 981 $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.'>'); 982 983 983 984 // Where is this in the interface ?????? … … 2801 2802 2802 2803 //make sure we can connect to Asterisk Manager 2803 checkAstMan(); 2804 if (!checkAstMan()) { 2805 return false; 2806 } 2804 2807 2805 2808 //check if the extension is within range for this user … … 2839 2842 } 2840 2843 } 2844 return true; 2841 2845 } 2842 2846 … … 3059 3063 3060 3064 //make sure we can connect to Asterisk Manager 3061 checkAstMan(); 3065 if (!checkAstMan()) { 3066 return false; 3067 } 3062 3068 3063 3069 //create vars from the request … … 3108 3114 break; 3109 3115 } 3116 return true; 3110 3117 } 3111 3118 modules/branches/2.3/core/module.xml
r4560 r4629 4 4 <category>Basic</category> 5 5 <name>Core</name> 6 <version>2.3.0beta2. 2</version>6 <version>2.3.0beta2.3</version> 7 7 <candisable>no</candisable> 8 8 <canuninstall>no</canuninstall> 9 9 <changelog> 10 *2.3.0beta2.3* added xml attribute needsenginedb, #2185 make MoH settings inheritable and add inherittable MOHCLASS to dids/directdids with MoH 10 11 *2.3.0beta2.2* #1907 don't send ringing, #2055 language in *99 recording, #2168 dialparties to set sip header from SIPADDHEADER channel var 11 12 *2.3.0beta2.1* #2155 correct trunk tooltip, #2046 workaround for Asterisk bug that breaks VmX on some systems … … 33 34 </requirements> 34 35 <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> 38 39 <did category="Inbound Call Control" sort="-5">Inbound Routes</did> 39 40 <routing>Outbound Routes</routing>
