Ticket #2922: loopdisa.diff
| File loopdisa.diff, 3.8 kB (added by lazytt, 5 months ago) |
|---|
-
page.disa.php
old new 115 115 <td><a href="#" class="info"><?php echo _("Context"); ?><span><?php echo _("(Experts Only) Sets the context that calls will originate from. Leave this as from-internal unless you know what you're doing."); ?></span></a></td> 116 116 <td><input type="text" name="context" value="<?php echo htmlspecialchars(isset($thisItem['context']) ? $thisItem['context'] : 'from-internal'); ?>" tabindex="<?php echo ++$tabindex;?>"></td> 117 117 </tr> 118 <tr> 119 <td><a href="#" class="info"><?php echo _("Allow Additional Calls"); ?><span><?php echo _("Will \"loop\" the DISA so that you will be returned to the dialtone when the call is disconected. In order to force a hangup (and a return to the dial tone), set the appropreate options in the outbound dial options in general settings. "); ?></span></a></td> 120 <td><input type="checkbox" name="loopcall" value="CHECKED" <?php echo $thisItem['loopcall'] ?> tabindex="<?php echo ++$tabindex;?>"/></td> 121 </tr> 118 122 <tr> 119 123 <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>" tabindex="<?php echo ++$tabindex;?>"></h6></td> 120 124 </tr> -
functions.inc.php
old new 90 90 $ext->add('disa', $item['disa_id'], '', new ext_disa('/etc/asterisk/disa-'.$item['disa_id'].'.conf')); 91 91 } 92 92 93 if ($thisitem['loopcall'] == 'CHECKED') { 94 $ext->add('disa', $item['disa_id'], '', new ext_setvar('__LOOPDISA', 'disa,'.$item['disa_id'].',1')); 95 } else { 93 96 $ext->add('disa', $item['disa_id'], 'end', new ext_hangup('')); 97 } 94 98 } 95 99 } 96 100 break; … … 133 137 if (!isset($needconf)) 134 138 $needconf = ''; 135 139 if(empty($displayname)) $displayname = "unnamed"; 136 $results = sql("INSERT INTO disa (displayname,pin,cid,context,resptimeout,digittimeout,needconf ) values (\"".str_replace("\"", "\"\"",$displayname)."\",\"".$pin."\",\"".str_replace("\"", "\"\"", $cid)."\",\"".$context."\", \"$resptimeout\", \"$digittimeout\", \"$needconf\")");140 $results = sql("INSERT INTO disa (displayname,pin,cid,context,resptimeout,digittimeout,needconf,loopcall) values (\"".str_replace("\"", "\"\"",$displayname)."\",\"".$pin."\",\"".str_replace("\"", "\"\"", $cid)."\",\"".$context."\", \"$resptimeout\", \"$digittimeout\", \"$needconf\", \"$loopcall\")"); 137 141 } 138 142 139 143 function disa_del($id) { … … 148 152 if (!isset($needconf)) 149 153 $needconf = ''; 150 154 if(empty($displayname)) $displayname = "unnamed"; 151 $results = sql("UPDATE disa set displayname = \"".str_replace("\"", "\"\"",$displayname)."\", pin = \"$pin\", cid = \"".str_replace("\"", "\"\"",$cid)."\", context = \"$context\", resptimeout = \"$resptimeout\", digittimeout = \"$digittimeout\", needconf = \"$needconf\" where disa_id = \"$id\"");155 $results = sql("UPDATE disa set displayname = \"".str_replace("\"", "\"\"",$displayname)."\", pin = \"$pin\", cid = \"".str_replace("\"", "\"\"",$cid)."\", context = \"$context\", resptimeout = \"$resptimeout\", digittimeout = \"$digittimeout\", needconf = \"$needconf\", loopcall = \"$loopcall\" where disa_id = \"$id\""); 152 156 } 153 157 ?>
