How to dedicate outbound calls from a specific extension on a specific FXO line

1 post / 0 new
nkosinebantu
nkosinebantu's picture
How to dedicate outbound calls from a specific extension on a specific FXO line

I have 5 FXO lines coming into my Trixbox 2.6.1 system.
505 7873
505 2662
505 8862
505 2533
505 7155
the last 2 lines (505 2533 & 505 7155), I'll use in a hunt group to a bunch of extensions (inbound and outbound) but the first 3 lines, I want to dedicate in the following manner:
G2/Zap3 505 7873 ext 13 (inbound and outbound on the same FXO port)
G1/Zap1 505 2662 ext 14 (inbound and outbound on the same FXO port)
G3/Zap4 505 8862 ext 15, 18, 20 (inbound and outbound on the same FXO port)
Can I accomplish this without having to put a PREFIX number in the system, where the user dials an "8", and then that call will go out a particular line? I just want to dedicate a number (FXO port) to an extension
G0/Zap5 505 2533 Sales
G0/Zap2 505 7155 Sales These 2 lines can be hunted by ext’s 11 & 12

I used Zap Channel DIDs to assign a channel a DID. Then I edited my zapata.conf file and my group designations. Each channel could be in a group all by itself. (I already did this)

;;; line="1 WCTDM/0/0"
signalling=fxs_ks
callerid=asreceived
group=1
context=from-zaptel G1/Zap1 xxx 2662 ext 17
channel => 1
context=default
;;; line="2 WCTDM/0/1"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel G0/Zap2 xxx 7155 ext 11, 12
channel => 2
context=default
;;; line="3 WCTDM/0/2"
signalling=fxs_ks
callerid=asreceived
group=2
context=from-zaptel G2/Zap3 xxx 7873 ext 13
channel => 3
context=default
;;; line="4 WCTDM/0/3"
signalling=fxs_ks
callerid=asreceived
group=3
context=from-zaptel G3/Zap4 xxx 8862 ext's 15,18,20
channel => 4
context=default
;;; line="5 WCTDM/0/4"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel G0/Zap5 xxx 2533 ext 11, 12
channel => 5
context=default
but I only have 1 outbound route:
9_outside
Dial patterns: |.

Trunk Sequence: zap3/g2......zap1/g1.......zap2/g0|zap5/g0

I can't seem to assign a new outbound route to a particular extension.....so in the configuration example above, I would like ext. 13 to use G2/Zap3, which SHOULD be for the FXO port with DID xxx 7873.
Is this possible?

Inbound: 1. Assign 3 DID
In FreePBX GUI, do the followings:
Inbound:
1. Assign 3 DIDs to zap 1,3,4
2. Create 3 inbound routes for these 3 DIDs, point to 13(zap3),17(zap1),15-18-20(zap4)
Outbound:
1. Assign 13,17,15,18,20 to 3 contexts:
Edit FreePBX -> Admin -> Extension, change field "context" of extension 13,17,15,18,20 from “from-internal” to ext13,ext17,ext15-18-20,ext15-18-20,ext15-18-20
2. Edit extensions_custom.conf, and add:
[ext13]
; allow dial outbound for the number format XXXXXXX
exten => _XXXXXXX,1,Dial(ZAP/3/${EXTEN})
exten => _XXXXXXX,n,Hangup
; allow dial other numbers via SIP trunk, i.e. International Number or local extension 678, or feature code 7777
; route calls as other extensions
exten => _X.,1,Goto(from-internal,${EXTEN},1)
exten => _X.,n,Hangup
[ext17]
; allow dial outbound for the number format XXXXXXX
exten => _XXXXXXX,1,Dial(ZAP/1/${EXTEN})
exten => _XXXXXXX,n,Hangup
; allow dial other numbers via SIP trunk, i.e. International Number or local extension 678, or feature code 7777
; route calls as other extensions
exten => _X.,1,Goto(from-internal,${EXTEN},1)
exten => _X.,n,Hangup
[ext15-18-20]
; allow dial outbound for the number format XXXXXXX
exten => _XXXXXXX,1,Dial(ZAP/4/${EXTEN})
exten => _XXXXXXX,n,Hangup
; allow dial other numbers via SIP trunk, i.e. International Number or local extension 678, or feature code 7777
; route calls as other extensions
exten => _X.,1,Goto(from-internal,${EXTEN},1)
exten => _X.,n,Hangup

I followed the above steps, inbound worked perfectly, but outbound calls stopped working and ext to ext dialing stopped working. I poseted another forum for help.
And a responder said "I re-verify the script, and it works on my Trixbox 2.6.2.2. All internal extensions can call each others, regardless of their SIP "context". And all outgoing calls go via the expected trunks."

I'm obviously the one missing something....can anyone pinpoint my problem?