[asterisk-users] Is there a smarter way to ban expensive calls in dial plan?

Chris Blunt chris.blunt at entropy-it.com
Tue Aug 1 07:16:04 MST 2006


Hi List, 

 

I need a bit of advice please.  I want to ban calls to expensive
destinations such as cell phones.

 

This is fairly simple here in the UK because all cell phone numbers begin
with a 7 where as all geographic numbers begin 1 and 2

 

Elsewhere this is different, take Andorra for example all numbers begin 376,
cell phone numbers are 3763, 3764 and 3765

 

So if I try the following dial plan my pattern always matches the first wild
card

 

Exten => _00376.,1,Dial(my iax terminiator) 

Exten => _003763.,1,Congestion 

Exten => _003764.,1,Congestion 

Exten => _003765.,1,Congestion

 

I seem to have been able to fix this with adding an x after the 6 in the
first extension to make the patterns all the same length and thus making a
better match with the blocked numbers.

 

Example: 

 

Exten => _00376x.,1,Dial(my iax terminiator) 

Exten => _003763.,1,Congestion 

Exten => _003764.,1,Congestion 

Exten => _003765.,1,Congestion

 

 

This is just so long winded, and you can imagine doing this for a huge list
of destinations.

 

If any one can suggest an improved or more efficient way of doing this, I
would be greatly appreciated!

 

Best regards

 

Chris 

 

--

 

Chris Blunt

Entropy IT Ltd

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060801/c141f780/attachment.htm


More information about the asterisk-users mailing list