Extension account code not removing

Hi,
We added an account code to 7 extensions and then removed it from all extensions a few weeks later.
It has remained somewhere on 2 extensions and still shows up in CDR Reports with the accountcode.

I can see an issue that was resolved back in 2018 [FREEPBX-10623] Account code never deleted - Sangoma Issue Tracker

but has anyone else seen this or know of a workaround/fix, ideally without having to delete the extension and add the extension again?

If I search the asterisk database I do not see the accountcode listed anywhere.
asterisk -x'database show' | grep accountcode

pjsip.endpoint.conf also has no reference for an accountcode with either of the two extensions. (I understand the conf files are built from the database, so this makes sense)

The version was PBXact 15 with asterisk 16, so I upgraded to PBXact 16 with asterisk 18 last night, but it still has the same issues.

Does the ${CDR(accountcode)} variable get cached anywhere, or any thoughts where I could check next?

This system also has FOP2 and Asternic Call Center Stats Pro installed, but I believe the ${CDR(accountcode)} variable is an issue in PBXact rather than anywhere else.

All users use the Zulu program on the computers to dial out. Does Zulu making the call out give us anywhere else to check. I’ll get a deskphone connected to one of these extensions to later this evening to test.
In asterisk log files I can see the variable ${CDR(accountcode)} getting filled in with OutboundSales, which was the accountcode we are trying to remove. You can see its dialing out the Zulu extension 90209, which is the normal extension 209.

Set("PJSIP/90209-00000039", "QDIALER_QUEUE=OutboundSales") in new stack

Thanks
David

look for the extensions table in the MySQL DB and see if it populated there. If it is, remove it, then fwconsole reload and see if that set you set.

Hi,
I have looked through for anything to do with the extension 207, when you say extension, I assume you mean the AMPUSER as that is where i can see all the extension items.
This is the database search showing no accountcode in the database when accountcode is blank in the gui but still somehow gets added as a variable in CDRs.

[root@pbx asterisk]# asterisk -x'database show' | grep 207
/AMPDEV/207/parkingext                            : 70
/AMPDEV/207/parkinghint                           : park:71@&park:72@&park:73@&park:74@&park:75@&park:76@&park:77@&park:78@
/AMPDEV/207/parkinglot                            : default
/AMPDEV/90207/parkingext                          : 70
/AMPDEV/90207/parkinghint                         : park:71@&park:72@&park:73@&park:74@&park:75@&park:76@&park:77@&park:78@
/AMPDEV/90207/parkinglot                          : default
/AMPUSER/207/answermode                           : disabled
/AMPUSER/207/cfringtimer                          : 0

If I add OutboundSales as the account code for the extension and apply config, then the database does show the accountcode under AMPUSER/207/accountcode

[root@pbx asterisk]# asterisk -x'database show' | grep 207
/AMPDEV/207/parkingext                            : 70
/AMPDEV/207/parkinghint                           : park:71@&park:72@&park:73@&park:74@&park:75@&park:76@&park:77@&park:78@
/AMPDEV/207/parkinglot                            : default
/AMPDEV/90207/parkingext                          : 70
/AMPDEV/90207/parkinghint                         : park:71@&park:72@&park:73@&park:74@&park:75@&park:76@&park:77@&park:78@
/AMPDEV/90207/parkinglot                          : default
/AMPUSER/207/accountcode                          : OutboundSales
/AMPUSER/207/answermode                           : disabled
/AMPUSER/207/cfringtimer                          : 0

This is the Asterisk database. You need to connect to the FreePBX MySQL database. the entry is likely in there, under the 90207 extension.

Hi, thanks for the help so far,
Here is the output from the MySQL database

MariaDB [asterisk]> select * from sip where id='90207';
+-------+------------------------------+----------------------------------+-------+
| id    | keyword                      | data                             | flags |
+-------+------------------------------+----------------------------------+-------+
| 90207 | account                      | 90207                            |    52 |
| 90207 | accountcode                  |                                  |    18 |
| 90207 | aggregate_mwi                | no                               |    27 |
| 90207 | allow                        | ulaw&alaw&vp9&vp8&h264           |    17 |
| 90207 | avpf                         | yes                              |     9 |
| 90207 | bundle                       | no                               |    32 |
MariaDB [asterisk]> select * from sip where id='207';
+-----+------------------------------+----------------------------------+-------+
| id  | keyword                      | data                             | flags |
+-----+------------------------------+----------------------------------+-------+
| 207 | account                      | 207                              |    49 |
| 207 | accountcode                  |                                  |    21 |
| 207 | aggregate_mwi                | no                               |    29 |
| 207 | allow                        |                                  |    18 |
| 207 | avpf                         | no                               |    12 |
| 207 | bundle                       | no                               |    30 |

So, I thought I had found the fix by adding a new account code and removing it again, but I was testing with a desk phone. The issue is still there with a zulu user.
I installed Zulu on my PC and tested dialing out but it gave me no accountcode.
If the clients user dials out Zulu they get the accountcode added.
Could the accountcode be cached in the zulu program on their pc?

I’ll see if we can get Zulu uninstalled and reinstalled on their PC to see if it helps.

I could add a piece of dialplan to look for any accountcode matching the one we want to get rid of, and then set the account code to blank. This would be a temp fix, but ideally I would like to find the root cause.

Any thoughts?
Thanks
D

More info received
So it turns out these two users are using the User Control Panel to dial out, which calls their Zulu extension, they pick up the zulu call and it makes the outbound call. This is pulling the accountcode from somewhere.

If they just dial out directly from a deskphone or Zulu there is no accountcode.

Getting deeper in the rabbit hole.
D

Found it.
So what they were calling the User Control Panel was FOP2 user panel.
If I look at the FOP2 buttons, advanced, we can see the AccountCode with the old value.
So the issue isn’t with the PBX, it was with FOP2 all along.

I can manually delete the accountcode, but looking to see how to manually resync the updates and recreate buttons. From another post in 2014 i can see - fop2 manager cannot rebuild buttons automatically, so you will need to call the url/script manually.

Will come back with another update shortly if I can find a way to auto update them,
Thx
D

1 Like

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