diff options
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/search/cdr.html | 11 | ||||
-rw-r--r-- | httemplate/view/svc_pbx.cgi | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index 5e917db2e..d0d7292d1 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -223,6 +223,17 @@ if ( $cgi->param('svcnum') =~ /^([\d, ]+)$/ ) { } ### +# src/dst_ip_addr +### +foreach my $field ('src_ip_addr','dst_ip_addr') { + if ( $cgi->param($field) ) { + my $search = FS::cdr->ip_addr_sql($field, $cgi->param($field)); + push @search, $search; + push @qsearch, $search; + } +} + +### # cdrbatchnum (or legacy cdrbatch) ### diff --git a/httemplate/view/svc_pbx.cgi b/httemplate/view/svc_pbx.cgi index 79cafed4d..a1afeb22c 100644 --- a/httemplate/view/svc_pbx.cgi +++ b/httemplate/view/svc_pbx.cgi @@ -1,6 +1,6 @@ <% include('elements/svc_Common.html', 'table' => 'svc_pbx', - 'edit_url' => $p."edit/svc_Common.html?svcdb=svc_pbx;svcnum=", + 'edit_url' => $p."edit/svc_Common.html?svcdb=svc_pbx;svcnum=", 'labels' => \%labels, 'html_foot' => $html_foot, ) @@ -43,12 +43,14 @@ my $html_foot = sub { my $cdr_svc_method = $voip_pkg->option('cdr_svc_method') || 'svc_phone.phonenum'; - return '' unless $cdr_svc_method =~ /^svc_pbx\.(\w+)$/; + return '' unless $cdr_svc_method =~ /^svc_pbx\.(.*)$/; my $field = $1; my $search; if ( $field eq 'title' ) { $search = 'charged_party='. uri_escape($svc_pbx->title); + } elsif ( $field =~ /^ip\.(\w+)$/ ) { + $search = "$1_ip_addr=". uri_escape($svc_pbx->title); } elsif ( $field eq 'svcnum' ) { $search = 'svcnum='. $svc_pbx->svcnum; } else { |