Ticket #1671: patchfile

File patchfile, 5.8 kB (added by jimmyt86, 5 years ago)

SVN patchfile

Line 
1 Index: modules/branches/2.3/findmefollow/page.findmefollow.php
2 ===================================================================
3 --- modules/branches/2.3/findmefollow/page.findmefollow.php (revision 3566)
4 +++ modules/branches/2.3/findmefollow/page.findmefollow.php (working copy)
5 @@ -209,13 +209,14 @@
6           <b><?php echo _("hunt")?></b>: <?php echo _("take turns ringing each available extension")?><br>
7           <b><?php echo _("memoryhunt")?></b>: <?php echo _("ring first extension in the list, then ring the 1st and 2nd extension, then ring 1st 2nd and 3rd extension in the list.... etc.")?><br>
8                                          <b><?php echo _("*-prim")?></b>:  <?php echo _("these modes act as described above. However, if the primary extension (first in list) is occupied, the other extensions will not be rung. If the primary is freepbx DND, it won't be run. If the primary is freepbx CF unconditional, then all will be rung")?><br>
9 +                                        <b><?php echo _("firstavailable")?></b>:  <?php echo _("ring only the first  available channel")?><br>
10         </span>
11         </a></td>
12         <td>
13           &nbsp;&nbsp;<select name="strategy"/>
14           <?php
15             $default = (isset($strategy) ? $strategy : 'ringall');
16 -                                                $items = array('ringallv2','ringallv2-prim','ringall','ringall-prim','hunt','hunt-prim','memoryhunt','memoryhunt-prim');
17 +                                                $items = array('ringallv2','ringallv2-prim','ringall','ringall-prim','hunt','hunt-prim','memoryhunt','memoryhunt-prim','firstavailable');
18             foreach ($items as $item) {
19               echo '<option value="'.$item.'" '.($default == $item ? 'SELECTED' : '').'>'._($item);
20             }
21 Index: modules/branches/2.3/ringgroups/page.ringgroups.php
22 ===================================================================
23 --- modules/branches/2.3/ringgroups/page.ringgroups.php (revision 3566)
24 +++ modules/branches/2.3/ringgroups/page.ringgroups.php (working copy)
25 @@ -184,13 +184,14 @@
26           <b><?php echo _("hunt")?></b>: <?php echo _("Take turns ringing each available extension")?><br>
27           <b><?php echo _("memoryhunt")?></b>: <?php echo _("Ring first extension in the list, then ring the 1st and 2nd extension, then ring 1st 2nd and 3rd extension in the list.... etc.")?><br>
28                                          <b><?php echo _("*-prim")?></b>:  <?php echo _("These modes act as described above. However, if the primary extension (first in list) is occupied, the other extensions will not be rung. If the primary is freePBX DND, it won't be rung. If the primary is freePBX CF unconditional, then all will be rung")?><br>
29 +                                        <b><?php echo _("firstavailable")?></b>:  <?php echo _("ring only the first available channel")?><br>
30         </span>
31         </a></td>
32         <td>
33           <select name="strategy"/>
34           <?php
35             $default = (isset($strategy) ? $strategy : 'ringall');
36 -                                                $items = array('ringall','ringall-prim','hunt','hunt-prim','memoryhunt','memoryhunt-prim');
37 +                                                $items = array('ringall','ringall-prim','hunt','hunt-prim','memoryhunt','memoryhunt-prim','firstavailable');
38             foreach ($items as $item) {
39               echo '<option value="'.$item.'" '.($default == $item ? 'SELECTED' : '').'>'._($item);
40             }
41 Index: freepbx/trunk/amp_conf/astetc/extensions.conf
42 ===================================================================
43 --- freepbx/trunk/amp_conf/astetc/extensions.conf (revision 3566)
44 +++ freepbx/trunk/amp_conf/astetc/extensions.conf (working copy)
45 @@ -76,12 +76,16 @@
46  exten => s,41,Goto(s,37)
47          
48  exten => s,42,Dial(${${HuntMember}}${ds} ) ; dialparties will set the priority to 20 if $ds is not null and its a hunt group
49 -exten => s,43,Set(HuntLoop=$[1 + ${HuntLoop}])
50 -exten => s,44,Set(HuntMembers=$[${HuntMembers} - 1])
51 -exten => s,45,Goto(s,22)
52 +exten => s,43,GotoIf($["${RingGroupMethod}" != "firstavailable" ]?45)
53 +exten => s,44,Set(HuntMembers=0)
54 +exten => s,45,Set(HuntLoop=$[1 + ${HuntLoop}])
55 +exten => s,46,Set(HuntMembers=$[${HuntMembers} - 1])
56 +exten => s,47,Goto(s,22)
57  exten => s,50,DBdel(CALLTRACE/${CT_EXTEN})
58  exten => s,51,Goto(s,42)
59  
60 +exten => s,143,Goto(s,45)
61 +
62  ; make sure hungup calls go here so that proper cleanup occurs from call confirmed calls and the like
63  ;
64  exten => h,1,Macro(hangupcall)
65 Index: freepbx/trunk/amp_conf/agi-bin/dialparties.agi
66 ===================================================================
67 --- freepbx/trunk/amp_conf/agi-bin/dialparties.agi  (revision 3566)
68 +++ freepbx/trunk/amp_conf/agi-bin/dialparties.agi  (working copy)
69 @@ -400,7 +400,7 @@
70         if (strlen($extds)) $ds .= $extds . '&';
71    
72       // Update Caller ID for calltrace application
73 -     if ((strpos($k,"#")==0) && (($rgmethod != "hunt") && ($rgmethod != "memoryhunt")) )
74 +     if ((strpos($k,"#")==0) && (($rgmethod != "hunt") && ($rgmethod != "memoryhunt") && ($rgmethod != "firstavailable")) )
75       {
76         if ( isset($cidnum) && is_numeric($cidnum) )
77         {
78 @@ -433,7 +433,7 @@
79  $loops   = 0;
80  $myhuntmember  = "";
81  
82 -if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt"))
83 +if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt") || ($rgmethod == "firstavailable"))
84  {
85   if ($cidnum)
86     $AGI->set_variable(CALLTRACE_HUNT,$cidnum);
87 @@ -445,7 +445,7 @@
88     {
89       //If the original array is included in the extension hash then set variables
90       $myhuntmember="HuntMember"."$loops";
91 -     if ($rgmethod == "hunt")
92 +     if (($rgmethod == "hunt") || ($rgmethod == "firstavailable"))
93         $AGI->set_variable($myhuntmember,$ext_hunt[$k]);
94       elseif ($rgmethod == "memoryhunt")
95       {
96 @@ -549,7 +549,7 @@
97  
98   $AGI->noop('');
99  } else {
100 - if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt"))
101 + if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt") || ($rgmethod == "firstavailable"))
102   {
103     $ds = '|';
104     if ($timer)