Importing an Anytone AT-D878UV codeplug into AT-D578UV or AT-D168UV

To import a codeplug for Anytone AT-D878UV into the CPS for AT-D578UV or AT-D168UV, the only way is to export it to CSV from the AT-D878UV CPS and then import it. But for some strange reason, Anytone has decided to make the CSV formats slightly incompatible… Come on, Anytone. Why??? This bug/feature seems to be related to splitting Color Codes into RX and TX that was implemented in the 3.06 release of the CPS.

The import into the CPS for AT-D578UV or AT-D168UV will silently fail. No error message is displayed but upon investigation I discovered that the Color Codes for the DMR Channels were wrong (set to CC1 in all cases). I maintain a codeplug for AT-D878UV with almost 900 channels, so fixing this manually is not an option.

I use the latest CPS for all models, that is for AT-D878UV version 3.07, for AT-D578UV version 1.21 and for AT-D168UV version 1.06.

A workaround is to edit one of the column headers in the CSV file before importing. Which column depends if you are importing to AT-D578UV or AT-D168UV.

AT-D878UV -> AT-D578UVChange “RX Color Code” to “Color Code”
AT-D878UV -> AT-D168UVChange “TxCC” to “TxCc”

If you have found more incompabilities that needs to be handled, please let me know and I will add it to the article.

FreePBX/Asterisk missing DID; how to force DID on trunk

If you get a SIP account from a provider which isn’t really a trunk it can be configured as a trunk in FreePBX but DID on incoming calls is set to “s” so it is impossible to get an inbound route working.

The trunk in this case will only have one DID so a workaround is to set the DID “hardcoded” on the trunk in order to get the inbound route working.

Edit extensions_custom.conf and add something like this, but replace “123456789” with the DID you wish to set:

[custom-123456789]
exten => s,1,Noop(Setting DID to 123456789)
exten => s,n,Goto(from-trunk,123456789,1)

Now edit the trunk and go to the pjsip tab and enter custom-123456789 (replacing “123456789” with your DID) in the Context field.

Now all incoming calls in this trunk will get your desired DID and your inbound route will be able to catch them by the DID.

FreePBX extension receives call from wrong queue

It turned out that the extension earlier had been a dynamic agent for the queue, and it was logged in as an active agent for the queue when the extension was removed from the queue. This caused calls in the queue being sent to the extension still.

Solution: Edit the Queue, add the extension as a dynamic agent, call *45 from the extension (“agent logged off”), dial *45 again (“agent logged in”) and finally dial *45 one more time (“agent logged off”). Now edit the Queue again and remove the extension from dynamic agents.