Choosing specific lines to dial out

I have a PBX with four (4) lines (we use the default round robin), we want to limit some extensions from using all four (4) to dial outside, so for example one extension can only use two (2) lines (round robin) to dial outside, is such a setup possible?

Please explain as clear as possible, because we are newbies. Thank you any help will be appreciated.

What you need to do is add the analog lines into a group that only contains the two lines that you want to dial out from (DAHDI/g1), as assuming your default is ZAP/g0. Then on your outbound route for your two extensions use that trunk so in the trunk sequence, it will be DAHDI/g1… If that is clear.

No not clear enough but thank you for your answer, how exactly do you add the lines into a group

renbsr, I don’t want to appear to be picking on you however please answer a question for me and in the process maybe you will be helped.

In my opinion you just engaged in “support vampire” posting. Someone went out of their way to explain how DAHDI channels are assigned to a group. You ask to explain in more detail.

When given an answer, did you consider going back to the DAHDI documentation (and I even question if you read it before you asked your question) and looking up the groups setting and see if it made sense?

If you had come back and asked a question specifically about the channel variable that would have been OK, it meant you put forth some effort.

Just my 2 cents.

I understand your frustration, but as I said I’m a newbie. I don’t have any previous experience with PBX or IPPBX systems, so I don’t know all the naming conventions. When you search for something it helps to know certain keywords, I don’t know all the keywords so I need to google sentences to find what I’m looking for which does not always lead me to where I want to be. To say I haven’t read the documentation is frankly quite harsh. I’ve read so much documentation and you get lots of suggestions but as I am new to this it feels like information overload. But I came across this post and it seems to explain what I want to accomplish so maybe you can help me on the way:

Use a text editor (nano, Midnight Commander’s editor, etc.) to add the following two dialplan fragments to /etc/asterisk/extensions_custom.conf (note, if your extensions can pass the # character to Asterisk then change all instances of _[0-9]! to _[#0-9]! - adding the # character - this applies to all examples on this page):

exten => 911,1,Noop(Allowing unrestricted 911 call)
exten => 911,n,Goto(from-internal,${EXTEN},1)
exten => _[*0-9]!,1,Noop(Using Call Restriction 1)
exten => _[*0-9]!,n,Set(_RestrictedExt1=TRUE)
exten => _[*0-9]!,n,Goto(from-internal,${EXTEN},1)
exten => h,1,Hangup()

exten => _[*0-9]!,1,Noop(Testing for Call Restriction 1 ${RestrictedExt1})
exten => _[*0-9]!,n,GotoIf($["${RestrictedExt1}" = “TRUE”]?restrict1:norestrict1)
exten => _[*0-9]!,n(restrict1),Noop(Call blocked due to call restriction: 1)
exten => _[*0-9]!,n,Playback(feature-not-avail-line,noanswer)
exten => _[*0-9]!,n,Goto(app-blackhole,congestion,1)
exten => _[*0-9]!,n(norestrict1),Noop(No call restriction: 1)
exten => h,1,Hangup()

In the code above, change both instances of 911 to your local emergency number if it is something other than 911, or remove those two lines completely if you do not wish to permit the restricted extensions to make emergency calls (doing that is NOT recommended except in very special circumstances).

After adding this additional code to extensions-custom.conf, create a new custom trunk with the Custom Dial string Local/[email protected] , then go into any Outbound Route to which you wish to restrict access, and move that new custom trunk to the top of the trunk list (or second from the top if you have an ENUM trunk at the top, assuming that you don’t care if a free ENUM call actually goes through).

The go into any extension that you wish to restrict and change the context from from-internal to custom-restricted-ext1. (In Elastix an extra field is created in the extensions in the device options menu ‘custom context’ which gives you the option to select: allow all and any custom context you have created.) After saving all the configuration changes, you should be able to place a test call that would use the restricted route. You should hear the “That feature is not available on this line” recording (the most appropriate one I could find among the standard recordings supplied with FreePBX).

I can only test after work hours so I wanted to ask if I’m going in the right direction.

Nope, you don’t need any custom code at all.

You just need to split the channel into groups as was suggested.

When I say documentation I am not speaking of random posts that may or may not help. I am talking about the documentation that comes from Digium. In this case DAHDI drivers.

Here for example is a link to the chan_dahd.conf file in Asterisk 1.8 . You can see several examples of using group.

In one of the examples you can have a channel in two groups. So you put all your channels in group 0 and then make two groups (or as many as you need) with the “limited channels” you want them to access.

The create a DAHDI trunk for each group and use the outbound routes module to allow specific extensions access to specific trunks.

If you don’t understand telephony concepts like channels, trunks and route permissions that are generic to PBX and call switching then you are going to have a hard time getting your arms around this.

My opinion (and everyone has one) unless you are a hobbyist and get enjoyment out of playing with telephony gear the ROI of learning to do it yourself vs. paying someone to do it is dramatic.

The number of qualified individuals in this forum is not very high. Their time is increasing going to hand holding newbs who in the end don’t usually get the results they were looking for, everyone ends up going away frustrated.

Frankly those folks are nicer than I am (in a business forum anyway). Time is a resource I can’t buy so I treat it preciously. I am simply trying to get folks pointed in a path that’s going to lead to a positive outcome. Your thread was a great example of this, I didn’t single you out for any reason other than that.

Good luck