zachz
February 13, 2023, 5:46pm
#1
I can access all but one of my extensions for some reason. I get the error “trim(): Passing null to parameter #1 ($string) of type string is deprecated at file /usr/share/vitalpbx/www/modules/hot_desking/Tabs/General.php on line 0” [SCREENSHOT ATTACHED]
Any idea how to fix this? This one extension is the only one with the problem, and it just so happens that it’s the extension I need to modify.
Thanks.
PitzKey
February 13, 2023, 6:07pm
#2
Can you please share any additional information?
-Was this a clean install or a restore from v3?
-Single or Multi Tenant?
-Anything special with this extension? Special characters etc?
-At which point does it throw this error?
Etc etc etc
zachz
February 13, 2023, 7:49pm
#4
Here’s some of the relevant entries from the DB. I removed names/passwords, but there wasn’t any special characters in those fields.
FROM THE EXTENSIONS TABLE
*************************** 1. row **************************
extension_id: 15
extension: 401
name: Name Removed
language: en
email: address@email.com
class_of_service_id: 1
dial_profile_id: 1
call_limit: 1
internal_cid: "name removed" <401>
external_cid: "removed" <1234567890>
emergency_cid: "removed" <1234567890>
ringtime: 0
nospy: no
enabled_pa: no
answermode: disable
mailbox: 401@vitalpbx-voicemail
accountcode: NULL
features_password: *894891
portal_password: NULL
sendcid: yes
generate_hints: yes
hot_desking: no
secretary: NULL
music_group_id: 1
rec_on_demand: no
internal_rec: no
outgoing_rec: no
incoming_rec: no
dictate_enable: no
dictate_format: wav
dictate_auto_send: no
absent_secretary: no
lock: no
call_waiting: no
dynamic_external_cid: no
cid_on_diversions: caller
pinless: no
dynamic_routing: no
tenant_id: 1
FROM THE DEVICES TABLE
*************************** 11. row ***************************
device_id: 17
extension_id: 15
profile_id: 1
user: 401
secret: removed
description: Name Removed
emergency_cid_name: NULL
emergency_cid_number: NULL
ring_device: yes
technology: pjsip
assigned_exten: 401
tenant_id: 1
vitxi_client: no
dispatchable_location_id: NULL
send_welcome_email: no
mobile_client: no
*************************** 19. row ***************************
device_id: 28
extension_id: 15
profile_id: 12
user: 401vitxi
secret: removed
description: Name Removed
emergency_cid_name: NULL
emergency_cid_number: NULL
ring_device: yes
technology: pjsip
assigned_exten: NULL
tenant_id: 1
vitxi_client: yes
dispatchable_location_id: NULL
send_welcome_email: no
mobile_client: no
zachz
February 14, 2023, 5:15pm
#5
Anyone have any idea on this? Is there a back-end way to delete an extension? I don’t mind just re-creating it?
PitzKey
February 14, 2023, 5:58pm
#6
I assume this is some error caused by the v3 → v4 migration. Best would be if the VitalPBX team can look at this so future migrations don’t bump into such issues. (They are probably OOO this week due to ITExpo)
However, you can try
vitalpbx fully-gen-conf
vitalpbx gen-conf
zachz
February 14, 2023, 6:05pm
#7
That does not seem to have worked. I’ll try a reboot tonight when nobody’s making calls.
PitzKey
February 14, 2023, 6:07pm
#8
How about
vitalpbx check-integrity
I doubt it’ll fix it since the error seems to be a PHP compatibility issue.
zachz
February 14, 2023, 7:52pm
#9
No luck. Do you know of a back-end way to delete an extension? I checked the API in postman and don’t see a method to do it that way. By the way, I can view all the data about that extension without issue, using the API.
miguel
February 15, 2023, 2:36am
#10
Check the content of the ombu_devices table.
zachz
February 16, 2023, 2:30pm
#11
This is what shows up for the user:
+-----------+--------------+------------+----------+---------------------------+-----------------+--------------------+----------------------+-------------+------------+----------------+-----------+--------------+--------------------------+--------------------+---------------+
| device_id | extension_id | profile_id | user | secret | description | emergency_cid_name | emergency_cid_number | ring_device | technology | assigned_exten | tenant_id | vitxi_client | dispatchable_location_id | send_welcome_email | mobile_client |
+-----------+--------------+------------+----------+---------------------------+-----------------+--------------------+----------------------+-------------+------------+----------------+-----------+--------------+--------------------------+--------------------+---------------+
| 17 | 15 | 1 | 401 | xxxxxxxxxxxxxxxxxxxxxxxxx | USERNAMEchanged | NULL | NULL | yes | pjsip | 401 | 1 | no | NULL | no | no |
| 28 | 15 | 12 | 401vitxi | yyyyyyyyyyyyyyyyyyyyyyyyy | USERNAMEchanged | NULL | NULL | yes | pjsip | NULL | 1 | yes | NULL | no | no |
+-----------+--------------+------------+----------+---------------------------+-----------------+--------------------+----------------------+-------------+------------+----------------+-----------+--------------+--------------------------+--------------------+---------------+
I noticed that the assigned_exten is NULL, is that the issue?
zachz
February 16, 2023, 2:31pm
#12
Nevermind about that NULL question, it seems all the vitxi devices have assigned_exten = NULL.
miguel
February 17, 2023, 10:35pm
#13
Are PJSIP devices the ones that are presenting the issue?
zachz
February 21, 2023, 1:16pm
#14
The extension with the issue has 2 PJSIP devices, a standard phone setup and then a vitxi setup. There are other extensions with this same setup that aren’t having any issues.
miguel
February 21, 2023, 2:36pm
#15
Check the content of the ombu_pjsip_devices table.
zachz
February 21, 2023, 2:42pm
#16
That was it! Thanks!
For some reason the ‘deny’ column for device_id 17 was equal to NULL. A quick update statement to 0.0.0.0/0 was enough to fix it. Thanks for all your help!