Limiting extensions to 1 trunk unsing custom context-->HELP?

Hello Forum,

I recently upgraded to FreePBX 2.4 and unfortunately, do not know if this is a coincidence, I cannot longer use the following code in extension_custom.conf to limit certain extension to only use certain trunk. The code that I have added to extensions_custom.conf is as follows:


[from-miami-custom]
; applications are now mostly all found in from-internal-additional in _custom.conf
include => from-internal-xfer
include => bad-number
include => parkedcalls
include => from-internal-custom
;allow phones to dial other extensions
include => ext-fax
;allow phones to access generated contexts
;
; MODIFIED (PL)
;
; Currently the include for findmefollow is being auto-generated before ext-local which is the desired

behavior.
; However, I haven’t been able to do anything that I know of to force this. We need to determine if it should
; be hardcoded into here to make sure it doesn’t change with some configuration. For now I will leave it out
; until we can discuss this.
;
include => ext-local-confirm
include => findmefollow-ringallv2
;include => from-internal-additional
;commenting line above in order to copy the context from this module and only select what is needed

; This causes grief with ‘#’ transfers, commenting out for the moment.
; include => bad-number

include => from-internal-additional-custom
include => app-recordings
include => app-blacklist
include => ext-group
include => grps
include => app-daynight
include => app-daynight-toggle
include => ext-paging
include => app-pbdirectory
include => app-dnd-off
include => app-dnd-on
include => ext-findmefollow
include => fmgrps
include => app-dictate-record
include => app-dictate-send
include => app-cf-busy-off
include => app-cf-busy-off-any
include => app-cf-busy-on
include => app-cf-off
include => app-cf-off-any
include => app-cf-on
include => ext-queues
include => app-gabcast
include => app-callwaiting-cwoff
include => app-callwaiting-cwon
include => ext-meetme
include => app-languages
include => app-dialvm
include => app-vmmain
include => app-calltrace
include => app-directory
include => app-echo-test
include => app-speakextennum
include => app-speakingclock
include => vmblast-grp
include => app-userlogonoff
include => app-pickup
include => app-zapbarge
include => app-chanspy
include => ext-test
include => ext-local
;include => outbound-allroutes
;commenting line above to defined the outbound routes that this extension will use

;below are the routes to be used by this trunk only
include => outbound-allroutes-custom
include => outrt-001-emergency
include => outrt-002-BellsouthService
include => outrt-003-tollfreeMIA
include => outrt-004-DADEcallsMIA
include => outrt-005-PRcellcallsMIA
include => outrt-006-UScallsMIA
include => outrt-007-INTERNATIONALcallsMIA
exten => foo,1,Noop(bar)

;exten => s,1,Macro(hangupcall)
;exten => h,1,Macro(hangupcall)

; end of [from-miami-custom]


Basically I copied the from-internal context of extension.conf and try to define only the outbound routes that I want use for this custom context. Then, I change the extension CONTEXT field to the value of the custom context that I created. This was working properly before the upgrade, but after the upgrade to 2.4 something might have changed in the core code that it is not allowing for this custom context to be used. Could someone point me in the correct direction of how to obtain such application. I have seen a module that tries to accomplish something like what I am doing, but I will rather do it with custom context added to the extension_custom.conf file as I will have more control over it. At the moment, the problem is that the extension does not seem to follow the CONTEXT field definition, and it always chooses the outbound routes according to precedence instead of the define custom context. Hopefully I made myself clear on what I am trying to accomplish, and someone in the forum can point me to the right direction of implementing this application.

You could use FreePBX version 2.3 with the custom context module. This module does not work inside version 2.4. Even with version 2.3, there is a couple of non working things (follow -me does not work for extensions inside a custom context).

Do you have something inside version 2.4 you can’t deal without ?

I’ve found that upgrading to version 2.4 is not so usefull, as the custom context module does not work inside it.

The next version, according to the FreePBX team, will have support for dial contexts. That’s all we need to be able to manage dialing restrictions.

Back in the time of AAH, and FreePBX do not remember what version, there was a patch for the language package that could be applied manually. FreePBX 2.3 came along, and the language patch did not work, so I had to manage without the language definition per extension. Finally FreePBX 2.4 incorporates a langage module, but now, as per your comments, the extension_custom.conf cannot be used to do the configuration that I am suggesting? Is there any other way of replicating this configuration that you might know? Any help will be greatly appreciated.

I’m glad you posted this… I was about to try an upgrade :frowning:

I am glad it help someone. I had to go back to FreePBX 2.3 in order to have my old configuration working, and even then I am having some issues, probably that are being carried out from the downgrade. It will be really useful to have a MultiTenant module in order to cover this type of scenarios properly.

Well, it looks like i just screwed myself when upgrading to the current version. Cant believe such an important (should be core) and basic feature as custom contexts are not support in 2.4.