mirror of https://github.com/sipwise/www_admin.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
234 lines
10 KiB
234 lines
10 KiB
<h2> SIP Peering Group
|
|
<a class="noarrow" href="detail?group_id=[% grp.id %]">
|
|
[% grp.name %]</a>
|
|
</h2>
|
|
|
|
<a href="/peering" class="aaction">back</a>
|
|
|
|
<h3>Peering Rules</h3>
|
|
|
|
<div class="p1">
|
|
[% IF messages.erulmsg %]<div class="goodmsg">[% messages.erulmsg %]</div>[% END %]
|
|
[% IF messages.erulerr %]<div class="errormsg">[% messages.erulerr %]</div>[% END %]
|
|
|
|
<table class="domains">
|
|
<tr class="table_header">
|
|
<td>Callee Prefix</td>
|
|
<td>Caller Pattern</td>
|
|
<td>Description</td>
|
|
<td style="width:40px;" />
|
|
<td style="width:60px;" />
|
|
</tr>
|
|
[% id = 0 %]
|
|
[% FOREACH rule = grp.rules %]
|
|
<tr>
|
|
[% IF rule.id == reditid && !Catalyst.session.admin.read_only %]
|
|
<form action="/peering/edit_rule" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<input type="hidden" name="ruleid" value="[% rule.id %]" />
|
|
<td>
|
|
<input type="text" size="15 id="addtxt" title="string, callee prefix"
|
|
name="callee_prefix" value="[% rule.callee_prefix %]" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, caller pattern"
|
|
name="caller_pattern" value="[% rule.caller_pattern %]" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, rule description"
|
|
name="description" value="[% rule.description %]" />
|
|
</td>
|
|
<td>
|
|
<div class="postlink">
|
|
<label for="rsave[% id %]">save</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="rsave[% id %]" />
|
|
</div>
|
|
</td>
|
|
</form>
|
|
<td><a href="/peering/detail?group_id=[% grp.id %]" class="aaction">cancel</a></td>
|
|
[% ELSE %]
|
|
<td>[% rule.callee_prefix %]</td>
|
|
<td>[% rule.caller_pattern %]</td>
|
|
<td>[% rule.description %]</td>
|
|
<td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<a href="/peering/detail?group_id=[% grp.id %]&reditid=[% rule.id %]" class="aaction">edit</a>
|
|
[% END %]
|
|
</td>
|
|
<form action="/peering/delete_rule" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<input type="hidden" name="ruleid" value="[% rule.id %]" />
|
|
<td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<div class="postlink">
|
|
<label for="rdel[% id %]">delete</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="rdel[% id %]" />
|
|
</div>
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
</form>
|
|
</tr>
|
|
[% id = id + 1 %]
|
|
[% END %]
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<tr>
|
|
<form action="/peering/create_rule" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, callee prefix"
|
|
name="callee_prefix" value="" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, caller pattern"
|
|
name="caller_pattern" value="" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, rule description"
|
|
name="description" value="" />
|
|
</td>
|
|
<td>
|
|
<div class="postlink">
|
|
<label for="radd">add</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="radd" />
|
|
</div>
|
|
</form>
|
|
</td>
|
|
<td />
|
|
</tr>
|
|
[% END %]
|
|
|
|
|
|
|
|
</table>
|
|
</div>
|
|
|
|
<h3>Peering Servers</h3>
|
|
|
|
<div class="p1">
|
|
[% IF messages.servmsg %]<div class="goodmsg">[% messages.servmsg %]</div>[% END %]
|
|
[% IF messages.serverr %]<div class="errormsg">[% messages.serverr %]</div>[% END %]
|
|
|
|
<table class="domains">
|
|
<tr class="table_header">
|
|
<td>Name</td>
|
|
<td>From-Domain</td>
|
|
<td>IP Address</td>
|
|
<td>Port</td>
|
|
<td>Weight</td>
|
|
<td>Via Loadbalancer</td>
|
|
<td style="width:40px;" />
|
|
<td style="width:60px;" />
|
|
</tr>
|
|
[% id = 0 %]
|
|
[% FOREACH peer = grp.peers %]
|
|
<tr>
|
|
[% IF peer.id == peditid && !Catalyst.session.admin.read_only %]
|
|
<form action="/peering/edit_peer" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<input type="hidden" name="peerid" value="[% peer.id %]" />
|
|
<td>
|
|
<input type="text" size="15 id="addtxt" title="string, peer name"
|
|
name="name" value="[% peer.name %]" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15 id="addtxt" title="string, peer domain"
|
|
name="domain" value="[% peer.domain %]" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, peer ip address"
|
|
name="ip" value="[% peer.ip %]" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="5" id="addtxt" title="int, peer port (1-65535)"
|
|
name="port" value="[% peer.port %]" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="3" id="addtxt" title="int, peer weight (0-255)"
|
|
name="weight" value="[% peer.weight %]" />
|
|
</td>
|
|
<td class="tdcenter">
|
|
<input type="checkbox" class="checkbox" title="check to route via load balancer "
|
|
name="via_lb" [% IF peer.via_lb %]checked="checked"[% END %] />
|
|
</td>
|
|
<td>
|
|
<div class="postlink">
|
|
<label for="psave[% id %]">save</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="psave[% id %]" />
|
|
</div>
|
|
</td>
|
|
</form>
|
|
<td><a href="/peering/detail?group_id=[% grp.id %]" class="aaction">cancel</a></td>
|
|
[% ELSE %]
|
|
<td><a href="/peering/rewrite?peer_id=[% peer.id%]" class="aaction">[% peer.name %]</a></td>
|
|
<td>[% peer.domain %]</td>
|
|
<td>[% peer.ip %]</td>
|
|
<td>[% peer.port %]</td>
|
|
<td>[% peer.weight %]</td>
|
|
<td class="tdcenter">
|
|
<input type="checkbox" class="checkbox" name="via_lb"
|
|
[% IF peer.via_lb %]checked="checked"[% END %] disabled="disabled" />
|
|
</td>
|
|
<td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<a href="/peering/detail?group_id=[% grp.id %]&peditid=[% peer.id %]" class="aaction">edit</a>
|
|
[% END %]
|
|
</td>
|
|
<form action="/peering/delete_peer" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<input type="hidden" name="peerid" value="[% peer.id %]" />
|
|
<td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<div class="postlink">
|
|
<label for="pdel[% id %]">delete</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="pdel[% id %]" />
|
|
</div>
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
</form>
|
|
</tr>
|
|
[% id = id + 1 %]
|
|
[% END %]
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<tr>
|
|
<form action="/peering/create_peer" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, peer name"
|
|
name="name" value="" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, peer domain"
|
|
name="domain" value="" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="15" id="addtxt" title="string, peer ip address"
|
|
name="ip" value="" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="5" id="addtxt" title="int, peer port (1-65535)"
|
|
name="port" value="5060" />
|
|
</td>
|
|
<td>
|
|
<input type="text" size="3" id="addtxt" title="int, peer weight (0-255)"
|
|
name="weight" value="1" />
|
|
</td>
|
|
<td class="tdcenter">
|
|
<input type="checkbox" class="checkbox" title="check to route via load balancer "
|
|
name="via_lb" checked="checked" />
|
|
</td>
|
|
<td>
|
|
<div class="postlink">
|
|
<label for="padd">add</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="padd" />
|
|
</div>
|
|
</form>
|
|
</td>
|
|
<td />
|
|
</tr>
|
|
[% END %]
|
|
</table>
|
|
</div>
|
|
|