Error on Adding new system recording

Hi,
Using FreePBX 14.0.13.23
I am trying to add a new system recording.
The filename is ‘+2105897854’ but a get an error on submiting
“Undefined index: playback
File:/var/www/html/admin/modules/recordings/Recordings.class.php:330”
If i remove the ‘+’ sign then everything is working properly.
I need the ‘+’ sign in front of the filename.
Any idea how to fix this.
Thank you

@assos40
Hi There, Pls try to upgrade first your FreePBX modules to last version.
I think your Recordings module too old.

| recordings | 13.0.30.14 | Enabled | GPLv3+ |

On my test system i can reproduce your case without any error messages.

1 Like

Hi,
Have you tried to submit ?
The issue occurs after clicking the submit button.

@assos40,
Not sure. I can not reproduce any issue.
Pls try to update your PBX modules first. Then try again.

What is the your recordings module version.?

fwconsle ma list | grep recordings

Thansk.

| recordings | 13.0.30.13 | Enabled | GPLv3+ |

@assos40
You can see my first answer my module version. Try to update your PBX modules.

fwconsole ma refreshsignatures
fwconsole ma showupgrades
fwconsole ma upgradeall

Thanks.

Everything updated.
Still same error when submitting.
“An Error occurred trying to submit this document”
and then
“Undefined index: playback
File:/var/www/html/admin/modules/recordings/Recordings.class.php:330”

@snazir, in your screenshot, the filename does not start with a +

@assos40 may we know the reason you need this filename to start with a plus? Maybe we can come up with a better solution.

I need the ‘+’ sign because the DID of the incomming calls starts with it.
And i use in the dialplan ${FROM_DID} to play soundfiles.
Of course i could could store the soundfiles without the plus sign and use ${FROM_DID:1} ,
but this would give me other troubles.
Is there realy no way to start the filename with a plus sign ?

I also have the same issue when trying to save a file with a +

In this section is the problem

                    case "save":
                            $data = $_POST;
                            if($data['id'] == "0" || !empty($data['id'])) {
                                    $this->updateRecording($data['id'],$data['name'],$data['description'],implode("&",$data['playback']),$data['fcode'],$data['fcode_pass'],$data['language']);
                            } else {
                                    $this->addRecording($data['name'],$data['description'],implode("&",$data['playback']),$data['fcode'],$data['fcode_pass'],$data['language']);
                            }
                            if(!empty($data['remove'])) {
                                    foreach($data['remove'] as $file) {
                                            $file = basename($file);
                                            if(file_exists($this->temp."/".$file)) {
                                                    unlink($this->temp."/".$file);
                                            }
                                    }
                            }
                            return array("status" => true);
                    break;

Specifically, line 330 is this:

$this->addRecording($data['name'],$data['description'],implode("&",$data['playback']),$data['fcode'],$data['fcode_pass'],$data['language']); 

I don’t even know if it pays to fix this, as I’m not sure if Asterisk will be able to playback a file that starts with a +. But that’s just something that needs to be tested.

You may want to report this as a bug.

1 Like

Asterisk IS playing back files that starts with a ‘+’ sign.
I think its definitely a freepbx issue,not allowing to add
system recordings with a filename starting with a ‘+’ sign.

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