Taking the Call - From an Outside Call Asterisk to an Inside User

As I described in a previous post, I've been planning out my Asterisk deployment for my home. I actually made up a requirements-style document that describes my needs and expectations. A lot of this should be doable on the first pass but some features will have to wait. Here's the basic goals I've come up with so far: For any known user
  • A user will get a 2-digit extension number they can be reached at. The numbers reserved for this are in the range from of 60 to 79.
  • A user can log in easily:
    • Partial authentication if Caller ID is available and recognized (maybe not necessary?)
    • Login by dialing 1 <extension> <password>
  • A user can dial in and access voicemail, place calls or create meetings (any other features?)
  • Note that passwords may be different for different for different subsystems. Asterisk doesn't seem to have one global concept of a user, so there are several ways to authenticate, including voicemail, DISA and homemade approaches.
This is almost straight out of the wiki I used for planning (I've changed some details so as not to give away my passwords & stuff). I marked the Caller ID thing as maybe unnecessary because I think I found a really easy way to log in. I don't know how I'd make it easier with Caller ID. Caller ID can spotty and apparently be spoofed, making me much less interested in making system access decisions with it. I chose two-digit extensions since they are quick to enter, easy to remember and should make it simple to match an extension. They also make it easy to create a pairing of an extension that's used as a destination for a phone call with an extension that's treated as a login attempt. I think I should be able to make an extension 65 which someone can use to call me and a corresponding extension 465 which I would dial to log in and access additional features. Asterisk wouldn't know necessarily know or care that the two are related (depending on how I write my conf files) but the humans involved have an easier time remembering. As for features, I think out-calling, voicemail and conference calls are a good start. These are my primary targets. In my later notes I've included some other stuff about call forwarding and phone books, but that's secondary. So when you're making a plan in unknown territory, sometimes it's easiest to start at the beginning. When I wrote up my requirements I started with cool features, but now that I'm ready to try to implements something I'm looking at what should happen in the beginning. Someone outside (an unknown caller) calls my number and Asterisk answers the call. What happens next?
  • Unknown caller dials in from an outside number.
  • Caller is presented with a short list of menu options via recorded message: "Enter the extension of the party you wish to reach or press 2 for a list of extensions." This is called the 'guest menu' or G.
  • One or Two digits can be entered at the guest menu.
  • A known extension (77, 63, 71, 72)
    • 77 - Rob (known extension)
    • 63 - Alex (known extension)
    • 71 - Candace (known extension)
    • 72 - Jeff (known extension)
  • Guest menu Option 2 - a partial list of known extensions will be provided. This list will only include users who arbitrary outside callers should be allowed to call. Probably just Rob.
  • An unknown extension - this will cause the caller to be returned to the guest menu.
  • hangup - system logs the call and hangs up
  • Guest menu option 4 - attempt login. the caller can press 1 followed by an extension then the login password for that extension. For example, if there were an extension 65 with password 4444 then the user with that extension could dial in and at enter 4654444 as soon as the guest menu started playing. This would log user 55 in to the system. Once a user is successfully logged in to the system, they are no longer presented with the guest menu and are presented with the main menu as described under "Known caller".
  • Up to 3 failed logins are allowed before the system hangs up and logs the failed attempt.
Again this comes from my planning wiki with a couple names & numbers fixed. When the phone number is called, Asterisk will answer. That part's covered thanks to Les.net and sip.conf. When it answers a message will be played. This part is simple and the sample config files have examples. After the message there are basically three things that the caller can do.
  1. They can get a list of extensions that connect to users. The list isn't necessarily complete, maybe some people are in it and others aren't. While the list is being given Asterisk has to be able to input. After the list is given, if there is still no input then Asterisk will wait a while (one minute?) for two acceptable digits then it will hang up.
  2. They can call an extension. Asterisk will try to connect the call and if it fails then it will send the caller to the user's voicemail to record a message. I want to have more complex follow-me logic in here, but that's not planned for the first pass. I'll just ring one number for 10 seconds, then maybe another number, then voicemail. This should be almost the same as the standard extension macro.
  3. The caller can attempt to log in as a known user of the system. Note that this wasn't in the recorded message. This should reduce hack attempts (which I'd guess would be exactly 0 if I weren't posting this on the Internet). This option is the way to get from what I call the 'guest menu' in to the 'main menu'.
I haven't described every error condition possible on these menus. I'm not sure, but I think the main case is just an invalid extension. Asterisk provides a special standard extension, i, to handle invalid extensions. In the invalid case we can just send them back to the main menu and (maybe later I could keep a count and kick them off after 10 failed attempts to avoid potential malicious behaviour). What I've described here makes sense as an interface to present to outside users of the system. Once someone logs in as a known user they'd have the other options I mentioned earlier (out-calling, voicemail and conferences) will be available as part of another menu that I call the 'main menu'. I'll describe what the main menu available to known callers does in another post real soon now.
0
Your rating: None