[Help] Inbound routing problem


Hello all,

I’m using *@Home 2.5. I’ve got everything working except indound routing. What I’m trying to do is have certian inbound numbers ring a ringing group while all others get the IVR. The CLID shows up in * as +nnnnnnnnnnn. I tried making an inbound using the exact number shown in the report and that didn’t work and I can’t delete that one for some reason - any ideas? Also, can a person use wildcards in the inbound route number? Any advice will be greatly appreceated!




don’t know why you can’t delete but you can setup wild cards for inbound routing. I usually setup my inbound routes in AMP as follows:


this would match that number


I use this to route extensions 200-229 on an inbound trunk from another asterisk box.


this would match any inbound did that starts with 773684 and has at least one or more digits.

so hopefully this gives you an idea of what you can do. (basically any of the pattern matching styles you can do with outbound routing you can set up here.)


p.s. if you are really stuck not being able to delete the inbound route you created (e.g. sure it is some sort of bug in AMP) you can delete the entries directly from the mysql database. Take a look at extensions_additional.conf to determine how many lines there are for the route you created. (Look at ext-did). I think they are all 2 lines (one sets the FROM_DID, the other does a goto). Now go to the ‘asterisk’ database and take a look at the ‘extensions’ table. You will want to delete the 2 corresponding rows in that table. Next, go to the ‘incoming’ table and delete the corresponding row there. You can do all this in phpMyAdmin.

I think this covers all the entries. You can then do something in AMP to force it to regenerate the tables (like go add a new incoming routing) and it should clean things up.

Please note - do this as last resort and make appropriate backups if you really can’t delete the incoming route you created.



Thanks for the reply!

So the _ is the wildcard? As an example if I wanted to route a number that show up in reports as +12187441564 I would create an inbound route of _2187441564 or say _218. for the whole area code?



Hi all,

One more question (besides the one above) regarding inbound routes. What field does the number go in, the DID Number field or the Caller ID Number field?




Hi all,

About deleting extensions, I removed the lines from extensions_additional.conf and the two rows from the extensions table in the * database but when I try to remove the entry from the incoming table I get the following error:

Fatal error: Call to undefined function: pma_dbi_try_query() in /var/www/html/maint/phpMyAdmin/libraries/check_user_privileges.lib.php on line 16

Any ideas on this one?




I’m a little confused. The OP wants to route the call based on the caller, yes? If so, that number is put in the CID field in the inbound routing screen.


Hi dswartz,

Sorry, I’m not trying to be confusing. I want to route the call by incoming nuber. I’m fairly new to telephony and PBX’s so I’m not sure what equals what yet and I just wanted to make sure I’m putting the right numbers in the right places. I’m thinking the DID field is if I had more that one inbound number, but I wanted to be sure.




No, the DID field is if you’re dealing with an inbound trunk that passes the number that was called, not the calling number! I’m not sure of some of the details cuz I’m at work - I’ll look at my AAH setup this evening and post an update…


Thank you!


I can’t see how to post an image here, but if you go to inbound routing, at the top of each inbound route, there is a DID field and a CID field. Set up one inbound route for each number you want to steer, and at the bottom, you can choose voicemail, an extension, etc…


OK, I tried setting up a new inbound route by putting _218. in the CID field and I set it to ring ring group one and it still goes to the IVR. What other syntax can I try?


sorry if you misunderstood, in the CID field i think it has to be a full number. dunno if there’s another way of doing this…


OK, the whole number is fine. The report showed a + sign before the incoming #. I added the + sign and it started working. However once I do that I can no longer edit or modify the rule with the + sign as per my previous post. However I found that if you edit the entry in the incoming table and remove the + sign manually you can then use APM to delete the route.

Are there any wildcards that can be used to replace the + sign? I have tried _ and . with no success.




Hi all,

I’m just wondering if the + sign is something generated in * or if it is sent from my voip provider (ZingoTel)? I can work around the + plus sign but if there is some way to remove it I think that would be better. Any ideas anyone?




The plus is from the telco.

AAH has a problem with + in some fields and I have posted a bug report so I hope it will be fixed soon. It has to do with how URL decode posted info back into fields and the + is a reserved character and was not being encoded so that it was not a reserved character so it tried to delete " x…" instead of “+x…” from MySQL. Since it is still in MySQL it gets put back into * when you save reload your aah config.

Hope this helps