fix PBX in a non-voip package, fallout from RT#16723
authorIvan Kohler <ivan@freeside.biz>
Sun, 19 Jan 2014 01:20:20 +0000 (17:20 -0800)
committerIvan Kohler <ivan@freeside.biz>
Sun, 19 Jan 2014 01:20:20 +0000 (17:20 -0800)
httemplate/view/svc_pbx.cgi

index a1afeb2..ff0d285 100644 (file)
@@ -41,7 +41,7 @@ my $html_foot = sub {
   }
   my $voip_pkg = @voip_pkgs[0];
 
-  my $cdr_svc_method = $voip_pkg->option('cdr_svc_method')
+  my $cdr_svc_method = ( $voip_pkg && $voip_pkg->option('cdr_svc_method') )
                        || 'svc_phone.phonenum';
   return '' unless $cdr_svc_method =~ /^svc_pbx\.(.*)$/;
   my $field = $1;