Adding trunks error

I am trying to add a trunk. It seems to me that there must be an error in the database from a previous failed attempt to make a trunk, however I can’t figure out how to delete it so I can continue setting this up

here is a screen shot from my machine
Thanx in advance

I found this in the community

Problem solved. After duplicating & deleting a trunk, for some reason the sip table kept some data from that trunk, and didn’t allow anything else to be added to the table. Deleted the “phantom trunk” via CLI, everything worked fine since. Our tech that fixed it says he found the issue in in /var/www/admin/modules/core, line 6044, if this can be of any help

anyone able to help me do this. i did try to go into mysql and pack(dbase lingo) or rebuild the table trunks but no help

any Ideas

I’m going to guess that you need to update your system to the current code. If you are on the most recent modules, then you need to submit this as an issue.

If you want to try to delete the entry yourself, you can access the FreePBX database (I think it’s called “freepbx”) and look in the ‘sip’ table. You should be able to delete the entry from mysql using the command [delete from sip where id = “tr-peer-3-account”]

You may be able to delete the entry from asterisk using the CLI (asterisk -vvvr). The command structure varies from version to version, but there should be a command like “sip delete trunk tr-peer-3-account”. To figure out the exact order and command, you can use Asterisk’s built in command completion: “sip ?” will give you all of the SIP subcommands, Look for “trunk” or “delete”. Just keep moving forward through there.

Maybe it helps somebody. I have similar issue and fix it by modifying mysql (btw my system is ubuntu 16.04, asterisk 14, freepbx 13).
So in ubuntu terminal write:


then in mysql console:

use asterisk

select * from trunks;

and add row in database where change ‘49’ with next trunk id from your list.

INSERT INTO trunks (trunkid,name,tech,outcid,keepcid,maxchans,failscript,dialoutprefix,channelid,usercontext,provider,disabled,continue) VALUES (‘49’,‘trunkname’,‘sip’,‘trunkname’,‘on’,‘1’,’’,‘7’,‘trunkname’,’’,’’,‘off’,‘on’);


after you can edit/add/duplicate trunks in freepbx gui or delete this one wich you create manually in mysql

This solution works well for me so maybe helps someone else.