I’m just figuring out Asterisk and FreePBX at the same time and as a testbed, I’ve installed AsteriskNOW with FreePBX.
There seems to be some deviation or at least a few limiting factors in how FreePBX manages things versus what Asterisk conventions.
First, in the starfish book, it is recommended to name devices by their MAC (or something else fully unique to the device). In this way extensions and whatnot are a separate concern. But in FreePBX, I am only allowed to create a device and extension in the same page. The numerical extension thus becomes the devices name.
Second, the device naming and extensions are limited to numbers only. In Asterisk, both device names (in sip.conf) and extensions (in extensions.conf) can be alphanum. So something like “joe101” is a valid extension, and “005056ad7c43” would be a valid device name. The device itself then, doesn’t have an extension at all, there is merely a dial plan the includes a reference to the device and this might be referenced by more than one extension.
So, is there a mode which more closely adheres to the Asterisk style of managing these things?
I have read something about a “User and Devices” mode, but again, at least with regards to the book, they emphasize that there is no such thing as a user, and so I don’t know if that is the solution or not.
What “problem” are you specifically trying to address?
FreePBX by design hides the Asterisk internals from you. The dial plan it generates has almost 10 years of field deployment. The dial plan it writes is much better for PBX applications than you could ever do by hand.
Jared, one of the authors of Asterisk, The Future of Telephony is a friend of this project. I had the opportunity to have dinner with him at the last Astricon and discuss the future of Asterisk and FreePBX from his perspective. Those 2 hours were worth the trip.
Thanks for the reply, but does any of what you wrote help? Not really.
As I said, I’m trying to learn this. I’m using the starfish book, and I’m seeing difference between what is recommended and available in Asterisk vs how FreePBX does things.
So, in the book, it says there are no users. But FreePBX refers to users.
In the book, it says, that devices should be named uniquely, and not the same as the extensions. But in FreePBX, the name of the device is the extension.
In the book, I can name a device using alphanum, but in FreePBX I can only use numbers.
I’ve only been at this a few days, and I’m sure I’m going to find many more deviations.
Then, can somebody “in the know” please address these issues and not just tell me how great FreePBX is?
How much more “in the know” do you want?
What issues would you like addressed? I doubt the developers are going to debate the semantic use of the word “user” vs. the Asterisk definition of what a “user” is.
FreePBX currently does not support Alphanumeric peer names for extensions (or users in device and user mode). It’s that simple.
Tens of thousands of design decisions have been made in the dial plan.
If you are simply trying to learn Asterisk I can’t imagine anything more complicated than reverse engineering the dialplan code that FreePBX writes. It is complex and convoluted. It also uses syntax variations that are only documented in the code itself (truly the only definitive documentation on any open source project).
The O’Reily book is not a bible, it’s a guide. It doesn’t indicate FreePBX is defective because they choose to do things differently.
Using non-numeric device names is a highly recommended security practice, not really a guide.
This is something digium has been promoting for some time:
It is just FreepBX is slow on the uptake:
The book Asterisk: The Definitive Guide is not from Digium:
The three authors are: Leif Madsen, Jim Van Meggelen, and Russell Bryant
The ticket you referenced is closed with an explanation.
The blog in the post that you refer to state “Make your SIP usernames different than your extensions”. Ticket #3601 suggest that you switch to User and Device to accomplish that.
As usual Obelisk, IMHO, you are quick to come to conclusions without to much fact.
can we keep the discussion on a civilized level, as in “no personal attacks”, please ?
You can get Leif Madsen’s Digium contact info at this link:
Russel Bryant worked for Digium until last month:
I am more interested in FreePBX team take on this: "Tip #1: Use non-numeric usernames"
This problem could be easily solved if FreePBX team could insist on proper implementation of the match_auth_username option with Digium.
Yes we can keep the discussion to a civilized level.
I know that all three work/worked at Digium, that is not the point. The book is a fine book if you choose to write your own dialplan. However, that is not a book you read if you use FreePBX.
Do you have any code examples that you can provide to us, preferably a diff of the current code we use to implement match_auth_username?
If you feel like it, join the development team. It might be a big task to rewrite the code to accomplish your suggestion.
I think if match_auth_username was done properly in asterisk, you would not need any changes to FreePBX. “extension” 101 could register with username “some_name”. Most soft/hard phones support this via username/authname. Only in asterisk they are always the same which makes cracking passwords much easier.