Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Feedback
  3. CDR, no incoming record when answered from ring group

CDR, no incoming record when answered from ring group

Scheduled Pinned Locked Moved Feedback
6 Posts 4 Posters 212 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    P
    Porch
    wrote on last edited by
    #1

    If I answer a ring group call, the incoming call does not appear in the CDR of FOP2. If I need to go back and get the number of someone who just called me, I can't.

    The FreePBX CDR has the same behaviour, it just shows the call stopping at the ring group. However, if you export the data into a CSV file, the data showing what extension picked up the call is there.
    Since 99% of the calls goto a ring group, the FOP2 CDR only shows outgoing calls for most of the extensions, so it's near useless.

    Can FOP2 be changed to pull the final extension and use that information?

    Thanks

    1 Reply Last reply
    0
    • P
      P
      Porch
      wrote on last edited by
      #2

      I patched the code so the CDR works as expected.

      --- showcdr.php.backup	2014-01-02 14:18:11.000000000 -0800
      +++ showcdr.php	2014-01-02 16:23:48.135836816 -0800
      @@ -161,7 +161,8 @@
       $grid->set_pk('uniqueid');
       $grid->add_structure('number', 'text',null,'');
       $grid->salt("dldli3ksa");
      -$grid->set_fields("calldate,IF(dst='".$extension."','inbound','outbound') as direction,IF(dst='".$extension."',src,dst) as number,duration,billsec,disposition,uniqueid");
      +$grid->set_fields("calldate,IF(dst='".$extension."' OR dstchannel LIKE 'SIP/$extension-________' ,'inbound','outbound') as direction,IF(dst='".$extension."' OR dstchannel LIKE 'SIP/$extension-________' ,src,dst) as number,duration,billsec,disposition,uniqueid");
      +
       $grid->hide_field('uniqueid');
       $grid->no_edit_field('uniqueid');
       $grid->no_edit_field('number');
      @@ -174,11 +175,11 @@
       $mifilt = $_REQUEST['filterdir'];
       
       if($mifilt=="") {
      -    $condstring ="(src='$extension' OR dst='$extension') ";
      +    $condstring ="(src='$extension' OR dst='$extension' OR dstchannel LIKE 'SIP/$extension-________' OR channel LIKE 'SIP/$extension-________') ";
       } else if($mifilt=="inbound") {
      -    $condstring ="(dst='$extension') ";
      +    $condstring ="(dst='$extension' OR dstchannel LIKE 'SIP/$extension-________' ) ";
       } else {
      -    $condstring="(src='$extension') ";
      +    $condstring="(src='$extension' OR channel LIKE 'SIP/$extension-________' ) ";
       }
       
       $customboton="<div class='fbutton'>
      @@ -211,6 +212,7 @@
       
       
       $grid->set_condition($condstring);
      +
       /*
       $fieldname = Array();
       $fieldname[]=trans('Unique ID');
      
      
      
      1 Reply Last reply
      0
      • P
        P
        Porch
        wrote on last edited by
        #3

        For 2.27

        --- showcdr.php.backup2.27	2013-11-11 07:32:18.000000000 -0800
        +++ showcdr.php	2014-01-12 22:06:09.312426112 -0800
        @@ -164,7 +164,7 @@
         $grid->set_pk('uniqueid');
         $grid->add_structure('number', 'text',null,'');
         $grid->salt("dldli3ksa");
        -$grid->set_fields("calldate,IF(dst='".$extension."','$transinbound','$transoutbound') as direction,IF(dst='".$extension."',src,dst) as number,duration,billsec,disposition,uniqueid");
        +$grid->set_fields("calldate,IF(dst='".$extension."' OR dstchannel LIKE 'SIP/$extension-________' ,'inbound','outbound') as direction,IF(dst='".$extension."' OR dstchannel LIKE 'SIP/$extension-________' ,src,dst) as number,duration,billsec,disposition,uniqueid");
         $grid->hide_field('uniqueid');
         $grid->no_edit_field('uniqueid');
         $grid->no_edit_field('number');
        @@ -177,11 +177,11 @@
         $mifilt = $_REQUEST['filterdir'];
         
         if($mifilt=="") {
        -    $condstring ="(src='$extension' OR dst='$extension') ";
        +    $condstring ="(src='$extension' OR dst='$extension' OR dstchannel LIKE 'SIP/$extension-________' OR channel LIKE 'SIP/$extension-________') ";
         } else if($mifilt=="inbound") {
        -    $condstring ="(dst='$extension') ";
        +    $condstring ="(dst='$extension' OR dstchannel LIKE 'SIP/$extension-________' ) ";
         } else {
        -    $condstring="(src='$extension') ";
        +    $condstring="(src='$extension' OR channel LIKE 'SIP/$extension-________' ) ";
         }
         
         $customboton="<div class='fbutton'>
        
        
        1 Reply Last reply
        0
        • C
          C
          Carlos
          wrote on last edited by
          #4

          Hey,

          I too was looking for this functionality, and Nicolas recommended me to try out your modifications.

          After patching the code it now works perfectly. Thanks a lot!

          Carlos

          1 Reply Last reply
          0
          • S
            S
            SolarW
            wrote on last edited by
            #5

            Anybody test this patch with current FOP2 (2.28)?

            1 Reply Last reply
            0
            • N
              N
              nicolas
              wrote on last edited by
              #6

              FOP 2.28 includes part of the patch, you will only need to change the condition bits:

               } else if($mifilt=="inbound") {
                  $condstring ="(dst='$extension' OR dstchannel LIKE 'SIP/$extension-________' ) ";
               } else {
                  $condstring="(src='$extension' OR channel LIKE 'SIP/$extension-________' ) ";
               }
              
              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups