I have been busy integrating Asterisk into NimbleBilling – take a look see and let me know what you think!
I stumbled upon this module last night when trying to delimit access to an outbound route per extension. I added a colleague to my PBX who had purchased an account at voip.ms; problem was when he would dial out it would always display my Caller ID and use my trunk (which is bad if he dials international). I guess this is a frequently asked question so I created a video demonstrating the great power of this module – you will be surprised how easy creating permissive contexts can be This video will show you how to install the module and limit access to outbound routes / trunks per extension. The goal is to partition an Asterisk IP PBX in order to host multiple tenants on one system.
The following information is from this site. Please check it out for download link and changelog / usage.
Possible Uses
- Restrict access to certain outbound routes or feature codes by a particular extension or group of extensions.
- Give particular extension(s) priority access to certain outbound routes, such as a particular emergency route associated with their geographic location.
- Give certain outbound routes top priority for use during “free” or low cost calling periods, while making those same routes lower priority (or disallowing access entirely) during higher cost time periods.
- Disallow access to outbound routes (with possible exception of Emergency access) to certain (or all) extensions during particular time periods (don’t let night cleaning crew make long distance calls, or disallow outgoing night calls from telephones in children’s rooms, while still allowing emergency number calls).
- Allow two or more families/companies/organizations to use the same FreePBX box, while still allowing each to have access only to “their” outgoing routes and trunks.
- If you have a SIP provider that does not send DID (normally a pain to handle because you can’t create a normal Inbound Route), set up a new custom context (call it idiot-provider), give them no access to anything (deny all), and then specify where you want their calls to go in the Failover Destination. Then put context=idiot-provider in that provider’s trunk user details.
Module Description
One feature which was a bit lacking in Asterisk/FreePBX was the ability to easily create multiple tenants.
This module creates custom contexts which can be used to allow limited access to dialplan applications.
Now allows for time restrictions on any dialplan access!
This can be very useful for multi-tenant systems.
Inbound routing can be done using DID or zap channel routing, this module allows for selective outbound routing.
House/public phones can be placed in a restricted context allowing them only internal calls.
Custom contexts can now be used as destinations. An IVR menu, Time Condition, etc. can now send a caller into a custom context. This feature requires FreePBX 2.2.0rc2 (or the latest SVN version if prior to the release of rc2)
(The following are the module author’s comments, “I” refers to the module author, not the original creator of this wiki page).
A number of improvements have been made to freePbx to handle multiple tenants.
1) inbound routing based on zap channel – i used to have to hack it by putting each zap channel in its own context.
2) authtype = database allows for dividing extension ranges
the main problem for me was outbound routing…
I wanted some extensions to dial out one route, and others out another route.
I had to create a custom context for each, then place each in their own custom context, then include all of the contexts which they should have access to. This became a nuisance as each module added its own context to from-internal-additional which could not be included as it also contains outbound-allroutes.
The purpose of this module is to dynamically list all contexts included in any contexts you choose, and allow you to create custom contexts which can include any of these all without config editing.
Being woken up several times throughout the night from anonymous calls is not fun. Here is a screencast (shot with my shiny new MacBook) that explains how to delimit these annoying calls while still being able to route incoming SIP calls from Gizmo and IPKall to their appropriate destinations.
Here is the code I used to allow IPKall incoming SIP connections :
[ipkall]
disallow=all
host=66.54.140.46
context=from-trunk
insecure=port,invite
qualify=yes
type=peer
dtmfmode=rfc2833
allow=ulaw
nat=no
[ipkall2]
disallow=all
host=66.54.140.47
context=from-trunk
insecure=port,invite
qualify=yes
type=peer
dtmfmode=rfc2833
allow=ulaw
nat=no
I guess tonight while packing I had a few too many cups of coffee so I was obviously wired and decided to sit down and write some code. I ended up writing an XMPP / Jabber relay for ENUMPlus which I must say works pretty damn good. Setting this all up is a three step process ;
- Create an account / Login to enumplus.org and click “Notifications”. Input your XMPP user account in the form and press “Send Me Notifications!”.
- Copy the provided dialplan addition and paste it into /etc/asterisk/extensions_custom.conf. Reload your dial plan of course with asterisk -rx “dialplan reload”.
- Add enumplus@gmail.com to your buddy list and test it out!
Here’s a screenshot to get started.
Anyway, go get signed up and test it out for yourself – it is a ton of fun!
Haven’t read this article yet? Read it!
Well I just received an invite to Google Voice and I must say I was quite upset to discover that it is not yet available in Canada… nonetheless I had a socks box in Cali so I tunnelled my registration and was ready to rock.
For those of you unfamilliar with Socks – it basically pushes all requests through a secure connection on a remote system and is quite simple to do – take a look at my “How to Watch American TV in Canada” post from a while back.
Once I was in I ran into another little snag, you can not set your call-in number to an international DID (in my case a Canadian DID). So I just pointed them to my free IPKall number and was really cooking with gas (you too can get a free IPKall DID at ipkall.com).
For those of you anticipating an invite yuo can expect the usual Google UI (thank god (I adore simplicity)), you can also look forward to transcribing your voicemail messages to text – and have them emailed. This functionality has been lacking in Asterisk which is why I believe this is going to drop a nuke on the Asterisk devs to get this module out – so support your * developers will ya!
I’ve really only done minimal “tire-kicking” but I expect this could have many telcos shaking in their boots. Not only is it super feature rich, sociable and ridiculously easy to use – it is backed by a company who has provided extremely reliable services since day one.
It is interesting to see the callout function implementation. There have been plenty of callout scripts for Asterisk (which pretty much work exactly the same – Asteristickies is one of ‘em) but once again Google has made it that much friendlier. Callout is a dialing function when you input a number to call, it connects to you first – then dials the remote party.
SMS is a joy! I was lucky enough to have my sister visiting this week with her unlimited text messaging plan. I popped open the SMS box and we were sending messages with ease instantaneously. I especially love the contact manager. Being able to maintain a list of contacts with click to call functionality is a very powerful feature.
Anyway, I am very excited to play with my new toy – feel free to give me a ring at
(361)-GEEK-HUT
Heh… or use this thing



