[Asterisk-Users] limit the length of extensions

Lyle Giese lyle at lcrcomputer.net
Tue Aug 31 09:15:26 MST 2004


You limit them by context.  You put your outbound dialing patterns in a
context that inbound callers cann't access.

Lyle

----- Original Message ----- 
From: "Deon Rodden" <drodden at webunited.net>
To: <asterisk-users at lists.digium.com>
Sent: Tuesday, August 31, 2004 9:05 AM
Subject: [Asterisk-Users] limit the length of extensions


> How do I limit the length of an extension? In my test IVR/Automated
> Attendant (whatever it's called), at the beginning it plays "if you know
> your parties 3 digit extension, you may enter it now) and then it gives
> a list of options. If the caller puts the 3 digit extension, it goes
> through fine, if they press 1, or 2 it goes to the selected menu option,
> but if they dial 91235551212 it dials that phone number. Which of
> course, is a big security risk.
>
> Is there a way to limit the length of an extension for an incoming call?
> My only solution right now is to duplicate ever single extension (about
> 50 of them) in a seperate context, one that does not have the _9.
> extension in it, and then make the call in menu have access to that
> context.  However, if I put a limit in the entire context of 3 digits,
> then my coworkers who's phones are in that context can only dial each
> other, not 9 and an outside number. So it has to be an incoming limit or
> something.
>
> Another possibly creative solution would be to "SetGroup(outsidecaller)
> on the incoming line" and then just before my outbound extension put
> "SetGroup(outsidecaller) and then a CheckGroup(2)" or something like
> that.  I'd have to put another "SetGroup" in the outbound extension
> because there's no way to specify the group with the checkgroup command,
> it gets it from the setgroup statement.
>
> Any help would be appreciated.
>
> Thanks,
> Deon
>
>
>
> [incoming]
> exten => 9543340726,1,GotoIf($[${CALLERIDNAME} = anonymous]?2:4)
> exten => 9543340726,2,setcidname(Blocked)
> exten => 9543340726,3,setcidnum(0000000000)
> exten => 9543340726,4,Goto(companyname,beginmenu,1)
>
> [companyname]   ; All the phones, including outbound extensions are in
> this context
> exten => beginmenu,1,SetVar(CALLEDNAME=CompanyName)
> exten => beginmenu,2,Wait,1
> exten => beginmenu,3,Background(company-main)
> exten => beginmenu,4,Background(ifyouknow)
> exten => beginmenu,5,Goto(company_mainmenu,s,1)
> exten =>
> _9NXXNXXXXXX,1,Dial(IAX2/company-asterisk at outbound-asterisk/${EXTEN:1})
> exten => 502,1,Dial(SIP/whatever1&SIP/whatever2|30|m)
> ...
>
> [company_mainmenu]
> exten => s,1,Background(company-nav1)
> exten => 1,1,Goto(company_sales,s,1) ; Sales
> exten => 2,1,Goto(companyname,502,1) ; Accounting
> exten => 3,1,Goto(companyname,508,1) ; Customer Care
> exten => 4,1,Goto(companyname,507,1) ; Technical Support
> exten => 5,1,Goto(companyname,202,1) ; Human Resources
> exten => 6,1,Goto(companyname,202,1) ; Provisioning
> exten => 7,1,Goto(companyname,214,1) ; Marketing
> exten => 0,1,Goto(companyname,210,1) ; Operator
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>




More information about the asterisk-users mailing list