Unable to register a phone on FreePBX server getting 403 forbidden response


I have recently installed a FreePBX 10.13.66-17 distribution PBX service pack and have been able to create a few extensions. All works good and the clients such as MicroSIP are able talking to each other unless I got to an analog phone which I connect via a VoIP enabled router having operator’s provisioning. My problem with the router is that the username (78122429873) is different from the authorization username (2429873) and I always get 403 forbidden error on registration regardless of what extension I create, either 2429873 or 78122429873 or both. The error message I get from the logs says:
check_auth: username mismatch, have <2429873>, digest has <78122429873>, or vice versa
check_auth: username mismatch, have <78122429873>, digest has <2429873>
I tried to simulate the issue with my MicroSIP software client and surprisingly I found that I can get registered only when the User and Login fields are equivalent. I did not find any configuration options on FreePBX giving me a chance to deal with different username and authorization username when creating extensions (no deal with trunks at all, only local numbers).

Does anybody know what the issue is and what could be a workaround?

Thanks in advance for your help!

After reading Google I have added match_auth_username=yes in SIP General Config and also put there allowguest=no. No help.

After reading more Google I found a workaround with making secret empty for every extension with Username/auth name mismatch. After that digest verification is disabled and the client gets registered successfully. It’s OK for a quick workaround, how about permanent solution though?

First off, why are the extension, username, and authorization names different? FreePBX works most effectively when those fields are all the same, specifically the username provided by the phone and extension by FreePBX. If the username and authentication name provided by the phone don’t match the extension, it will throw that error. It was one of the issues I encountered when setting up Agilent’s E6966A Client. All 3 fields had to be the same in order for E6966A to work, so I am assuming the same would apply to any client or phone.