You should not manually edit the extensions_additional.conf
file, only extensions_custom.conf:
http://www.freepbx.org/configuration_filesYou may find this article useful, although it is more relevant to creating custom dialplans for numbers dialled on extensions than for calls arriving on a trunk:
http://mbrevda.blogspot.com/2008/10/miscellaneouscustom-applicationextensio.htmlhttp://mbrevda.blogspot.com/2008/10/miscellaneouscustom-applicationextensio_16.htmlWhat are you trying to do? It looks like you want every call arriving on the PRI to be sent out immediately on the SIP trunk - i.e. a simple gateway. Is that correct.
The simplest solution might be to edit zapata.conf (or chan_dahdi.conf if using Dahdi) and change the context= parameter so it sends calls to a custom context. For example:
context=fromzap-tosip
Then you can add this custom context to extensions_custom.conf:
[fromzap-tosip]
exten=> _X.,1,Dial(SIP/My SIP Provider/${EXTEN})
exten=> _X.,2,hangup
This way you are completely bypassing the built-in context called "from-zaptel" (the one defined in extensions_additional.conf
) and just using your custom one which is defined in extensions_custom.conf. This method of custom handling has the added advantage that you can send the call back to the original context for default handling if you want to, simply using Goto(from-zaptel,
,p>).