Cant access a certain extension after migrating to v4. (trim Error)

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.

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

  • I just recently migrated from v3 to 4.
  • Single tenant, starter license.
  • The only thing special about this extension, from what I can tell, is that it’s the only one with Follow-Me set up.
  • This error pops up right after I click on the extension in the list of them.
  • I don’t see any relevant logs in the apache logs, or mysql.

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

Anyone have any idea on this? Is there a back-end way to delete an extension? I don’t mind just re-creating it?

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

That does not seem to have worked. I’ll try a reboot tonight when nobody’s making calls.

How about

vitalpbx check-integrity

I doubt it’ll fix it since the error seems to be a PHP compatibility issue.

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.

Check the content of the ombu_devices table.

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?

Nevermind about that NULL question, it seems all the vitxi devices have assigned_exten = NULL.

Are PJSIP devices the ones that are presenting the issue?

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.

Check the content of the ombu_pjsip_devices table.

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!