Unable to delete trunk

Hi folks,
Recently I’ve gotten into an annoying problem; under Dashboard -> FreePBX Statistics, I see there is an offline trunk. I used to have two trunks from two different providers previously, for testing purpose, and a while ago I deleted one of them from Connectivity -> Trunks.

Although I deleted one of the trunks, FreePBX statistics it’s still showing that there is an offline trunk. I also see this deleted trunk under Reports -> Asterisk Info -> Channels -> Chan_Sip Channel(s).

Note that I can also see this deleted Trunk that is still under Database -> Tables -> Asterisk -> Trunks

Any clue what I should do in order to make sure I get rid of this unnecessary trunk? Maybe someone can tell me where is the trunk config file in the asterisk file structure?
Thanks!

I would probably just delete it from the mysql database, even though it may not be a supported method.

I’m not sure exactly what the command sequence would be but it should be something like
mysql
use {asterisk DB};
use {trunk table};
select * from {trunk table};
delete from {trunk table} where id={id of deleted trunk};

That’s actually what you need to do.

Thanks @BlazeStudios, been a while since I looked at the SQL level and didn’t have a system to test with :slight_smile:

You rock!

it worked perfectly! Thank you guys!

One additional comment I would add for other people that might want to reference,

delete from sip where id=‘tr-peer-{id of trunk}’;
single quotation marks need to the added after id=

Thanks again

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