[from-internal]
include => parkedcalls
include => from-internal-custom
include => speeddial_custom
include => ext-fax
include => from-internal-additional
include => ext-local-confirm
include => bad-number
exten => s,1,Macro(hangupcall)
exten => h,1,Macro(hangupcall)
Copy the above and rename it into two different contexts.
After the contexts have been created, include the outbound routes individually. Ensure that the outbound routes if created via the freepbx interface should be removed, else it will become applicable to both the contexts automatically.
e.g of the extensions_custom.conf file.
First create two trunks for each line
[outrt-038-Line1]
include => outrt-038-Line1-custom
exten => _0ZX.,1,Macro(dialout-trunk,1,${EXTEN:1},,)
exten => _0ZX.,n,Macro(outisbusy,)
[outrt-038-Line2]
include => outrt-038-Line2-custom
exten => _0ZX.,1,Macro(dialout-trunk,2,${EXTEN:1},,)
exten => _0ZX.,n,Macro(outisbusy,)
[from-Line1]
include => parkedcalls
include => from-internal-custom
include => speeddial_custom
include => ext-fax
include => from-internal-additional
include => ext-local-confirm
include => bad-number
include => outrt-038-Line1
exten => s,1,Macro(hangupcall)
exten => h,1,Macro(hangupcall)
[from-Line2]
include => parkedcalls
include => from-internal-custom
include => speeddial_custom
include => ext-fax
include => from-internal-additional
include => ext-local-confirm
include => bad-number
include => outrt-038-Line2
exten => s,1,Macro(hangupcall)
exten => h,1,Macro(hangupcall)
After this for the extension, provide from-Line1 or from-Line2 based on the line that the extension has to use