Removing DID Inbound Numbers

All of a sudden, two of our DID inbound numbers showed up on our list with a - in front of them. We realized that these are DID numbers we had added in the Free PBX Admin panel a while back but we are no longer paying for those numbers. We ARE however paying for other numbers with the same area code and would like to add them to our list of Inbound DID numbers instead but we are unable to due to not knowing how to delete/remove these numbers and because those are still listed, we are not able to add new numbers with the same area code.
Please help with a step by step on how to remove these numbers–we have tried many things to do so and have been unsuccessful.

In any version of FreePBX just go to the inbound route module. Click on the entry to delete, click delete, the apply settings button will light, press it to commit changes to Asterisk.

We’ve already tried that. The difference between these particular numbers and our other numbers which are active and work fine is that they appear like this -5555555555 (obviously not all fives, but the minus sign is in front of the number and in the box that is for the “Description” it says “Not Created.”) We have not been able to delete these. We have also tried just replacing them with new numbers that we have purchased but the minus sign remains in front and the numbers do not activate.

This should do the trick, I would run a backup first. Just start mysql from shell as I did below and enter the two commands. Don’t forget the semicolon at the end of each mysql command.

[root@localhost /]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 231
Server version: 5.1.61-log Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> truncate table incoming;

I’m the sysadmin for the system in question, I can execute these commands, however I don’t see a reference to these problematic DID in the incoming table. Are you sure this will solve it?

Will the rest of the information in the table be restore automatically?

Well, two things. You said these are the only DID’s in the system (the broken ones) so no, truncating the table will keep the structure and dump the date.

It seems impossible to me that the module show incoming routes without anything in the incoming table.

What do you see if you do a (from mysql):

use asterisk;
select * from incoming;

Sorry if that was unclear, these problematic sip trunks don’t appears in the incoming table. There are around 90 inbound routes from our PRI and around another 20 from sip station

mysql> SELECT COUNT(extension) FROM incoming;
±-----------------+
| COUNT(extension) |
±-----------------+
| 106 |
±-----------------+
1 row in set (0.00 sec)

See the linked image for details of the issue (note the 2 with a - sign leading the number):

mysql> SELECT * FROM incoming WHERE extension LIKE “2146308080” OR extension LIKE “2137043687”;
Empty set (0.00 sec)

That’s not the inboud routes module what is that?

Yeah not the inbound routes, SIPSTATION™ Account Access Module

Hmm, it uses a different DB.

Have you put a ticket in on this?

Ok, opening a ticket on the SIPstation support section, thanks for your help, even though this is probably the wrong spot for this issue. Have a good one.