I've always had a suspicion that my dial-peers are not functioning like I think they should, but haven't ever been able to prove it. Obviously this is somewhat of a minor issue since we're able to place/take calls without any serious problems, but when I look at the log it seems as though there is a lot of unnecessary "matching" going on. Another issue is that I cannot block certain incoming numbers as I'd like. I created the rules below:
voice translation-rule 6
rule 1 reject /^1234567890/
voice translation-profile BLOCK
translate calling 6
dial-peer voice 1011 voip
translation-profile incoming BLOCK
translation-profile outgoing OUT
voice-class codec 1
session protocol sipv2
session target dns:chcg.global.voip.mcleodusa.net
incoming called-number .
but the incoming translation profile is ignored completely. The call gets through without a hitch. I will attach a copy of my debug log and see if that makes sense to anyone. It does seem to be picking the correct dial-peer (probably based on the "incoming called-number ." line), but it doesn't reject the number. Strangely, if I change the rule to rewrite the incoming number to a blank string, this works. It blanks the caller ID on my end. So I know that the translation-profile is working to some degree.
Let me know what you're thinking. I can provide any extra logs necessary.