<div>See </div><div>Route-Permissions module,</div><div>It lets you restrict certain phones/extensions to follow a dial-plan pattern and dial out to the defined trunk etc meanwhile not breaking any other functionality or features of FPBX- though you can restrict the features from this too.</div>
<div><br></div><a href="http://www.freepbx.org/support/documentation/howtos/how-to-give-a-particular-extension-different-or-restricted-trunk-access">http://www.freepbx.org/support/documentation/howtos/how-to-give-a-particular-extension-different-or-restricted-trunk-access</a> <div>
<a href="http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules/outbound-route-permission">http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules/outbound-route-permission</a> </div>
<div><a href="http://mirror.freepbx.org/modules/release/contributed_modules/">http://mirror.freepbx.org/modules/release/contributed_modules/</a>
</div><div><br></div><div>OR<br>Custom Context</div><div><a href="http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules/customcontexts">http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules/customcontexts</a> </div>
<div><br></div><div>See w/e fits your requirements. What I suggest suits your need is the Route-permission module. Though it'll be bit complicated but worth giving a try.</div><div><br></div><div>Regards,</div><div>Sammy</div>
<div><br><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 4:01 AM, Warren Selby <span dir="ltr"><<a href="mailto:wcselby@selbytech.com" target="_blank">wcselby@selbytech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Wed, Jul 11, 2012 at 4:56 PM, bilal ghayyad <span dir="ltr"><<a href="mailto:bilmar_gh@yahoo.com" target="_blank">bilmar_gh@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Fine, did you read the question well and understand about what I am asking?<br>
<br></blockquote></div><div><br>Perhaps I did not understand what you were asking. I thought you were wanting to do something custom per extension (in the case of my example, the "something custom" was control outbound call access to either local only or local and long distance, etc. You can figure out you're own "something custom"), but still have all the calls have all the standard FreePBX features that you only get when using the [from-internal] context. <br>
<br>In my example, the extensions are in the 2XXX range, and they would either have a context of [custom-local-only] or [custom-long-distance], depending on what you wanted to allow that extension to dial. <br><br>To break down my example:<br>
<br><br><br>[custom-local-only] --> The name of our custom context. It could be anything you want, as long as it's in square brackets<br><br>exten => _281NXXXXXX,1,Verbose(Outbound call from local-only context) --> This step is purely informational, it has no bearing on CDRs or anything else...it's just a useful step for debugging. I tend to do this for everything, it's the same as some people use the "NoOp()" command to have debugging information in their CLI output.<br>
<br> same => n,Goto(${EXTEN},from-internal,1) --> This step sends the call to the [from-internal] context and handles it exactly as if you weren't using any custom call controls. In my example, however, it will only go there if it meets the criteria of matching the pattern (in other words, the call would have to be placed to a number that matches the _281NXXXXXX pattern). "same => n" is a shorthand way of writing "exten => _281NXXXXXX,n". It was added in around 1.6 I think, I'm not entirely sure. <br>
<div><br>
exten => _2XXX,1,Verbose(Internal extension-to-extension call) --> Again, this is purely an informational step, useful for debugging. It can be skipped or expanded as you see fit, it has no bearing on CDR records or anything else, other than CLI output.<br>
<br> same => n,Goto(${EXTEN},from-internal,1) --> This does the same as the previous example, however it will only go to the [from-internal] context if the pattern that was dialed matches _2XXX. This is assuming you're using internal extensions in the range of _2XXX. You can change this to whatever works for you.<br>
<br>[custom-long-distance] --> another custom context, this time it allows long distance NANPA calling as well as local and internal calls<br><br>
exten => _1NXXNXXXXXX,1,Verbose(Outbound call from local and long-distance context) --> I hope you're seeing the pattern by now. This is simply a useful debugging step, with no bearing on anything else.<br><br>
same => n,Goto(${EXTEN},from-internal,1) --> The call passes into the [from-internal context if it matches the pattern of _1NXXNXXXXXX, a typical NANPA long distance call. <br><br>include => custom-local-only --> include the local dialing context that way we don't have to duplicate any code that we've previously written, mostly useful for the internal extension dialing. <br>
</div><br><br><br>So you can see, the Verbose() statement has no bearing on CDR's what so ever. I wasn't aware that FreePBX used any kind of custom CDR database, I assumed it was simply using the asterisk CDR database, where any call through the system generates a CDR. Since someone else had mentioned that they did not get any CDR logging or any of the other FreePBX features without making the extension have a context of [from-internal], I was showing how to do simple things like local and long-distance access control in the extensions_custom.conf file, and then sending the call into the default [from-internal] context. What I provided was mostly just supposed to be an example that you could build off of. You don't have to use Verbose() if you don't want to, that's just something I've grown accustomed to doing. <br>
<br>I'm by no means an expert at FreePBX. If you find that using custom contexts are not helping in you situation, perhaps you can expand on what the actual issue is that you're experiencing, and we can try to help troubleshoot from there. <br>
</div></div><div class="HOEnZb"><div class="h5"><br clear="all"><br>-- <br>Thanks,<br>--Warren Selby, dCAP<br><a href="http://www.selbytech.com" target="_blank">http://www.SelbyTech.com</a><br><br>
</div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>