[SOLVED] Manually remove peer from database

My Freepbx install has been upgraded several times. It seems in one of those upgrades, several users/peers were kept in the database, but don’t show up under Extensions or User Management module. This users are something like 99300 when the extensions where named 300-400.
They show up in the Freepbx Statistics and reports with Unkown status.
Is there a way to manually go into the database and delete this entries.
So far:

mysql> use asterisk;
mysql> show tables;

Is this right? Which table should have the entries and how do I delete just this entries.


Statistics or reports would not show any database entries. It is possible that someone tries to register an extension with bogus user names. It is possible if you have sip ports routed to you PBX server from WAN side.

If you want to access Asterisk database, you probably should do that from Asterisk CLI.

#asterisk -r
then you can enter “database show” and see what comes back.

can you copy paste a few lines from one of the reports you are referring to?

Extensions with 99 prefix are generated when you have enabled webrtc for the extension in question. Disable webrtc in User Manager, UCP and they should go away.

1 Like

@Igaetz, there are no users now in the 300-400 range, as I deleted those some while back and replaced users for a single digit extension. What remained were those 99 users I can not get rid of.
Here is what Asterisk Info> Peers shows:
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
99300 (Unspecified) D No No A 0 UNKNOWN
99310 (Unspecified) D No No A 0 UNKNOWN
99315 (Unspecified) D No No A 0 UNKNOWN

@kgbeast, with the “database show” I get this:
/DEVICE/99300/default_user : 300
/DEVICE/99300/dial : SIP/99300
/DEVICE/99300/type : fixed
/DEVICE/99300/user : 300
/DEVICE/99310/default_user : 310
/DEVICE/99310/dial : SIP/99310
/DEVICE/99310/type : fixed
/DEVICE/99310/user : 310
/DEVICE/99315/default_user : 315
/DEVICE/99315/dial : SIP/99315
/DEVICE/99315/type : fixed
/DEVICE/99315/user : 315

I don’t think this is an intrusion, as these were actual extensions I used. They are created in the sip_additional.conf but if I manually delete them, they are recreated when I use the GUI so I need to delete them from the database first.

Any instructions to delete them without messing the database?


These are WebRTC users as lgaetz said.

I do not think you can delete from /DEVICE/ tree using Asterisk CLI. The easiest would be to uninstall WebRTC module using the “Module Admin” app in “Admin Menu” of your FreePBX web interface. It will delete all 99XXX users. You can reinstall it back if you plan on using it, it will not bring these back.

Yeap, that did it. Thanks kgbeast.