summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec5265f)
raw | patch | inline | side by side (parent: ec5265f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Aug 2005 12:21:31 +0000 (12:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Aug 2005 12:21:31 +0000 (12:21 +0000) |
Fixed empty Queue
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1099 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1099 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/ogroups/class_phonequeue.inc | patch | blob | history | |
plugins/admin/ogroups/phonequeue.tpl | patch | blob | history |
diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc
index 90480d9a5a0a6351aae8862b3696b688785a95e5..eceb7b3134cff1426b236fd1a9e48c3f3a9c2f86 100644 (file)
var $cn= "";
- var $goFonTimeOut ="5";
- var $goFonMaxLen ="20";
- var $goFonAnnounceFrequency ="60";
- var $goFonDialOption_t ="t";
- var $goFonDialOption_T ="T";
- var $goFonDialOption_h ="h";
- var $goFonQueueAnnounce ="gonicus-berlin-welcome";
- var $goFonDialOption_H ="H";
+ var $goFonTimeOut ="20";
+ var $goFonMaxLen ="20"; //
+ var $goFonAnnounceFrequency ="60"; // Annouce Frequency in seconds
+ var $goFonDialOption_t ="";
+ var $goFonDialOption_T ="";
+ var $goFonDialOption_h ="";
+ var $goFonDialOption_r ="";
+ var $goFonQueueAnnounce ="gonicus-berlin-welcome";
+ var $goFonDialOption_H ="";
var $goFonMusiconHold ="default";
var $goFonWelcomeMusic ="gonicus-berlin-welcome";
- var $goFonQueueReportHold ="";
+ var $goFonQueueReportHold ="yes";
var $goFonQueueYouAreNext ="queue-youarenext";
var $goFonQueueThereAre ="queue-therare";
var $goFonQueueCallsWaiting ="queue-callswaiting";
var $goFonQueueThankYou ="queue-thankyou";
var $goFonQueueMinutes ="queue-minutes";
var $goFonQueueSeconds ="queue-seconds";
- var $goFonQueueLanguage ="queue-holdtime";
- var $goFonQueueStrategy ="rrmemory";
- var $goFonQueueAnnounceHoldtime ="yes";
+ var $goFonQueueLanguage ="queue-holdtime";
+ var $goFonQueueStrategy ="ringall";
+ var $goFonQueueAnnounceHoldtime="yes";
var $telephoneNumber =array();
var $goFonQueueMember =array();
var $goFonDialOption ="tThH";
var $old_phone_numbers =array();
/* attribute list for save action */
- var $attributes= array( "goFonTimeOut","goFonMaxLen","goFonAnnounceFrequency","goFonDialOption_t","goFonDialOption_T","goFonDialOption_h",
+ var $attributes= array( "goFonTimeOut","goFonMaxLen","goFonAnnounceFrequency","goFonDialOption_t","goFonDialOption_T",
+ "goFonDialOption_h","goFonDialOption_r",
"goFonDialOption_H","goFonMusiconHold","goFonWelcomeMusic","goFonQueueReportHold","goFonQueueYouAreNext",
"goFonQueueThereAre","goFonQueueCallsWaiting","goFonQueueThankYou","goFonQueueMinutes","goFonQueueSeconds",
"telephoneNumber","goFonQueueLanguage","goFonQueueStrategy","goFonQueueAnnounceHoldtime","goFonQueueAnnounce","goFonDialOption","goFonQueueRetry");
function check()
{
$message= array();
+ #fixme workaround : Tab is not initialised correct
if(!$this->is_account) return($message);
if($this->is_number_used()){
/* generate Extension entries, with priority */
+
+ $queueusers=0;
+ foreach($this->parent->by_object['ogroup']->memberList as $member){
+ if(in_array("goFonAccount",$member['objectClass'])){
+ $queueusers++;
+ }
+ }
+
+
$i = 0;
foreach($this->telephoneNumber as $num){
+
+ // If there are no member in a Queue
+ // Play sound an quit
+
+ // A Queue is not deleted directly, it is stored until the o group is deleted
- $prio --;
$a_ext[$i]['context'] = 'GOsa';
$a_ext[$i]['exten'] = $this->attrs['cn'][0];
$a_ext[$i]['priority'] = 1;
$a_ext[$i]['app'] = "Goto";
$a_ext[$i]['appdata'] = $num."|1";
$i ++ ;
- $a_ext[$i]['context'] = 'GOsa';
- $a_ext[$i]['exten'] = $num;
- $a_ext[$i]['priority'] = 1;
- $a_ext[$i]['app'] = "Wait";
- $a_ext[$i]['appdata'] = "2";
- $i ++ ;
- $a_ext[$i]['context'] = 'GOsa';
- $a_ext[$i]['exten'] = $num;
- $a_ext[$i]['priority'] = 2;
- $a_ext[$i]['app'] = "Set";
- $a_ext[$i]['appdata'] = "LANGUAGE|".$this->goFonQueueLanguage;
- $i ++ ;
- $a_ext[$i]['context'] = 'GOsa';
- $a_ext[$i]['exten'] = $num;
- $a_ext[$i]['priority'] = 3;
- $a_ext[$i]['app'] = "Playback";
- $a_ext[$i]['appdata'] = $this->goFonWelcomeMusic;
- $i ++ ;
- $a_ext[$i]['context'] = 'GOsa';
- $a_ext[$i]['exten'] = $num;
- $a_ext[$i]['priority'] = 4;
- $a_ext[$i]['app'] = "SetCIDName";
- $a_ext[$i]['appdata'] = $this->parent->by_object['ogroup']->description;
- $i ++ ;
- $a_ext[$i]['context'] = 'GOsa';
- $a_ext[$i]['exten'] = $num;
- $a_ext[$i]['priority'] = 5;
- $a_ext[$i]['app'] = "Queue";
- $a_ext[$i]['appdata'] = $this->attrs['cn'][0].
- "|".
- $this->goFonDialOption_t.
- $this->goFonDialOption_T.
- $this->goFonDialOption_h.
- $this->goFonDialOption_H.
- "|". // Optionalurl egal
- "|". // announceoverride
- "|"; // Timeout
-
-// $i ++ ;
-// $a_ext[$i]['context'] = 'GOsa';
-// $a_ext[$i]['exten'] = $num;
-// $a_ext[$i]['priority'] = 6;
-// $a_ext[$i]['app'] = "SetVar";
-// $a_ext[$i]['appdata'] = "Queue_Prio=".$prio;
- $i ++ ;
+
+ if($queueusers == 0){
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 1;
+ $a_ext[$i]['app'] = "Wait";
+ $a_ext[$i]['appdata'] = "2";
+ $i ++ ;
+
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 2;
+ $a_ext[$i]['app'] = "Playback";
+ $a_ext[$i]['appdata'] = "ss-noservice";
+ $i ++ ;
+
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 3;
+ $a_ext[$i]['app'] = "Goto";
+ $a_ext[$i]['appdata'] = "default";
+ $i ++ ;
+ }else{
+ $prio --;
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 1;
+ $a_ext[$i]['app'] = "Wait";
+ $a_ext[$i]['appdata'] = "2";
+ $i ++ ;
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 2;
+ $a_ext[$i]['app'] = "Set";
+ $a_ext[$i]['appdata'] = "LANGUAGE|".$this->goFonQueueLanguage;
+ $i ++ ;
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 3;
+ $a_ext[$i]['app'] = "Playback";
+ $a_ext[$i]['appdata'] = $this->goFonWelcomeMusic;
+ $i ++ ;
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 4;
+ $a_ext[$i]['app'] = "SetCIDName";
+ if(!empty($this->parent->by_object['ogroup']->description)){
+ $a_ext[$i]['appdata'] = $this->parent->by_object['ogroup']->description;
+ }else{
+ $a_ext[$i]['appdata'] = $this->attrs['cn'][0]." - ".$num;
+ }
+ $i ++ ;
+ $a_ext[$i]['context'] = 'GOsa';
+ $a_ext[$i]['exten'] = $num;
+ $a_ext[$i]['priority'] = 5;
+ $a_ext[$i]['app'] = "Queue";
+ $a_ext[$i]['appdata'] = $this->attrs['cn'][0].
+ "|".
+ $this->goFonDialOption_t.
+ $this->goFonDialOption_T.
+ $this->goFonDialOption_h.
+ $this->goFonDialOption_H.
+ $this->goFonDialOption_r;
+ }
/* Generate Priority Entry */
$queue["announce"] = "";
$queue["retry"] = $this->goFonQueueRetry;
$queue["wrapuptime"] = "";
$queue["servicelevel"] = "";
- $queue["joinempty"] = "";
- $queue["leavewhenempty"] = "";
+ $queue["joinempty"] = "no";
+ $queue["leavewhenempty"] = "yes";
$queue["eventmemberstatus"] = "";
$queue["eventwhencalled"] = "";
- $queue["reportholdtime"] = "";
+ $queue["reportholdtime"] = "yes";
$queue["memberdelay"] = "";
$queue["weight"] = "";
$queue["timeoutrestart"] = "";
{
plugin::save_object();
if(isset($_POST['phonenumber'])){
- foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_h","goFonDialOption_H","goFonMusiconHold") as $val){
+ foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_h","goFonDialOption_r","goFonDialOption_H","goFonMusiconHold") as $val){
if(isset($_POST[$val])){
$this->$val = $_POST[$val];
}else{
function save()
{
+ #fixme workaround : Tab is not initialised correct
if(!$this->is_account) return;
$ldap= $this->config->get_ldap_link();
plugin::save();
$this->attrs['goFonDialOption'] = "";
- foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_h","goFonDialOption_H") as $val){
+ foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_r","goFonDialOption_h","goFonDialOption_H") as $val){
$this->attrs['goFonDialOption'].=$this->$val;
unset($this->attrs[$val]);
}
}
$tmp = array_flip($this->attributes);
- foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_h","goFonDialOption_H") as $val){
+ foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_r","goFonDialOption_h","goFonDialOption_H") as $val){
unset($this->$val);
unset($this->attrs[$val]);
unset($tmp[$val]);
index b7904d2fc722a05a0b360c3e52e189d3079f0910..dafb6fb4259f5f529b8fb6c1b3f529887bdfbca8 100644 (file)
{t}Allows calling to hangup by pressing *{/t}
</td>
</tr>
+ <tr>
+ <td>
+ </td>
+ <td>
+ <input type="checkbox" name='goFonDialOption_r' value='r' {$goFonDialOption_rCHK} {$goFonDialOption_rACL}>
+ {t}Ring instead of playing background music{/t}
+ </td>
+ </tr>
</table>
</td>
<td valign='top' style="border-left: 1px solid rgb(160, 160, 160);">