CID-Superfecta, send-to-email does not populate incoming DID

Hi!

Since CID-Superfecta 14.0.14 the incoming DID is supposed to be available to send-to-email.

I have added the new [DID] placeholder to both the subject and body and it is not getting populated, does anyone know what might be wrong?

I am on the FreePBX 14 distro (12.7.5-1902-3.sng7) but this was an in-place upgrade from FreePBX 13 done when the script to do this was still in its infancy and with plenty of issues.

That said, I had tried to add this feature myself in the past and had not been successful. I was getting the same thing, an empty DID… Because of lack of time I did not investigate this further. I believe I was still running FreePBX 13 back then.

None of my test code is still there, I am running a fully updated distro with the latest publish CID-Superfecta and Edge mode is active for Module Admin.

Any ideas?

Thank you and have a nice day!

Nick

I forgot to mention something…

When I tried to do a yum update I had plenty of depency problem with libblockdev

Error: Package: libblockdev-fs-2.12-3.el7.x86_64 (@sng-base)
       Requires: libblockdev-utils(x86-64) = 2.12-3.el7
       Removing: libblockdev-utils-2.12-3.el7.x86_64 (@sng-base)
           libblockdev-utils(x86-64) = 2.12-3.el7
       Updated By: libblockdev-utils-2.18-3.el7.x86_64 (sng-pkgs)
           libblockdev-utils(x86-64) = 2.18-3.el7
Error: Package: libblockdev-mdraid-2.12-3.el7.x86_64 (@sng-base)
       Requires: libblockdev-utils(x86-64) = 2.12-3.el7
       Removing: libblockdev-utils-2.12-3.el7.x86_64 (@sng-base)
           libblockdev-utils(x86-64) = 2.12-3.el7
       Updated By: libblockdev-utils-2.18-3.el7.x86_64 (sng-pkgs)
           libblockdev-utils(x86-64) = 2.18-3.el7
Error: Package: libblockdev-loop-2.12-3.el7.x86_64 (@sng-base)

<snip>

I doubt this is related though…

Have a nice day!

Nick

Bonjour Nick.

This has been broken for a while, and is the same issues as is tracked in this ticket:
https://issues.freepbx.org/browse/FREEPBX-19194

I attempted to fix it some time ago, but couldn’t locate the issue. When time permits I will take another look. Issue appears to be with $trunk_info array in Superfecta.class.php.

Bonjour Lorne! :grinning:

It makes one wonder why this older ticket was recently (2 months ago) committed:

https://issues.freepbx.org/browse/FREEPBX-15699

The ticket does have a status of QA NEW so I guess it has not yet gone through QA…

I guess a “depends on” should be put on FREEPBX-15699 indicating that it “depends on” FREEPBX-19194…

I might try to take a look if time permits but I doubt I will find it if you didn’t as I nowhere know CID-Superfecta and FreePBX as much as you do and I rarely do any PHP (and only know the basics)…

Thank you very much and have a nice day Lorne!

Nick

Hmm, so my memory failed me once again. Ticket you linked was work I did about a year ago (1 yr exactly today), and it was fixed at the time, but now it’s broken again. Let me see if I can figure out why.

Locate the file:

/var/www/html/admin/modules/superfecta/sources/source-Send_to_email.module

and change this line from:

$from_did = $this->trunk_info['did'];

to:

if(isset($this->trunk_info['dnid'])){
    $from_did = $this->trunk_info['dnid'];
}

Assuming that works, update the ticket you identified with details.

Hi Lorne!

:rofl:, I usually spot weird things like that but this time I did not…

I must be getting old… :roll_eyes:

I tested your fix and it works perfectly here with my FreePBX 14 test machine/home server. :smile:

It would have been nice to have it return something like unknown if the field is empty but there is no easy way to go about it to make it translatable…

(I assume there is a reason why you wrapped this with a test of isset(), there must be a very real possibility of it being empty…)

I updated the FREEPBX-15699 ticket and set the “relates to” to FREEPBX-19194 so that, hopefully, both are fixed and closed at the same time…

Thank you very much and have a nice day Lorne!

Nick

We can easily create a field for user input to return a string if unknown. Add to ticket or it will slip my mind.

Doing a debug in the GUI where there is no live channel would trigger a whoops error.

Hi Lorne!

That was the only possibility I saw, the only way to make it customizable, but I did not know if it would be ok with you…

I am sure some people would like to have this made customizable.

Personally I no longer (try to) use FreePBX in anything but English and stopped contributing to French because there was no concerted effort of the people working on it to make consistent.

Many things bugged me when I used to contribute but the most infuriating one was by far when someone was changing a very good translation of someone else (not me) to something which made absolutely no sense…

The first translator had correctly identified what the English sentence meant and had properly translated it and the second translator, thinking he knew better, had “translated” it again but had clearly no idea of what the English sentence meant…

You better be pretty sure you know what something means before you replace what someone else has written…

After a while of seeing things like this happen over and over again I decided I had enough and stopped contributing. There are things all people have to do even when they don’t find them enjoyable to do and there are things you can stop doing when they are no longer are enjoyable to do, this was one of these things…

Done… :wink:

Yikes, a very good reason indeed!

Thank you very much and have a nice day Lorne!

Nick

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

@Marbled:

I have committed a fix here for the above and it works for me. Give it a test and let me know what I broke :slight_smile:.

1 Like

Hi Lorne!

This works perfectly, it handled everything I threw at it…

Thank you very much and have a nice day!

Nicolas

PS: It did make me realize that I had broken something on my home/test server… :wink:

(Well, something was broken, not sure if it was a misconfiguration on my part or a bug, I will try to track it down another time… It has nothing to do with the fix you did however so if you broke something as well I could not find it… :wink: )

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Hi @Marbled

It took a while, but the commits above have been published:
superfecta v14.0.25
superfecta v15.0.2.21

Thanks for the heads up that it was still outstanding.