Restrict outbound calls except for local ones

Discussion in 'General' started by anonymous.user, Aug 20, 2009.

  1. anonymous.user

    Joined:
    Aug 13, 2009
    Messages:
    3
    Likes Received:
    0
    Hey,

    Basically want I want to do is restrict certain extensions from calling outside numbers, except if it is local (68## ####)

    I have followed this guide, which has worked perfectly, except that extensions cannot call local numbers..

    What do I need to add to this code:
    Code:
    [custom-restricted-ext1]
    exten => 911,1,Noop(Allowing unrestricted 911 call)
    exten => 911,n,Goto(from-internal,${EXTEN},1)
    exten => _[*0-9]!,1,Noop(Using Call Restriction 1)
    exten => _[*0-9]!,n,Set(_RestrictedExt1=TRUE)
    exten => _[*0-9]!,n,Goto(from-internal,${EXTEN},1)
    exten => h,1,Hangup()
    
    [custom-restricted-trunk1]
    exten => _[*0-9]!,1,Noop(Testing for Call Restriction 1 ${RestrictedExt1})
    exten => _[*0-9]!,n,GotoIf($["${RestrictedExt1}" = "TRUE"]?restrict1:norestrict1)
    exten => _[*0-9]!,n(restrict1),Noop(Call blocked due to call restriction: 1)
    exten => _[*0-9]!,n,Playback(feature-not-avail-line,noanswer)
    exten => _[*0-9]!,n,Goto(app-blackhole,congestion,1)
    exten => _[*0-9]!,n(norestrict1),Noop(No call restriction: 1)
    exten => h,1,Hangup()
    So that any calls that have a '68' as the first two numbers (e.g. 6881 1111, 6882 1111 etc) are allowed?
     
  2. Megabyte

    Joined:
    Mar 28, 2009
    Messages:
    327
    Likes Received:
    0
    Try to include [ext-local]
    include => ext-local
     

Share This Page