Member
Last active 10 years ago
The module has been fixed. Download in this post.
http://pbxinaflash.com/community/index. ... cta.12531/
Can I swap around the CID and name for calls in the extension button? The name of the caller is more useful then the phone number for me.
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'>
That does give me a good start. Thank you.
Just wondering if there is a way to have FOP2 show the DND status when using the Aastra scripts?
Pressing the DND button does not update FOP2 and changing FOP2 does not update the phone.
It works fine if I use the *7x feature code.
The Aastra scripts are just PHP. So if I can get some type of hook to update FOP2 from the command line, I could make it work. Or force it to check Asterisk for the DND status.
In addition, I need to call the Aastra PHP script when someone changes the FOP2 status, so I need a hook for that.
Any ideas where I can look?
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');
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
If you downloaded Superecta 2.2.6.1 from git, then it works fine.
It's the 2.11 branch that comes with FreePBX directly that fails.
I have posted in the PIAF form here.
http://pbxinaflash.com/community/index. ... ecta.12531
Also, here is the current version.
https://github.com/POSSA/Caller-ID-Superfecta/wiki
Superfecta was installed with PIAF by default. I didn't install it by hand. I figured the FOP2 module was installed by fop2admin.
I did some debugging, and the sql query is done correct and returns results, so my database information is correct. But because $run_param['CNAM_Type'] is not set, the results are not formatted and it does not output anything. But that is an easy fix.
As for the DB_Error, enable the FOP2 option and set it at the very top. Then enable Trunk Provider and set it below FOP2. Save, then run a debug test. It will fail with that DB_Error. I don't see anything wrong with the code, but it's like something related to the database is not reset right.
I need caller ID information pulled from the FOP2 address book, and if that fails, from the trunk information. Since Superfecta failing me, can you suggest another option?
Thanks for the help.