I needed to route outbound calls based on the location of the extension. I also needed to route emergency calls to different trunks from the normal outgoing calls.
I could have accomplished this using a custom context and 2 outgoing routes for each group of extensions. However the complexity of configuring and maintaining it seemed excessive.
So I created a new module for FreePBX 2.3 (it may work on 2.2, I haven't tested it). I've enclosed a copy below of the description from the release notes.
This is alpha code and should be tested to ensure it works in your environment.
Also the usual caveats about emergency calls apply. I'm not responsible if your emergency calls aren't routed correctly due to bugs in this software.
The module's page is: http://gforge.opensource-sw.net/projects/outgroups
Module Description
This is an add-on module for FreePBX version 2.3. It allows outbound routing based on the extension used for dialing.
Membership in an Extension Group can be either ad hoc (manual selection for each extension) or determined using a regular expression which matches against the extension number.
Outbound routes are specified using trunks. A trunk-specific prefix and / or suffix can be added to the number before dialing.
Emergency Call dialing (911 in North America) is fully configurable for both number and route. The only limitation is that the emergency number users dial itself is global although the number to dial out the trunk may be overridden in each group.
Here is a screenshot of the configuration page:





Hi,
Hi,
this looks to be just what I need, thanks.
I have a customer setup where the business shares a common system but is split into departments with their own analog trunk lines.
Incoming calls are easy to route to the correct groups of extensions, but at present all outgoing calls use the same trunk pool.
I believe this will allow me to segregate outgoing calls so each department uses it's own trunk lines.
Hi,
Hi,
this looks to be just what I need, thanks.
I have a customer setup where the business shares a common system but is split into departments with their own analog trunk lines.
Incoming calls are easy to route to the correct groups of extensions, but at present all outgoing calls use the same trunk pool.
I believe this will allow me to segregate outgoing calls so each department uses it's own trunk lines.
I had forgotten that I added
I had forgotten that I added a new class to extensions.class.php. I've moved my new definition to functions.inc.php for now.
You can download the updated version 0.1.1 from the same place.
robert wrote:
That's better - I'll have a play... thanks :)
didn't work for me...
didn't work for me...
got this in my httpd error_log
PHP Fatal error: Class 'extension' not found in /var/www/pbx/admin/modules/outgrps/functions.inc.php on line 30Then again, I'm running what appears to be the final release of 2.3 (just upgraded about 5 minutes ago)...
I'll stay tuned!! This looks great!!
THX!!
Okay I added the missing
Okay I added the missing require statement. You can download the fixed outgrps-0.1.2.tgz now.
got further that time - but
got further that time - but still no dice...
not sure where to look for more info on that...
found this in httpd
found this in httpd error_log
not sure if that helps
Hopefully the 3rd fix is the
Hopefully the 3rd fix is the charm. I made available a new version which should resolve these issues.
So far so good! THX!!!
So far so good! THX!!!
Updates - New version 0.1.5
I've uploaded a new release. This latest version fixes some quoting issues with CID and fixes some bugs in the field descriptions. This should fix all the outstanding problems that I know about. If you've downloaded a previous version you should update it. If there are any issues or you'd like to see additional features, let me know.
New Features
I've been working on version 0.2 and I wanted to get some feedback.
One of the things I've been thinking about adding is support for international calls
to separate them from other normal outbound calls.
I'd add an additional global option to the top section to specify the prefix. I new
section similar to the outbound calls section would be added for international
calls.
Would that make it more useful?
Also the subject of prefixes brings up another thought. I'm using my system for both
business and home use. So I have remote extensions in another country. For my
home use it is connected to an existing proprietary Panasonic phone system (what
can I say, it's a big house :-). Since it is being used in an environment where people
are used to using a traditional pbx they are conditioned to using 9 to dial an outside
call, etc.
However because of the power of Asterisk dial plans and their support of variable
length patterns people are moving more to just dial the number and let the system
extract feature selection and destination information out of the dialed digits rather
than relying on leading digits.
So I was thinking of extending the current prefix so that one can specify a pattern or
a list of patterns separated by & (ampersand).
If only digits are specified it will work the way it does today, otherwise it will treat the
input as a list of patterns.
Comments?
Anthing else you would like added?
For those of us, not so adept
Hi,
I love the concept and I suggested something similiar. I am glad that you wrote it. Now, how do I install it????
Errors when clicking on Extension catagory
Hi
Thought I would try this out as it might be what I am looking for, however when this module is enabled the following is shown at the top of the FreePBX page when the extension catagory is selected
Notice: 'outgrpsel' does not exist in component->getoptlist() in /var/www/html/admin/components.class.php on line 144
Notice: $valarray must be a valid array in gui_selectbox in /var/www/html/admin/components.class.php on line 546
This only appear when this module is enabled. Disable it and they are not shown
Would liked to have reported this via the download site, however I seem to be having a blonde moment and could not work out how to do it!
Adrian
127.0.0.1
Theres no place like home
Need more info
Hmm, I haven't seen nor heard of anyone having problems like that. There must be something I didn't anticipate in your configuration.
Which version of FreePBX are you using? Are all the other modules up to date? Which FreePBX configuration model are you using (Extensions or Devices and Users)?
In order to be able to submit bug reports or post messages on the site you have to register. This is to prevent spam and enable me to follow up on the bug reports.
Ooops - ment to let you know that!
I am running FreePBX 2.3.0.2, module administration claims everything is upto date, running in Extensions model.
If you need more information please let me know as I am more than happy to help you here. :-)
Thanks in advance
Adrian
127.0.0.1
Theres no place like home
Other than the error messages does it work?
I've been working on reproducing the problem.
I believe that the error you are seeing is benign. I'll release a new version that fixes it soon. I think the reason you are seeing them on the web page is because your php.ini file has "display_errors" set to "on". This isn't a recommended setting in a production setting which is probably why no one else has reported it yet. You should use logging to a file instead.
Of course I should have checked my log before I released the module and I would have caught this much sooner. (Imagine embarrassed emoticon here)
you should post this to the trac
you should post this to the trac
theres a new module option in in the trac post type.
Just as a heads up, here's
Just as a heads up, here's what we have planned about this: http://freepbx.org/trac/wiki/CustomContexts
It still requires some fundamental changes to take place before it can be implemented.
---
Greg MacLellan - Core freePBX Developer
http//freepbx.org - irc.freenode.net #freepbx
---
Greg MacLellan - Core FreePBX Developer
http//freepbx.org - irc.freenode.net #freepbx
You can do it with your "Dial Contexts" but would you want to?
I originally looked at using the other custom contexts module to solve this problem but found the amount of configuration and maintenance prohibitive. Your planned "Dial Contexts" have the same problem.
Consider the case with 30 extensions spread over 5 locations. You would need to create 5 "Dial contexts", 10 Outbound Routes and modify 30 extensions to set the context.
With the module in this thread you only create 5 groups, which involves modifying 5 pages versus 45 pages when using "Dial Contexts". Its not hard to see that it is much easier to maintain when the information is on 5 pages then when it is spread across 45 pages.
The issues you raise are
The issues you raise are valid so I'll try to address them all.
With the proposed "dial contexts" module, you would indeed need to create 5 dial contexts. You'd also need to create a number of outbound routes - but outbound routes can be shared, so it is probably not the case that you would have 10 distinct groups (2 for each dial context), although it certainly is possible.
One problem with effectively having the "outbound groups" screen merged with the "dial contexts" screen (much like this module works), is in the case that you do actually share the same outbound route among multiple contexts, with this module you'd have to edit 5 different screens to change it (very prone to error, especially when you don't remember that there are 5 sites using it). With the separate dial contexts / outbound routes, you edit the one route, and it is updated for all sites.
There may be UI shortcuts that could help with this: perhaps "add route" and "edit route" buttons, that would do an in-place add/edit for the route, without leaving the dial contexts screen.
As far as editing 30 extensions, yes, you're right, you would individually need to change them all. But this is a UI issue, and is solved in many ways:
- A select list could be added on each dial context, to allow adding extensions to that context (obviously it would have to indicate if they're already in another context). This would do the same thing as going into the extension and changing a dial context drop-down, it's just another way to access it.
- a "mass changes" UI could be created (I think there are some people already looking for this) where you can edit properties of multiple extensions at the same time, on one screen.
The biggest problem I see with using a regex range to select the extensions is suddenly extension numbers have meaning. If someone moves to another office, they have to get a new extension number. There is currently no reason technically why this would have to happen.
Another issue is tying to extension numbers and not devices. For example (in deviceanduser mode), a user may have extension 201, with device 201001 in New York, and device 201002 in Toronto. If someone dials 911 on either of those phones, obviously it needs to call 911 on a local PSTN line. This isn't possible when matching based on the extension number. Likewise, the local calling areas are different, so you likely want different routes for local numbers.
---
Greg MacLellan - Core freePBX Developer
http//freepbx.org - irc.freenode.net #freepbx
---
Greg MacLellan - Core FreePBX Developer
http//freepbx.org - irc.freenode.net #freepbx
Thanks for the further information
I agree that a number of the issues I raised could be resolved with the proper UI. My comments were really directed towards the Custom Contexts module. It appeared, from my reading of the Dialing Context spec, that it would have the same issues.
I have a couple of clarifications about the Outbound Groups.
In my situation each of the Groups does have different routes for both emergency and outbound calls so there isn't any duplication between groups.
I'm currently using Extensions but the code was designed to base the groups on the Device not the User in Device and User mode.
Dropped a bug report and I am slow!
Hi
I've dropped a bug report with some info about what I have found.
However I am being slow and cannot get this to work!!
Is possible to show a bit more detail on how to set this up?
Edit
Ok I was being slow. I have now worked out how this module works and it's not quite what I needed.
Custom Context does what I need it to do, however it over complicates everything.
What I need to do is put extension in to trunk groups just like on a traditional PBX
Example Extensions 1200 to 1249 use truck group 1
Extensions 1250-1269 use trunk group 2
And then the trunk groups define which trunks what can and cannot be dialled and using what trunks
Hope this all makes sense – I know this module just about does this, however in my setup it does not work. We don’t use access digits (they are not needed - * is powerful enough to know what you want to do) and without access digits this module still routes using existing rules.
127.0.0.1
Theres no place like home
New Version 0.1.6
I released a new version of this module. It should resolve all the issues with the extension page. I "borrowed" the extension page modification code from the custom contexts module and in the process picked up a bunch of bugs. :-( I've rewritten the code from scratch and now all the spurious messages and group dropdown changes not sticking problems are resolved. I also added the group dropdown to the Extension Add page.
Set up help
Hi!
I have installed the latest version 0.1.6. And the error in extensions are gone!
But I cannot quite get it to work.
My setup is two trunks - and what I try to achieve is to get some of my extensions to use one trunk and some the other.
What happens now is that everything goes through the trunks that I have set up in Outbound routes.
I want extension 404, 388 and 1755 to use trunk1
And extension 222, 557 to use trunk2
What do I write in "Extension Pattern" and what do I write in "Number" to get this setup to work?
(I dont use a prefix for outbound lines - I have defined in the trunk that all numbers containing 8 numbers (Norway!!!) XXXXXXXX to go outbound using trunk 1)
Regards,
Jarle
Source Unavailable?
I tried to download this today from the link at the top, but it appears to be offline. Is there an alternate source?>
robert, I've created a space
robert,
I've created a space on freepbx.org for contributed modules as we discussed. Would love to have your module housed there and you would have full access to maintain it as well as receive bugs in the tracker etc, and soon an ability with the cli version of module_admin for people to install it. Let me know.
philippe
p.s. I may be slow to respond, I'm running out the door to Astricon right now.
------------------------------------
Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx
Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here
Has anyone else had an issue
Has anyone else had an issue with changes that don't stick?
The pull down in devices lets you pick a context but it doesn't seem to stick.
I have the same issue with custom contexts (uninstalled outgroups, installed custom contexts).
This is a GREAT module -
This is a GREAT module - have been requesting this functionality for a long time and I was informed that this was not going to be done right now as the entire trunk and routing infrastructure is being redone - So I am surprised to see this released - thanks a bunch!
INTALATION DETAILS
Hello,
Sorry to ask, but how do I install this module?
there is not "installation section" under module manager under freePBX.
help will be appreciated
Thank you
Leisser Barrera
951.530.3403 ext 201
Leisser Barrera
951.530.3403 ext 201
Installation
Download it on whatever machine you use to access the Freepbx system.
In Freepbx, go to module admin and 'upload module', then browse to the outgrps-0.1.6.tgz (or whatever) file you downloaded.
Once you have uploaded it, the module will be listed in Module admin. Go to it and select the 'install' option.
Upload module not found
Hello Rjenkinsgb,
Thank you for the info, there is a problem, I cant see the "upload module" under--freepbx--tools--module admin--
Leisser Barrera
951.530.3403 ext 201
Leisser Barrera
951.530.3403 ext 201
Which version of FreePBX
Which version of FreePBX are you using?
I'm using 2.3 and 'Upload module' is immediately right of 'Check for updates online' in module admin.
It doesn't work
Hi...
We have installed the latest version 0.1.6. But it doesn't work.
We have couple of trunks and oout bound rules. I setup my extension to use the third trunk, everythink seems perfect, but when I dial from my exntension that outbound group, it dials from the original first outbound rule and trunk.
So even though everything seems fine, it doesn't dial from the correct trunk that I setup. FYI, I am not using any prefix and I don't want to use as outbound group would solve my problem perfectly.
Any comment would be highly appreciated.
Thanks,
Cem
Same problem
I have the same problem. For reply on my phones to work I can't have a prefix since missed calls don't.
Also every body wants do call directly without prefix. Also Intercom stops working if starting with 9 for instance.
Would be happy for any kind of respons to this.
Thanks
Kent
Not working here either
Have 1 extension (206) that needs to dial out on the only POTS line, G0.
have the pattern matching set to 2[0-9]{[0-9]}
group # is 6
Even set the group in the extension and it will not dial out on G0. IT follows the normal outbound routes.
Not working for me either...
I am running freepbx version 2.3.1.1
this addons is are real good idea, but it is not working for me, the ballontips "extension pattern" tells 2([0-9])[0-9] , the screenshot tells, 2\([0-9]\)[0-9] with backslashes, and in this post, one other user says 2[0-9]{[0-9]} ... witch one is good???
what is the best way to create outbound group for the only extentsion 6008? (our extensions is on the 6XXX)
thank you!
Fabrice
I don't want to use 9 for outside either...
A couple of points. I
A couple of points. I downloaded the latest module today and my freepbx system is up2date.
Once can create an empty ring group with no way of deleting it.
I installed this module fine, but when will it be available within the list of modules to choose from?
Thanks!
KM
KieranMullen
http://360Oregon.com
I added wrong inbound route, sri
I was adding a wrong inbound route.
I received the following messages:
exit: 1
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Checking for /etc/amportal.conf ..OK
Bootstrapping /etc/amportal.conf ..OK
Parsing /etc/amportal.conf ..OK
Parsing /etc/asterisk/asterisk.conf ..OK
Connecting to database..OK
Connecting to Asterisk manager interface..OK
[FATAL] SELECT * FROM incoming WHERE cidnum = "" AND extension = ""ISDN1" <567574>" AND channel = "" [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ISDN1" <567574>" AND channel = ""' at line 1]
1 error(s) occured, you should view the notification log on the dashboard or main screen to check for more details.
Now i am not able to delete this route
How can I do it?
Compatability with 2.4
Anyone tried CustomContexts with 2.4?
In most part yes, it's work.
In most part yes, it's work. See this thread . I tested it on FreePBX and it works.
Not working for me
My config:
No dial-out prefix (all dial-out numbers begins from) 0,1,or 9, but that digits have to be dialed thru trunk. Extensions - three digits begins from 3,4,5,6 or 7
one dial-out route (default) that matches all dial-out traffic. and it works fine.
When I try to configure outbound group (for example to add PIN for some extension to dialout) - it stil goes by default outbound route, even if I add extension to outgroup manually
I can see that somebody has similar problems.
m.
help
i am trying to use a follow me to call my cell phone i have my box setup with a ext to call cell phone but when i enable it and call my main number it still goes to my voicemail on main line never trys to find my cell ext the box was setup by my friend in jail and he had it working before but something its something i had him turn off ......now he needs it on and i am a novice at this box
i tried to hit followme on main ext and applied change after 3 rings right to voice mail.
Wow - My PBX UI went away!
This is an awesome module . . . well, it should be!
I did the upload from a machine on the local network - and my FreePBX UI won't come up any more. The I can get to main server control panel, and I can get into webmin . . . but can't see the FreePBX main screen. I did a "shutdown -r now" and still no control GUI. Asterisk appears to be up and calls go through ok. When I try to get to the UI, the url "http://192.168.1.2/admin/config.php" is displayed, and the browser shows a blak page with the message "Done" at the bottom left.
Any ideas? Please also reply to "jimi at designet.com", if you don't mind.
Thanks,
Jim
Jim, This is third party
Jim, This is third party developed module at this time. So you'll have to wait for the developer to respond. But in the mean time you've provided almost no important details. Version of FreePBX, asterisk, OS, etc. It is possible that you have a combination that has created a issue not planned on but without those important details it is hard to start helping without first asking and waiting for those answers.
Re: Wow - My PBX UI went away!
I must have been pretty upset when I wrote that; typo's are not my usual style . . . the screen is *blank*, not *blak*.
I'd appreciate any help that might be offered . . . all our phones are dependent on a working UI!
Thanks,
Jim
Did you fix this yet? I just
Did you fix this yet? I just ran into the same thing. I was able to get around it by manually editing the /var/www/html/admin/modules/outgrps/functions.inc.php file. Comment out the "class ext_setcallerpres extends extension" section. There are about a dozen lines. Just put double slashes in front of each line and save it. Then the gui will start working again. At this point I uninstalled this module. No telling what else is broke. So I have no idea how it works or anything else.
can't dail outbond ext number
hi
I am dailing outbond call from Freepbx whenever remot IVR ask me to press 1 for manager press 2 for 3 for 4 for i press but nothing happen IVR keep repeting the same Plz help me out
Thanks
Manoj
Freepbx Issue
HI
i have 1 GB ram in Freepbx It use 97% of 1GB How much Ram Freepbx Need.
manojkuksal, DO NOT hijack a
manojkuksal,
DO NOT hijack a thread about one thing with a totaly new subject. it is the fastest way to not get an answer to your problem. repost the question as a new question so that it can be seen and answered by somebody who would know.
Neither of your post have ANYTHING to do with the outbound module, so the origional poster is now getting alerts about new postings when in reality they have nothing to do wit hthis subject. At the same time people willing to help with either of your questions might not be interested in the outbound module so will not look and you loose out.