[asterisk-users] FreePBX: using context other than the default context and the generation for the configuration
Warren Selby
wcselby at selbytech.com
Fri Jul 6 00:21:53 CDT 2012
On Fri, Jul 6, 2012 at 12:11 AM, SamyGo <govoiper at gmail.com> wrote:
> umm Warren, yes including from-internal is the way of getting all the
> features,,,but in my experience the calls going out using the dialplan
> script we manually enter in our custome context don't get inserted into the
> FreePBX CDR and recording stuff !!
>
Okay, if you're writing custom dialplan to control outbound calling, but
you want to utilize the FreePBX standard features, without using custom
modules, you can do something like the following, adjusting for your
specific situations of course:
[custom-local-only]
; local NANPA calling for area code 281
exten => _281NXXXXXX,1,Verbose(Outbound call from local-only context)
same => n,Goto(${EXTEN},from-internal,1)
; extension-to-extension (internal) calling, assuming 2XXX internal
extension plan
exten => _2XXX,1,Verbose(Internal extension-to-extension call)
same => n,Goto(${EXTEN},from-internal,1)
[custom-long-distance]
; long distance NANPA calling, dial a 1 to dial anything outside of a local
number
exten => _1NXXNXXXXXX,1,Verbose(Outbound call from local and long-distance
context)
same => n,Goto(${EXTEN},from-internal,1)
; allow local calls also, without having to dial a 1
include => custom-local-only
--
Thanks,
--Warren Selby, dCAP
http://www.SelbyTech.com <http://www.selbytech.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120706/0f61e53c/attachment.htm>
More information about the asterisk-users
mailing list