diff --git a/etc/admin.conf b/etc/admin.conf index 781286f..33d5548 100644 --- a/etc/admin.conf +++ b/etc/admin.conf @@ -3,6 +3,7 @@ peering_features="1" voicemail_features="1" fax_features="1" + li_features="0" cc_dial_prefix="00" ac_dial_prefix="0" > @@ -13,7 +14,8 @@ audiofile_features="1" vsc_features="1" /> - + destination zone diff --git a/lib/admin/Controller/peering.pm b/lib/admin/Controller/peering.pm index fa1e175..a6f86f4 100644 --- a/lib/admin/Controller/peering.pm +++ b/lib/admin/Controller/peering.pm @@ -159,7 +159,7 @@ sub edit_grp : Local { my %messages; my %settings; - $settings{id} = $c->request->params->{grpid}; + my $grpid = $c->request->params->{grpid}; $settings{priority} = $c->request->params->{priority}; $settings{description} = $c->request->params->{grpdesc}; $settings{peering_contract_id} = $c->request->params->{peering_contract_id} || undef; @@ -168,7 +168,9 @@ sub edit_grp : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'update_peer_group', - \%settings, + { id => $grpid, + data => \%settings, + }, undef )) { @@ -213,7 +215,7 @@ sub create_rule : Local { my $grpid = $c->request->params->{grpid}; my $callee_prefix = $c->request->params->{callee_prefix}; - my $caller_pattern = $c->request->params->{caller_pattern}; + my $caller_prefix = $c->request->params->{caller_prefix}; my $description = $c->request->params->{description}; # $messages{crulerr} = 'Client.Syntax.MalformedPeerGroupName' @@ -222,9 +224,11 @@ sub create_rule : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'create_peer_rule', { group_id => $grpid, - callee_prefix => $callee_prefix, - caller_pattern => $caller_pattern, - description => $description + data => { + callee_prefix => $callee_prefix, + caller_prefix => $caller_prefix, + description => $description + }, }, undef )) @@ -304,7 +308,7 @@ sub edit_rule : Local { my $grpid = $c->request->params->{grpid}; my $ruleid = $c->request->params->{ruleid}; my $callee_prefix = $c->request->params->{callee_prefix}; - my $caller_pattern = $c->request->params->{caller_pattern}; + my $caller_prefix = $c->request->params->{caller_prefix}; my $description = $c->request->params->{description}; # $messages{crulerr} = 'Client.Syntax.MalformedPeerGroupName' @@ -312,10 +316,12 @@ sub edit_rule : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'update_peer_rule', - { id => $ruleid, - callee_prefix => $callee_prefix, - caller_pattern => $caller_pattern, - description => $description + { id => $ruleid, + data => { + callee_prefix => $callee_prefix, + caller_prefix => $caller_prefix, + description => $description + }, }, undef )) @@ -362,7 +368,6 @@ sub create_peer : Local { my $ip = $c->request->params->{ip}; my $port = $c->request->params->{port}; my $weight = $c->request->params->{weight}; - my $via_lb = defined $c->request->params->{via_lb} ? 1 : 0; #TODO: add syntax checks here @@ -373,12 +378,13 @@ sub create_peer : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'create_peer_host', { group_id => $grpid, - name => $name, - domain => $domain, - ip => $ip, - port => $port, - weight => $weight, - via_lb => $via_lb + data => { + name => $name, + domain => $domain, + ip => $ip, + port => $port, + weight => $weight, + }, }, undef )) @@ -462,7 +468,6 @@ sub edit_peer : Local { my $ip = $c->request->params->{ip}; my $port = $c->request->params->{port}; my $weight = $c->request->params->{weight}; - my $via_lb = defined $c->request->params->{via_lb} ? 1 : 0; # $messages{crulerr} = 'Client.Syntax.MalformedPeerGroupName' # unless $callee_prefix =~ /^[a-zA-Z0-9_\.\-\@\:]+/; @@ -470,12 +475,13 @@ sub edit_peer : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'update_peer_host', { id => $peerid, - name => $name, - domain => $domain, - ip => $ip, - port => $port, - weight => $weight, - via_lb => $via_lb + data => { + name => $name, + domain => $domain, + ip => $ip, + port => $port, + weight => $weight, + }, }, undef )) @@ -522,7 +528,7 @@ sub rewrite : Local { ); my $all_peer_details; return unless $c->model('Provisioning')->call_prov( $c, 'voip', 'get_peer_group_details', - { id => $$peer_details{group_id} }, + { id => $$peer_details{peer_host}{group_id} }, \$all_peer_details ); my $all_peers = $$all_peer_details{peers}; @@ -578,12 +584,14 @@ sub create_rewrite : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'create_peer_rewrite', { peer_id => $peerid, - match_pattern => $match_pattern, - replace_pattern => $replace_pattern, - description => $description, - direction => $direction, - field => $field, - priority => $priority, + data => { + match_pattern => $match_pattern, + replace_pattern => $replace_pattern, + description => $description, + direction => $direction, + field => $field, + priority => $priority, + }, }, undef )) @@ -691,12 +699,14 @@ sub edit_rewrite : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'update_peer_rewrite', { id => $rewriteid, - match_pattern => $match_pattern, - replace_pattern => $replace_pattern, - description => $description, - direction => $direction, - field => $field, - priority => $priority, + data => { + match_pattern => $match_pattern, + replace_pattern => $replace_pattern, + description => $description, + direction => $direction, + field => $field, + priority => $priority, + }, }, undef )) @@ -741,7 +751,7 @@ sub copy_rewrite : Local { my $rpeerid = $c->request->params->{rpeerid}; my $policy= $c->request->params->{policy}; my $grpid = $c->request->params->{grpid}; - my $delete_old = $policy eq "delete" ? 1 : 0; + my $delete_existing = $policy eq "delete" ? 1 : 0; unless(defined $peerid && defined $rpeerid) { @@ -751,8 +761,8 @@ sub copy_rewrite : Local { unless(keys %messages) { if($c->model('Provisioning')->call_prov( $c, 'voip', 'copy_peer_rewrites', { from_peer_id => $rpeerid, - to_peer_id => $peerid, - delete_old => $delete_old + to_peer_id => $peerid, + delete_existing => $delete_existing }, undef )) diff --git a/root/layout/menu b/root/layout/menu index cc3433f..92082ca 100644 --- a/root/layout/menu +++ b/root/layout/menu @@ -19,6 +19,9 @@ [% END %]
  • Accounts
  • Subscribers
  • + [% IF Catalyst.config.li_features %] +
  • Lawful Intercept
  • + [% END %] [%#
  • Devices
  • %] [%#
  • Registrations
  • %] diff --git a/root/tt/admin.tt b/root/tt/admin.tt index a51715a..fdf8250 100644 --- a/root/tt/admin.tt +++ b/root/tt/admin.tt @@ -13,7 +13,7 @@ r/o PW CDR - [% IF Catalyst.config.lawful_intercept %] + [% IF Catalyst.config.li_features %] LI [% END %] @@ -58,7 +58,7 @@ [% IF erefill.call_data or !erefill && admin.call_data %]checked="checked" [% END %] title="if checked, the administrator may view call detail records" /> - [% IF Catalyst.config.lawful_intercept %] + [% IF Catalyst.config.li_features %] - [% IF Catalyst.config.lawful_intercept %] + [% IF Catalyst.config.li_features %] - [% IF Catalyst.config.lawful_intercept %] + [% IF Catalyst.config.li_features %] lawful intercepts: diff --git a/root/tt/peering_detail.tt b/root/tt/peering_detail.tt index 21d744f..557d58d 100644 --- a/root/tt/peering_detail.tt +++ b/root/tt/peering_detail.tt @@ -1,6 +1,6 @@

    SIP Peering Group - - [% grp.name %] + + [% grp.group.name %]

    back @@ -24,7 +24,7 @@ [% IF rule.id == reditid && !Catalyst.session.admin.read_only %]
    - + + name="caller_prefix" value="[% rule.caller_prefix %]" />
    - cancel + cancel [% ELSE %] [% rule.callee_prefix %] - [% rule.caller_pattern %] + [% rule.caller_prefix %] [% rule.description %] [% UNLESS Catalyst.session.admin.read_only %] - edit + edit [% END %]
    - + [% UNLESS Catalyst.session.admin.read_only %] @@ -74,14 +74,14 @@ [% UNLESS Catalyst.session.admin.read_only %] - + + name="caller_prefix" value="" /> IP Address Port Weight - Via Loadbalancer @@ -125,7 +124,7 @@ [% IF peer.id == peditid && !Catalyst.session.admin.read_only %] - + - - -
    - cancel + cancel [% ELSE %] [% peer.name %] [% peer.domain %] [% peer.ip %] [% peer.port %] [% peer.weight %] - - - [% UNLESS Catalyst.session.admin.read_only %] - edit + edit [% END %]
    - + [% UNLESS Catalyst.session.admin.read_only %] @@ -193,7 +184,7 @@ [% UNLESS Catalyst.session.admin.read_only %] - + @@ -214,10 +205,6 @@ - - -