Accountcode field not updating

Latest FPBX 16 fully updated. I am using the accountcode field in PJSIP extensions. I noticed it is no longer updating for some reason. It is a 10 digit phone number. No dashes or other characters. It continues to show in the UI but is not being saved in /var/lib/asterisk/astdb.sqlite3 for some reason.

I see the timestamp on the file updating when I submit my changes but the accountcode is not being updated. I can change other things in the db from the FPBX UI, such as dial, and see it get updated in the db immediately on submit, but accountcode does not.

I am watching the db directly from the asterisk cli and also confirmed by looking at the file using DBbrowser, making sure to close the file from within that program and reset permissions as needed. I set the permissions to 777 to make sure that is not a factor.

Asterisk cli commands to view the db are as follows.

database showkey accountcode
database put AMPUSER/xxx accountcode NXXNXXXXXX

where xxx is my extension and NXXNXXXXXX is the phone number I am trying to enter. I can enter the accountcode into the db directly that way but I can’t do it from the Freepbx UI even though the UI remembers the number on refresh, so the UI is saving the number somewhere and remembering it, but it’s not being saved in the astdb where it belongs. Maybe I am missing something obvious idk.

Looks like some work was done recently to add the account code to virtual extensions. The initial request was under [FREEPBX-21360] Add Accontcode to Virtual Extensions - Sangoma Issue Tracker, not sure if the work done here had any impact on this.

Pinging @franckdanard

Hi
Nothing bad here.
I set 02123123123 in the accountcode for the extension 113.

[root@freepbx asterisk]# asterisk -rx "database show " | grep “123123123”
/AMPUSER/113/accountcode : 02123123123

[root@freepbx asterisk]# grep -ir “123123123” *
pjsip.endpoint.conf:accountcode=02123123123
pjsip.endpoint.conf:accountcode=02123123123
pjsip.endpoint.conf:accountcode=02123123123
[root@freepbx asterisk]#

Looks good for me.

This appears to be the commit that breaks it.

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

When I do fwconsole ma downloadinstall core --tag 16.0.68.3 it starts working again.

I am not using bulk handler module to add accountcode. I am doing it in the extension settings.

1 Like

What version of core are you seeing this issue. I can’t repro it with core 16.0.68.8.

1 Like

The latest version I see and the one that relates to [FREEPBX-23976] Bulk Import Set Empty Account Code in Asterisk Db - Sangoma Issue Tracker

So that would be 16.0.68.4

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