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

Martin Schrott - Thinking-Systems martin.schrott at thinking-systems.eu
Tue Aug 1 07:32:27 MST 2006


Hi, 

try to list the blocked numbers first! 
Then you should be able to use wildcards without a problem. :-) 
That was the solution for the same problem at our dialplan. 

hth 
Martin 

  ----- Original Message ----- 
  From: Chris Blunt 
  To: asterisk-users at lists.digium.com 
  Sent: Tuesday, August 01, 2006 4:16 PM
  Subject: [asterisk-users] Is there a smarter way to ban expensive calls indial plan?


  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

   



------------------------------------------------------------------------------


  _______________________________________________
  --Bandwidth and Colocation provided by Easynews.com --

  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
     http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060801/10fe659b/attachment.htm


More information about the asterisk-users mailing list